@typescript-eslint/utils
Advanced tools
Comparing version 7.13.2-alpha.2 to 7.13.2-alpha.3
@@ -72,2 +72,11 @@ import type * as TSESLint from '../../ts-eslint'; | ||
declare const isParenthesized: { | ||
/** | ||
* Check whether a given node is parenthesized or not. | ||
* This function detects it correctly even if it's parenthesized by specific syntax. | ||
* | ||
* @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#isparenthesized} | ||
* @returns `true` if the node is parenthesized. | ||
* If `times` was given, it returns `true` only if the node is parenthesized the `times` times. | ||
* For example, `isParenthesized(2, node, sourceCode)` returns true for `((foo))`, but not for `(foo)`. | ||
*/ | ||
(node: TSESTree.Node, sourceCode: TSESLint.SourceCode): boolean; | ||
@@ -74,0 +83,0 @@ (times: number, node: TSESTree.Node, sourceCode: TSESLint.SourceCode): boolean; |
import type { AST_NODE_TYPES, AST_TOKEN_TYPES, TSESTree } from '../ts-estree'; | ||
export declare const isNodeOfType: <NodeType extends AST_NODE_TYPES>(nodeType: NodeType) => (node: TSESTree.Node | null | undefined) => node is Extract<TSESTree.Program, { | ||
export declare const isNodeOfType: <NodeType extends AST_NODE_TYPES>(nodeType: NodeType) => (node: TSESTree.Node | null | undefined) => node is Extract<TSESTree.Node, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.AccessorPropertyComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.AccessorPropertyNonComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ArrayExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ArrayPattern, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ArrowFunctionExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.AssignmentExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.AssignmentPattern, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.AwaitExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.BinaryExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.BlockStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.BreakStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.CallExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.CatchClause, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ChainExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ClassBody, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ClassDeclarationWithName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ClassDeclarationWithOptionalName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ClassExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ConditionalExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ContinueStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.DebuggerStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.Decorator, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.DoWhileStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.EmptyStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ExportAllDeclaration, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ExportDefaultDeclaration, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ExportNamedDeclarationWithoutSourceWithMultiple, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ExportNamedDeclarationWithoutSourceWithSingle, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ExportNamedDeclarationWithSource, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ExportSpecifier, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ExpressionStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ForInStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ForOfStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ForStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.FunctionDeclarationWithName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.FunctionDeclarationWithOptionalName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.FunctionExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.Identifier, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.IfStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ImportAttribute, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ImportDeclaration, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ImportDefaultSpecifier, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ImportExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ImportNamespaceSpecifier, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ImportSpecifier, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.JSXAttribute, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.JSXClosingElement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.JSXClosingFragment, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.JSXElement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.JSXEmptyExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.JSXExpressionContainer, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.JSXFragment, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.JSXIdentifier, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.JSXMemberExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.JSXNamespacedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.JSXOpeningElement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.JSXOpeningFragment, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.JSXSpreadAttribute, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.JSXSpreadChild, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.JSXText, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.LabeledStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.BigIntLiteral, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.BooleanLiteral, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.NullLiteral, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.NumberLiteral, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.RegExpLiteral, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.StringLiteral, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.LogicalExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.MemberExpressionComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.MemberExpressionNonComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.MetaProperty, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.MethodDefinitionComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.MethodDefinitionNonComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.NewExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ObjectExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ObjectPattern, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.PrivateIdentifier, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.PropertyComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.PropertyNonComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.PropertyDefinitionComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.PropertyDefinitionNonComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.RestElement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ReturnStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.SequenceExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.SpreadElement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.StaticBlock, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.Super, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.SwitchCase, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.SwitchStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TaggedTemplateExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TemplateElement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TemplateLiteral, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ThisExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ThrowStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TryStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSAbstractAccessorPropertyComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSAbstractAccessorPropertyNonComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSAbstractKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSAbstractMethodDefinitionComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSAbstractMethodDefinitionNonComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSAbstractPropertyDefinitionComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSAbstractPropertyDefinitionNonComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSAnyKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSArrayType, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSAsExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSAsyncKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSBigIntKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSBooleanKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSCallSignatureDeclaration, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSClassImplements, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSConditionalType, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSConstructorType, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSConstructSignatureDeclaration, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSDeclareFunctionNoDeclare, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSDeclareFunctionWithDeclare, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSDeclareKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSEmptyBodyFunctionExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSEnumDeclaration, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSEnumMemberComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSEnumMemberNonComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSExportAssignment, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSExportKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSExternalModuleReference, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSFunctionType, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSImportEqualsDeclaration, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSImportType, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSIndexedAccessType, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSIndexSignature, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSInferType, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSInstantiationExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSInterfaceBody, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSInterfaceDeclaration, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSInterfaceHeritage, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSIntersectionType, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSIntrinsicKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSLiteralType, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSMappedType, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSMethodSignatureComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSMethodSignatureNonComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSModuleBlock, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSModuleDeclarationGlobal, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSModuleDeclarationModuleWithIdentifierId, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSModuleDeclarationModuleWithStringIdDeclared, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSModuleDeclarationModuleWithStringIdNotDeclared, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSModuleDeclarationNamespace, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSNamedTupleMember, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSNamespaceExportDeclaration, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSNeverKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSNonNullExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSNullKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSNumberKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSObjectKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSOptionalType, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSParameterProperty, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSPrivateKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSPropertySignatureComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSPropertySignatureNonComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSProtectedKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSPublicKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSQualifiedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSReadonlyKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSRestType, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSSatisfiesExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSStaticKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSStringKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSSymbolKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSTemplateLiteralType, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSThisType, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSTupleType, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSTypeAliasDeclaration, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSTypeAnnotation, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSTypeAssertion, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSTypeLiteral, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSTypeOperator, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSTypeParameter, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSTypeParameterDeclaration, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSTypeParameterInstantiation, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSTypePredicate, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSTypeQuery, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSTypeReference, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSUndefinedKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSUnionType, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSUnknownKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSVoidKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.UnaryExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.UpdateExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.LetOrConstOrVarDeclaration, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.UsingInForOfDeclaration, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.UsingInNormalContextDeclaration, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.LetOrConstOrVarDeclarator, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.UsingInForOfDeclarator, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.UsingInNomalConextDeclarator, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.WhileStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.WithStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.YieldExpression, { | ||
type: NodeType; | ||
}>; | ||
export declare const isNodeOfTypes: <NodeTypes extends readonly AST_NODE_TYPES[]>(nodeTypes: NodeTypes) => (node: TSESTree.Node | null | undefined) => node is Extract<TSESTree.Program, { | ||
export declare const isNodeOfTypes: <NodeTypes extends readonly AST_NODE_TYPES[]>(nodeTypes: NodeTypes) => (node: TSESTree.Node | null | undefined) => node is Extract<TSESTree.Node, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.AccessorPropertyComputedName, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.AccessorPropertyNonComputedName, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.ArrayExpression, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.ArrayPattern, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.ArrowFunctionExpression, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.AssignmentExpression, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.AssignmentPattern, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.AwaitExpression, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.BinaryExpression, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.BlockStatement, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.BreakStatement, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.CallExpression, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.CatchClause, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.ChainExpression, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.ClassBody, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.ClassDeclarationWithName, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.ClassDeclarationWithOptionalName, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.ClassExpression, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.ConditionalExpression, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.ContinueStatement, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.DebuggerStatement, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.Decorator, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.DoWhileStatement, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.EmptyStatement, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.ExportAllDeclaration, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.ExportDefaultDeclaration, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.ExportNamedDeclarationWithoutSourceWithMultiple, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.ExportNamedDeclarationWithoutSourceWithSingle, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.ExportNamedDeclarationWithSource, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.ExportSpecifier, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.ExpressionStatement, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.ForInStatement, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.ForOfStatement, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.ForStatement, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.FunctionDeclarationWithName, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.FunctionDeclarationWithOptionalName, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.FunctionExpression, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.Identifier, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.IfStatement, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.ImportAttribute, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.ImportDeclaration, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.ImportDefaultSpecifier, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.ImportExpression, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.ImportNamespaceSpecifier, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.ImportSpecifier, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.JSXAttribute, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.JSXClosingElement, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.JSXClosingFragment, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.JSXElement, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.JSXEmptyExpression, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.JSXExpressionContainer, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.JSXFragment, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.JSXIdentifier, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.JSXMemberExpression, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.JSXNamespacedName, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.JSXOpeningElement, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.JSXOpeningFragment, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.JSXSpreadAttribute, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.JSXSpreadChild, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.JSXText, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.LabeledStatement, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.BigIntLiteral, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.BooleanLiteral, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.NullLiteral, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.NumberLiteral, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.RegExpLiteral, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.StringLiteral, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.LogicalExpression, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.MemberExpressionComputedName, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.MemberExpressionNonComputedName, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.MetaProperty, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.MethodDefinitionComputedName, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.MethodDefinitionNonComputedName, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.NewExpression, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.ObjectExpression, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.ObjectPattern, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.PrivateIdentifier, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.PropertyComputedName, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.PropertyNonComputedName, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.PropertyDefinitionComputedName, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.PropertyDefinitionNonComputedName, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.RestElement, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.ReturnStatement, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.SequenceExpression, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.SpreadElement, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.StaticBlock, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.Super, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.SwitchCase, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.SwitchStatement, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TaggedTemplateExpression, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TemplateElement, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TemplateLiteral, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.ThisExpression, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.ThrowStatement, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TryStatement, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSAbstractAccessorPropertyComputedName, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSAbstractAccessorPropertyNonComputedName, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSAbstractKeyword, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSAbstractMethodDefinitionComputedName, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSAbstractMethodDefinitionNonComputedName, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSAbstractPropertyDefinitionComputedName, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSAbstractPropertyDefinitionNonComputedName, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSAnyKeyword, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSArrayType, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSAsExpression, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSAsyncKeyword, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSBigIntKeyword, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSBooleanKeyword, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSCallSignatureDeclaration, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSClassImplements, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSConditionalType, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSConstructorType, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSConstructSignatureDeclaration, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSDeclareFunctionNoDeclare, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSDeclareFunctionWithDeclare, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSDeclareKeyword, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSEmptyBodyFunctionExpression, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSEnumDeclaration, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSEnumMemberComputedName, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSEnumMemberNonComputedName, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSExportAssignment, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSExportKeyword, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSExternalModuleReference, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSFunctionType, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSImportEqualsDeclaration, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSImportType, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSIndexedAccessType, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSIndexSignature, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSInferType, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSInstantiationExpression, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSInterfaceBody, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSInterfaceDeclaration, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSInterfaceHeritage, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSIntersectionType, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSIntrinsicKeyword, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSLiteralType, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSMappedType, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSMethodSignatureComputedName, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSMethodSignatureNonComputedName, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSModuleBlock, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSModuleDeclarationGlobal, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSModuleDeclarationModuleWithIdentifierId, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSModuleDeclarationModuleWithStringIdDeclared, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSModuleDeclarationModuleWithStringIdNotDeclared, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSModuleDeclarationNamespace, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSNamedTupleMember, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSNamespaceExportDeclaration, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSNeverKeyword, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSNonNullExpression, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSNullKeyword, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSNumberKeyword, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSObjectKeyword, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSOptionalType, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSParameterProperty, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSPrivateKeyword, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSPropertySignatureComputedName, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSPropertySignatureNonComputedName, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSProtectedKeyword, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSPublicKeyword, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSQualifiedName, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSReadonlyKeyword, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSRestType, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSSatisfiesExpression, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSStaticKeyword, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSStringKeyword, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSSymbolKeyword, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSTemplateLiteralType, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSThisType, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSTupleType, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSTypeAliasDeclaration, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSTypeAnnotation, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSTypeAssertion, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSTypeLiteral, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSTypeOperator, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSTypeParameter, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSTypeParameterDeclaration, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSTypeParameterInstantiation, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSTypePredicate, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSTypeQuery, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSTypeReference, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSUndefinedKeyword, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSUnionType, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSUnknownKeyword, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.TSVoidKeyword, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.UnaryExpression, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.UpdateExpression, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.LetOrConstOrVarDeclaration, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.UsingInForOfDeclaration, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.UsingInNormalContextDeclaration, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.LetOrConstOrVarDeclarator, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.UsingInForOfDeclarator, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.UsingInNomalConextDeclarator, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.WhileStatement, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.WithStatement, { | ||
type: NodeTypes[number]; | ||
}> | Extract<TSESTree.YieldExpression, { | ||
type: NodeTypes[number]; | ||
}>; | ||
export declare const isNodeOfTypeWithConditions: <NodeType extends AST_NODE_TYPES, ExtractedNode extends Extract<TSESTree.Program, { | ||
export declare const isNodeOfTypeWithConditions: <NodeType extends AST_NODE_TYPES, ExtractedNode extends Extract<TSESTree.Node, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.AccessorPropertyComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.AccessorPropertyNonComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ArrayExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ArrayPattern, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ArrowFunctionExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.AssignmentExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.AssignmentPattern, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.AwaitExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.BinaryExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.BlockStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.BreakStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.CallExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.CatchClause, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ChainExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ClassBody, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ClassDeclarationWithName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ClassDeclarationWithOptionalName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ClassExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ConditionalExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ContinueStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.DebuggerStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.Decorator, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.DoWhileStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.EmptyStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ExportAllDeclaration, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ExportDefaultDeclaration, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ExportNamedDeclarationWithoutSourceWithMultiple, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ExportNamedDeclarationWithoutSourceWithSingle, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ExportNamedDeclarationWithSource, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ExportSpecifier, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ExpressionStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ForInStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ForOfStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ForStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.FunctionDeclarationWithName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.FunctionDeclarationWithOptionalName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.FunctionExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.Identifier, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.IfStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ImportAttribute, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ImportDeclaration, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ImportDefaultSpecifier, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ImportExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ImportNamespaceSpecifier, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ImportSpecifier, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.JSXAttribute, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.JSXClosingElement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.JSXClosingFragment, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.JSXElement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.JSXEmptyExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.JSXExpressionContainer, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.JSXFragment, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.JSXIdentifier, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.JSXMemberExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.JSXNamespacedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.JSXOpeningElement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.JSXOpeningFragment, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.JSXSpreadAttribute, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.JSXSpreadChild, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.JSXText, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.LabeledStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.BigIntLiteral, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.BooleanLiteral, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.NullLiteral, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.NumberLiteral, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.RegExpLiteral, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.StringLiteral, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.LogicalExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.MemberExpressionComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.MemberExpressionNonComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.MetaProperty, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.MethodDefinitionComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.MethodDefinitionNonComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.NewExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ObjectExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ObjectPattern, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.PrivateIdentifier, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.PropertyComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.PropertyNonComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.PropertyDefinitionComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.PropertyDefinitionNonComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.RestElement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ReturnStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.SequenceExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.SpreadElement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.StaticBlock, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.Super, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.SwitchCase, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.SwitchStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TaggedTemplateExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TemplateElement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TemplateLiteral, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ThisExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.ThrowStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TryStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSAbstractAccessorPropertyComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSAbstractAccessorPropertyNonComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSAbstractKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSAbstractMethodDefinitionComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSAbstractMethodDefinitionNonComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSAbstractPropertyDefinitionComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSAbstractPropertyDefinitionNonComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSAnyKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSArrayType, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSAsExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSAsyncKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSBigIntKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSBooleanKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSCallSignatureDeclaration, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSClassImplements, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSConditionalType, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSConstructorType, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSConstructSignatureDeclaration, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSDeclareFunctionNoDeclare, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSDeclareFunctionWithDeclare, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSDeclareKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSEmptyBodyFunctionExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSEnumDeclaration, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSEnumMemberComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSEnumMemberNonComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSExportAssignment, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSExportKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSExternalModuleReference, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSFunctionType, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSImportEqualsDeclaration, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSImportType, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSIndexedAccessType, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSIndexSignature, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSInferType, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSInstantiationExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSInterfaceBody, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSInterfaceDeclaration, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSInterfaceHeritage, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSIntersectionType, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSIntrinsicKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSLiteralType, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSMappedType, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSMethodSignatureComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSMethodSignatureNonComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSModuleBlock, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSModuleDeclarationGlobal, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSModuleDeclarationModuleWithIdentifierId, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSModuleDeclarationModuleWithStringIdDeclared, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSModuleDeclarationModuleWithStringIdNotDeclared, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSModuleDeclarationNamespace, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSNamedTupleMember, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSNamespaceExportDeclaration, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSNeverKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSNonNullExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSNullKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSNumberKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSObjectKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSOptionalType, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSParameterProperty, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSPrivateKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSPropertySignatureComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSPropertySignatureNonComputedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSProtectedKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSPublicKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSQualifiedName, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSReadonlyKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSRestType, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSSatisfiesExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSStaticKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSStringKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSSymbolKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSTemplateLiteralType, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSThisType, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSTupleType, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSTypeAliasDeclaration, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSTypeAnnotation, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSTypeAssertion, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSTypeLiteral, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSTypeOperator, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSTypeParameter, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSTypeParameterDeclaration, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSTypeParameterInstantiation, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSTypePredicate, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSTypeQuery, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSTypeReference, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSUndefinedKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSUnionType, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSUnknownKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.TSVoidKeyword, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.UnaryExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.UpdateExpression, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.LetOrConstOrVarDeclaration, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.UsingInForOfDeclaration, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.UsingInNormalContextDeclaration, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.LetOrConstOrVarDeclarator, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.UsingInForOfDeclarator, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.UsingInNomalConextDeclarator, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.WhileStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.WithStatement, { | ||
type: NodeType; | ||
}> | Extract<TSESTree.YieldExpression, { | ||
type: NodeType; | ||
}>, Conditions extends Partial<ExtractedNode>>(nodeType: NodeType, conditions: Conditions) => ((node: TSESTree.Node | null | undefined) => node is Conditions & ExtractedNode); | ||
export declare const isTokenOfTypeWithConditions: <TokenType extends AST_TOKEN_TYPES, ExtractedToken extends Extract<TSESTree.BooleanToken, { | ||
export declare const isTokenOfTypeWithConditions: <TokenType extends AST_TOKEN_TYPES, ExtractedToken extends Extract<TSESTree.Token, { | ||
type: TokenType; | ||
}> | Extract<TSESTree.BlockComment, { | ||
type: TokenType; | ||
}> | Extract<TSESTree.LineComment, { | ||
type: TokenType; | ||
}> | Extract<TSESTree.IdentifierToken, { | ||
type: TokenType; | ||
}> | Extract<TSESTree.JSXIdentifierToken, { | ||
type: TokenType; | ||
}> | Extract<TSESTree.JSXTextToken, { | ||
type: TokenType; | ||
}> | Extract<TSESTree.KeywordToken, { | ||
type: TokenType; | ||
}> | Extract<TSESTree.NullToken, { | ||
type: TokenType; | ||
}> | Extract<TSESTree.NumericToken, { | ||
type: TokenType; | ||
}> | Extract<TSESTree.PunctuatorToken, { | ||
type: TokenType; | ||
}> | Extract<TSESTree.RegularExpressionToken, { | ||
type: TokenType; | ||
}> | Extract<TSESTree.StringToken, { | ||
type: TokenType; | ||
}> | Extract<TSESTree.TemplateToken, { | ||
type: TokenType; | ||
}>, Conditions extends Partial<TSESTree.Token & { | ||
type: TokenType; | ||
}>>(tokenType: TokenType, conditions: Conditions) => ((token: TSESTree.Token | null | undefined) => token is Conditions & ExtractedToken); | ||
export declare const isNotTokenOfTypeWithConditions: <TokenType extends AST_TOKEN_TYPES, ExtractedToken extends Extract<TSESTree.BooleanToken, { | ||
export declare const isNotTokenOfTypeWithConditions: <TokenType extends AST_TOKEN_TYPES, ExtractedToken extends Extract<TSESTree.Token, { | ||
type: TokenType; | ||
}> | Extract<TSESTree.BlockComment, { | ||
type: TokenType; | ||
}> | Extract<TSESTree.LineComment, { | ||
type: TokenType; | ||
}> | Extract<TSESTree.IdentifierToken, { | ||
type: TokenType; | ||
}> | Extract<TSESTree.JSXIdentifierToken, { | ||
type: TokenType; | ||
}> | Extract<TSESTree.JSXTextToken, { | ||
type: TokenType; | ||
}> | Extract<TSESTree.KeywordToken, { | ||
type: TokenType; | ||
}> | Extract<TSESTree.NullToken, { | ||
type: TokenType; | ||
}> | Extract<TSESTree.NumericToken, { | ||
type: TokenType; | ||
}> | Extract<TSESTree.PunctuatorToken, { | ||
type: TokenType; | ||
}> | Extract<TSESTree.RegularExpressionToken, { | ||
type: TokenType; | ||
}> | Extract<TSESTree.StringToken, { | ||
type: TokenType; | ||
}> | Extract<TSESTree.TemplateToken, { | ||
type: TokenType; | ||
}>, Conditions extends Partial<ExtractedToken>>(tokenType: TokenType, conditions: Conditions) => ((token: TSESTree.Token | null | undefined) => token is Exclude<TSESTree.Token, Conditions & ExtractedToken>); | ||
//# sourceMappingURL=helpers.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.LINEBREAK_MATCHER = exports.isTokenOnSameLine = void 0; | ||
exports.LINEBREAK_MATCHER = void 0; | ||
exports.isTokenOnSameLine = isTokenOnSameLine; | ||
const LINEBREAK_MATCHER = /\r\n|[\r\n\u2028\u2029]/; | ||
@@ -12,3 +13,2 @@ exports.LINEBREAK_MATCHER = LINEBREAK_MATCHER; | ||
} | ||
exports.isTokenOnSameLine = isTokenOnSameLine; | ||
//# sourceMappingURL=misc.js.map |
@@ -5,7 +5,11 @@ import type { TSESTree } from '../ts-estree'; | ||
} & TSESTree.PunctuatorToken; | ||
declare const isNotOptionalChainPunctuator: (token: TSESTree.Token | null | undefined) => token is TSESTree.BooleanToken | TSESTree.BlockComment | TSESTree.LineComment | TSESTree.IdentifierToken | TSESTree.JSXIdentifierToken | TSESTree.JSXTextToken | TSESTree.KeywordToken | TSESTree.NullToken | TSESTree.NumericToken | TSESTree.PunctuatorToken | TSESTree.RegularExpressionToken | TSESTree.StringToken | TSESTree.TemplateToken; | ||
declare const isNotOptionalChainPunctuator: (token: TSESTree.Token | null | undefined) => token is Exclude<TSESTree.Token, { | ||
value: "?."; | ||
} & TSESTree.PunctuatorToken>; | ||
declare const isNonNullAssertionPunctuator: (token: TSESTree.Token | null | undefined) => token is { | ||
value: "!"; | ||
} & TSESTree.PunctuatorToken; | ||
declare const isNotNonNullAssertionPunctuator: (token: TSESTree.Token | null | undefined) => token is TSESTree.BooleanToken | TSESTree.BlockComment | TSESTree.LineComment | TSESTree.IdentifierToken | TSESTree.JSXIdentifierToken | TSESTree.JSXTextToken | TSESTree.KeywordToken | TSESTree.NullToken | TSESTree.NumericToken | TSESTree.PunctuatorToken | TSESTree.RegularExpressionToken | TSESTree.StringToken | TSESTree.TemplateToken; | ||
declare const isNotNonNullAssertionPunctuator: (token: TSESTree.Token | null | undefined) => token is Exclude<TSESTree.Token, { | ||
value: "!"; | ||
} & TSESTree.PunctuatorToken>; | ||
/** | ||
@@ -28,14 +32,30 @@ * Returns true if and only if the node represents: foo?.() or foo.bar?.() | ||
*/ | ||
declare const isTypeAssertion: (node: TSESTree.Node | null | undefined) => node is TSESTree.TSAsExpression | TSESTree.TSTypeAssertion; | ||
declare const isVariableDeclarator: (node: TSESTree.Node | null | undefined) => node is TSESTree.LetOrConstOrVarDeclarator | TSESTree.UsingInForOfDeclarator | TSESTree.UsingInNomalConextDeclarator; | ||
declare const isFunction: (node: TSESTree.Node | null | undefined) => node is TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclarationWithName | TSESTree.FunctionDeclarationWithOptionalName | TSESTree.FunctionExpression; | ||
declare const isFunctionType: (node: TSESTree.Node | null | undefined) => node is TSESTree.TSCallSignatureDeclaration | TSESTree.TSConstructorType | TSESTree.TSConstructSignatureDeclaration | TSESTree.TSEmptyBodyFunctionExpression | TSESTree.TSFunctionType | TSESTree.TSMethodSignatureComputedName | TSESTree.TSMethodSignatureNonComputedName; | ||
declare const isFunctionOrFunctionType: (node: TSESTree.Node | null | undefined) => node is TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclarationWithName | TSESTree.FunctionDeclarationWithOptionalName | TSESTree.FunctionExpression | TSESTree.TSCallSignatureDeclaration | TSESTree.TSConstructorType | TSESTree.TSConstructSignatureDeclaration | TSESTree.TSEmptyBodyFunctionExpression | TSESTree.TSFunctionType | TSESTree.TSMethodSignatureComputedName | TSESTree.TSMethodSignatureNonComputedName; | ||
declare const isTSFunctionType: (node: TSESTree.Node | null | undefined) => node is TSESTree.TSFunctionType; | ||
declare const isTSConstructorType: (node: TSESTree.Node | null | undefined) => node is TSESTree.TSConstructorType; | ||
declare const isClassOrTypeElement: (node: TSESTree.Node | null | undefined) => node is TSESTree.FunctionExpression | TSESTree.MethodDefinitionComputedName | TSESTree.MethodDefinitionNonComputedName | TSESTree.PropertyDefinitionComputedName | TSESTree.PropertyDefinitionNonComputedName | TSESTree.TSAbstractMethodDefinitionComputedName | TSESTree.TSAbstractMethodDefinitionNonComputedName | TSESTree.TSAbstractPropertyDefinitionComputedName | TSESTree.TSAbstractPropertyDefinitionNonComputedName | TSESTree.TSCallSignatureDeclaration | TSESTree.TSConstructSignatureDeclaration | TSESTree.TSEmptyBodyFunctionExpression | TSESTree.TSIndexSignature | TSESTree.TSMethodSignatureComputedName | TSESTree.TSMethodSignatureNonComputedName | TSESTree.TSPropertySignatureComputedName | TSESTree.TSPropertySignatureNonComputedName; | ||
declare const isTypeAssertion: (node: TSESTree.Node | null | undefined) => node is Extract<TSESTree.Node, { | ||
type: TSESTree.AST_NODE_TYPES.TSAsExpression | TSESTree.AST_NODE_TYPES.TSTypeAssertion; | ||
}>; | ||
declare const isVariableDeclarator: (node: TSESTree.Node | null | undefined) => node is Extract<TSESTree.Node, { | ||
type: TSESTree.AST_NODE_TYPES.VariableDeclarator; | ||
}>; | ||
declare const isFunction: (node: TSESTree.Node | null | undefined) => node is Extract<TSESTree.Node, { | ||
type: TSESTree.AST_NODE_TYPES.ArrowFunctionExpression | TSESTree.AST_NODE_TYPES.FunctionDeclaration | TSESTree.AST_NODE_TYPES.FunctionExpression; | ||
}>; | ||
declare const isFunctionType: (node: TSESTree.Node | null | undefined) => node is Extract<TSESTree.Node, { | ||
type: TSESTree.AST_NODE_TYPES.TSCallSignatureDeclaration | TSESTree.AST_NODE_TYPES.TSConstructorType | TSESTree.AST_NODE_TYPES.TSConstructSignatureDeclaration | TSESTree.AST_NODE_TYPES.TSEmptyBodyFunctionExpression | TSESTree.AST_NODE_TYPES.TSFunctionType | TSESTree.AST_NODE_TYPES.TSMethodSignature; | ||
}>; | ||
declare const isFunctionOrFunctionType: (node: TSESTree.Node | null | undefined) => node is Extract<TSESTree.Node, { | ||
type: TSESTree.AST_NODE_TYPES.ArrowFunctionExpression | TSESTree.AST_NODE_TYPES.FunctionDeclaration | TSESTree.AST_NODE_TYPES.FunctionExpression | TSESTree.AST_NODE_TYPES.TSCallSignatureDeclaration | TSESTree.AST_NODE_TYPES.TSConstructorType | TSESTree.AST_NODE_TYPES.TSConstructSignatureDeclaration | TSESTree.AST_NODE_TYPES.TSEmptyBodyFunctionExpression | TSESTree.AST_NODE_TYPES.TSFunctionType | TSESTree.AST_NODE_TYPES.TSMethodSignature; | ||
}>; | ||
declare const isTSFunctionType: (node: TSESTree.Node | null | undefined) => node is Extract<TSESTree.Node, { | ||
type: TSESTree.AST_NODE_TYPES.TSFunctionType; | ||
}>; | ||
declare const isTSConstructorType: (node: TSESTree.Node | null | undefined) => node is Extract<TSESTree.Node, { | ||
type: TSESTree.AST_NODE_TYPES.TSConstructorType; | ||
}>; | ||
declare const isClassOrTypeElement: (node: TSESTree.Node | null | undefined) => node is Extract<TSESTree.Node, { | ||
type: TSESTree.AST_NODE_TYPES.FunctionExpression | TSESTree.AST_NODE_TYPES.MethodDefinition | TSESTree.AST_NODE_TYPES.PropertyDefinition | TSESTree.AST_NODE_TYPES.TSAbstractMethodDefinition | TSESTree.AST_NODE_TYPES.TSAbstractPropertyDefinition | TSESTree.AST_NODE_TYPES.TSCallSignatureDeclaration | TSESTree.AST_NODE_TYPES.TSConstructSignatureDeclaration | TSESTree.AST_NODE_TYPES.TSEmptyBodyFunctionExpression | TSESTree.AST_NODE_TYPES.TSIndexSignature | TSESTree.AST_NODE_TYPES.TSMethodSignature | TSESTree.AST_NODE_TYPES.TSPropertySignature; | ||
}>; | ||
/** | ||
* Checks if a node is a constructor method. | ||
*/ | ||
declare const isConstructor: (node: TSESTree.Node | null | undefined) => node is (Partial<TSESTree.MethodDefinitionComputedName> & TSESTree.MethodDefinitionComputedName) | (Partial<TSESTree.MethodDefinitionNonComputedName> & TSESTree.MethodDefinitionNonComputedName); | ||
declare const isConstructor: (node: TSESTree.Node | null | undefined) => node is Partial<TSESTree.MethodDefinitionComputedName | TSESTree.MethodDefinitionNonComputedName> & (TSESTree.MethodDefinitionComputedName | TSESTree.MethodDefinitionNonComputedName); | ||
/** | ||
@@ -47,7 +67,11 @@ * Checks if a node is a setter method. | ||
} & (TSESTree.MethodDefinition | TSESTree.Property); | ||
declare const isIdentifier: (node: TSESTree.Node | null | undefined) => node is TSESTree.Identifier; | ||
declare const isIdentifier: (node: TSESTree.Node | null | undefined) => node is Extract<TSESTree.Node, { | ||
type: TSESTree.AST_NODE_TYPES.Identifier; | ||
}>; | ||
/** | ||
* Checks if a node represents an `await …` expression. | ||
*/ | ||
declare const isAwaitExpression: (node: TSESTree.Node | null | undefined) => node is TSESTree.AwaitExpression; | ||
declare const isAwaitExpression: (node: TSESTree.Node | null | undefined) => node is Extract<TSESTree.Node, { | ||
type: TSESTree.AST_NODE_TYPES.AwaitExpression; | ||
}>; | ||
/** | ||
@@ -71,4 +95,6 @@ * Checks if a possible token is the `await` keyword. | ||
} & TSESTree.KeywordToken; | ||
declare const isLoop: (node: TSESTree.Node | null | undefined) => node is TSESTree.DoWhileStatement | TSESTree.ForInStatement | TSESTree.ForOfStatement | TSESTree.ForStatement | TSESTree.WhileStatement; | ||
declare const isLoop: (node: TSESTree.Node | null | undefined) => node is Extract<TSESTree.Node, { | ||
type: TSESTree.AST_NODE_TYPES.DoWhileStatement | TSESTree.AST_NODE_TYPES.ForInStatement | TSESTree.AST_NODE_TYPES.ForOfStatement | TSESTree.AST_NODE_TYPES.ForStatement | TSESTree.AST_NODE_TYPES.WhileStatement; | ||
}>; | ||
export { isAwaitExpression, isAwaitKeyword, isConstructor, isClassOrTypeElement, isFunction, isFunctionOrFunctionType, isFunctionType, isIdentifier, isImportKeyword, isLoop, isLogicalOrOperator, isNonNullAssertionPunctuator, isNotNonNullAssertionPunctuator, isNotOptionalChainPunctuator, isOptionalChainPunctuator, isOptionalCallExpression, isSetter, isTSConstructorType, isTSFunctionType, isTypeAssertion, isTypeKeyword, isVariableDeclarator, }; | ||
//# sourceMappingURL=predicates.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isVariableDeclarator = exports.isTypeKeyword = exports.isTypeAssertion = exports.isTSFunctionType = exports.isTSConstructorType = exports.isSetter = exports.isOptionalCallExpression = exports.isOptionalChainPunctuator = exports.isNotOptionalChainPunctuator = exports.isNotNonNullAssertionPunctuator = exports.isNonNullAssertionPunctuator = exports.isLogicalOrOperator = exports.isLoop = exports.isImportKeyword = exports.isIdentifier = exports.isFunctionType = exports.isFunctionOrFunctionType = exports.isFunction = exports.isClassOrTypeElement = exports.isConstructor = exports.isAwaitKeyword = exports.isAwaitExpression = void 0; | ||
exports.isVariableDeclarator = exports.isTypeKeyword = exports.isTypeAssertion = exports.isTSFunctionType = exports.isTSConstructorType = exports.isOptionalCallExpression = exports.isOptionalChainPunctuator = exports.isNotOptionalChainPunctuator = exports.isNotNonNullAssertionPunctuator = exports.isNonNullAssertionPunctuator = exports.isLogicalOrOperator = exports.isLoop = exports.isImportKeyword = exports.isIdentifier = exports.isFunctionType = exports.isFunctionOrFunctionType = exports.isFunction = exports.isClassOrTypeElement = exports.isConstructor = exports.isAwaitKeyword = exports.isAwaitExpression = void 0; | ||
exports.isSetter = isSetter; | ||
const ts_estree_1 = require("../ts-estree"); | ||
@@ -98,3 +99,2 @@ const helpers_1 = require("./helpers"); | ||
} | ||
exports.isSetter = isSetter; | ||
const isIdentifier = (0, helpers_1.isNodeOfType)(ts_estree_1.AST_NODE_TYPES.Identifier); | ||
@@ -101,0 +101,0 @@ exports.isIdentifier = isIdentifier; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.applyDefault = void 0; | ||
exports.applyDefault = applyDefault; | ||
const deepMerge_1 = require("./deepMerge"); | ||
@@ -33,3 +33,2 @@ /** | ||
} | ||
exports.applyDefault = applyDefault; | ||
//# sourceMappingURL=applyDefault.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getSourceCode = exports.getScope = exports.getFilename = exports.getDeclaredVariables = exports.getCwd = exports.getAncestors = void 0; | ||
exports.getAncestors = getAncestors; | ||
exports.getCwd = getCwd; | ||
exports.getDeclaredVariables = getDeclaredVariables; | ||
exports.getFilename = getFilename; | ||
exports.getScope = getScope; | ||
exports.getSourceCode = getSourceCode; | ||
/** @deprecated use `context.sourceCode.getAncestors(node)` */ | ||
@@ -8,3 +13,2 @@ function getAncestors(context) { | ||
} | ||
exports.getAncestors = getAncestors; | ||
/** @deprecated use `context.sourceCode.getCwd()` */ | ||
@@ -14,3 +18,2 @@ function getCwd(context) { | ||
} | ||
exports.getCwd = getCwd; | ||
/** @deprecated use `context.sourceCode.getDeclaredVariables(node)` */ | ||
@@ -20,3 +23,2 @@ function getDeclaredVariables(context, node) { | ||
} | ||
exports.getDeclaredVariables = getDeclaredVariables; | ||
/** @deprecated use `context.filename` */ | ||
@@ -26,3 +28,2 @@ function getFilename(context) { | ||
} | ||
exports.getFilename = getFilename; | ||
/** @deprecated use `context.sourceCode.getScope(node) */ | ||
@@ -32,3 +33,2 @@ function getScope(context) { | ||
} | ||
exports.getScope = getScope; | ||
/** @deprecated use `context.sourceCode` */ | ||
@@ -38,3 +38,2 @@ function getSourceCode(context) { | ||
} | ||
exports.getSourceCode = getSourceCode; | ||
//# sourceMappingURL=context.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isObjectNotArray = exports.deepMerge = void 0; | ||
exports.deepMerge = deepMerge; | ||
exports.isObjectNotArray = isObjectNotArray; | ||
/** | ||
@@ -11,3 +12,2 @@ * Check if the variable contains an object strictly rejecting arrays | ||
} | ||
exports.isObjectNotArray = isObjectNotArray; | ||
/** | ||
@@ -47,3 +47,2 @@ * Pure function - doesn't mutate either parameter! | ||
} | ||
exports.deepMerge = deepMerge; | ||
//# sourceMappingURL=deepMerge.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getParserServices = void 0; | ||
exports.getParserServices = getParserServices; | ||
const parserPathSeemsToBeTSESLint_1 = require("./parserPathSeemsToBeTSESLint"); | ||
@@ -30,3 +30,2 @@ const ERROR_MESSAGE_REQUIRES_PARSER_SERVICES = 'You have used a rule which requires parserServices to be generated. You must therefore provide a value for the "parserOptions.project" property for @typescript-eslint/parser.'; | ||
} | ||
exports.getParserServices = getParserServices; | ||
/* eslint-enable @typescript-eslint/unified-signatures */ | ||
@@ -33,0 +32,0 @@ function throwError(parserPath) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.NullThrowsReasons = exports.nullThrows = void 0; | ||
exports.NullThrowsReasons = void 0; | ||
exports.nullThrows = nullThrows; | ||
/** | ||
@@ -22,3 +23,2 @@ * A set of common reasons for calling nullThrows | ||
} | ||
exports.nullThrows = nullThrows; | ||
//# sourceMappingURL=nullThrows.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.parserPathSeemsToBeTSESLint = void 0; | ||
exports.parserPathSeemsToBeTSESLint = parserPathSeemsToBeTSESLint; | ||
function parserPathSeemsToBeTSESLint(parserPath) { | ||
return /(?:typescript-eslint|\.\.)[\w/\\]*parser/.test(parserPath); | ||
} | ||
exports.parserPathSeemsToBeTSESLint = parserPathSeemsToBeTSESLint; | ||
//# sourceMappingURL=parserPathSeemsToBeTSESLint.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.RuleCreator = void 0; | ||
exports.RuleCreator = RuleCreator; | ||
const applyDefault_1 = require("./applyDefault"); | ||
@@ -27,3 +27,2 @@ /** | ||
} | ||
exports.RuleCreator = RuleCreator; | ||
/** | ||
@@ -30,0 +29,0 @@ * Creates a well-typed TSESLint custom ESLint rule without a docs URL. |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isArray = void 0; | ||
exports.isArray = isArray; | ||
// https://github.com/microsoft/TypeScript/issues/17002 | ||
@@ -8,3 +8,2 @@ function isArray(arg) { | ||
} | ||
exports.isArray = isArray; | ||
//# sourceMappingURL=isArray.js.map |
{ | ||
"name": "@typescript-eslint/utils", | ||
"version": "7.13.2-alpha.2", | ||
"version": "7.13.2-alpha.3", | ||
"description": "Utilities for working with TypeScript + ESLint together", | ||
@@ -71,5 +71,5 @@ "files": [ | ||
"@eslint-community/eslint-utils": "^4.4.0", | ||
"@typescript-eslint/scope-manager": "7.13.2-alpha.2", | ||
"@typescript-eslint/types": "7.13.2-alpha.2", | ||
"@typescript-eslint/typescript-estree": "7.13.2-alpha.2" | ||
"@typescript-eslint/scope-manager": "7.13.2-alpha.3", | ||
"@typescript-eslint/types": "7.13.2-alpha.3", | ||
"@typescript-eslint/typescript-estree": "7.13.2-alpha.3" | ||
}, | ||
@@ -76,0 +76,0 @@ "peerDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
284408
4199
+ Added@typescript-eslint/scope-manager@7.13.2-alpha.3(transitive)
+ Added@typescript-eslint/types@7.13.2-alpha.3(transitive)
+ Added@typescript-eslint/typescript-estree@7.13.2-alpha.3(transitive)
+ Added@typescript-eslint/visitor-keys@7.13.2-alpha.3(transitive)
- Removed@typescript-eslint/scope-manager@7.13.2-alpha.2(transitive)
- Removed@typescript-eslint/types@7.13.2-alpha.2(transitive)
- Removed@typescript-eslint/typescript-estree@7.13.2-alpha.2(transitive)
- Removed@typescript-eslint/visitor-keys@7.13.2-alpha.2(transitive)