UNPKG

eslint-plugin-de-morgan

Version:

ESLint plugin for transforming negated boolean expressions via De Morgan’s laws

12 lines (11 loc) 386 B
import { Literal, Node } from 'estree' /** * Checks whether the given AST node is a boolean literal. This function * verifies that the node is a literal and its value is of boolean type. * * @param node - The AST node to check. * @returns True if the node is a literal with a boolean value. */ export declare function isBoolean(node: Node): node is { value: boolean } & Literal