UNPKG

@masknet/eslint-plugin

Version:
28 lines 3.04 kB
import type { TSESTree } from '@typescript-eslint/types'; import type { Predicate } from './utils.js'; export declare function closest<T extends TSESTree.Node>(node: TSESTree.Node | undefined, type: string): T | undefined; export declare function closest<T extends TSESTree.Node>(node: TSESTree.Node | undefined, test: (node: TSESTree.Node) => node is T): T | undefined; export declare function closest<T extends TSESTree.Node>(node: TSESTree.Node | undefined, test: (node: TSESTree.Node) => boolean): T | undefined; export declare function isMultiline({ loc }: TSESTree.Node): boolean; export declare function isIdentifier(node?: TSESTree.Node | null): node is TSESTree.Identifier | TSESTree.PrivateIdentifier; export declare function isMemberExpression(node?: TSESTree.Node | null): node is TSESTree.MemberExpression; export declare function isChainExpression(node?: TSESTree.Node | null): node is TSESTree.ChainExpression; export declare function isCallExpression(node?: TSESTree.Node | null): node is TSESTree.CallExpression; export declare function isBindCall(node?: TSESTree.Node | null): node is TSESTree.CallExpression; export declare function isLiteral(node?: TSESTree.Node | null): node is TSESTree.Literal; export declare function isAwait(node?: TSESTree.Node | null): node is TSESTree.AwaitExpression; export declare function isStringLiteral(node?: TSESTree.Node | null): node is TSESTree.StringLiteral; export declare function isNumberLiteral(node?: TSESTree.Node | null): node is TSESTree.NumberLiteral; export declare function isBigIntLiteral(node?: TSESTree.Node | null): node is TSESTree.BigIntLiteral; export declare function isRegExpLiteral(node?: TSESTree.Node | null): node is TSESTree.RegExpLiteral; export declare function isIdentifierName(node: TSESTree.Node | undefined | null, name: string): node is TSESTree.Identifier; export declare function isIdentifierName(node: TSESTree.Node | undefined | null, names: string[]): node is TSESTree.Identifier; export declare function isIdentifierName(node: TSESTree.Node | undefined | null, test: Predicate<string>): node is TSESTree.Identifier; export declare function isLiteralValue(node: TSESTree.Node | undefined | null, value: number): node is TSESTree.NumberLiteral; export declare function isLiteralValue(node: TSESTree.Node | undefined | null, value: string): node is TSESTree.StringLiteral; export declare function isLiteralValue(node: TSESTree.Node | undefined | null, value: TSESTree.Literal['value'][]): node is TSESTree.Literal; export declare function isLiteralValue(node: TSESTree.Node | undefined | null, pattern: RegExp): node is TSESTree.StringLiteral; export declare function isFunctionLike(node?: TSESTree.Node | null): node is TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclaration | TSESTree.FunctionExpression; export declare function isIdentifierFunction(node: TSESTree.Node): boolean; export declare function isSameIdentifier(a: TSESTree.Node | undefined | null, b: TSESTree.Node | undefined | null): boolean; //# sourceMappingURL=node.d.ts.map