@tslite/parser 1.9.0 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +55 -0
- package/NOTICE +14 -0
- package/dist/_namespaces/ts.d.ts +18 -0
- package/dist/_namespaces/ts.js +21 -0
- package/dist/_namespaces/ts.performance.d.ts +1 -0
- package/dist/_namespaces/ts.performance.js +2 -0
- package/dist/core.d.ts +450 -0
- package/dist/core.js +1394 -0
- package/dist/corePublic.d.ts +62 -0
- package/dist/corePublic.js +31 -0
- package/dist/debug.d.ts +74 -0
- package/dist/debug.js +326 -0
- package/dist/diagnosticInformationMap.generated.d.ts +1435 -0
- package/dist/diagnosticInformationMap.generated.js +1441 -0
- package/dist/factory.d.ts +78 -0
- package/dist/factory.js +622 -0
- package/dist/factoryPublic.d.ts +314 -0
- package/dist/factoryPublic.js +1796 -0
- package/dist/index.d.ts +1 -249
- package/dist/index.js +4 -6
- package/dist/parser.d.ts +59 -0
- package/dist/parser.js +5075 -0
- package/dist/path.d.ts +312 -0
- package/dist/path.js +475 -0
- package/dist/perfLogger.d.ts +4 -0
- package/dist/perfLogger.js +38 -0
- package/dist/performance.d.ts +20 -0
- package/dist/performance.js +49 -0
- package/dist/performanceTimestamp.d.ts +2 -0
- package/dist/performanceTimestamp.js +2 -0
- package/dist/scanner.d.ts +80 -0
- package/dist/scanner.js +1984 -0
- package/dist/shims/mapShim.d.ts +23 -0
- package/dist/shims/mapShim.js +156 -0
- package/dist/types.d.ts +2626 -0
- package/dist/types.js +1074 -0
- package/dist/utilities.d.ts +473 -0
- package/dist/utilities.js +2632 -0
- package/dist/utilitiesPublic.d.ts +274 -0
- package/dist/utilitiesPublic.js +1049 -0
- package/dist/visitor.d.ts +15 -0
- package/dist/visitor.js +64 -0
- package/dist/visitorPublic.d.ts +82 -0
- package/dist/visitorPublic.js +352 -0
- package/package.json +14 -42
- package/dist/index.cjs +0 -6
- package/dist/index.d.cts +0 -249
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
import { ModifierFlags, NodeFlags, SyntaxKind } from "./_namespaces/ts.js";
|
|
2
|
+
import type { ArrayBindingElement, ArrayBindingPattern, ArrayLiteralExpression, ArrayTypeNode, ArrowFunction, AsExpression, AssertionExpression, AssignmentPattern, AwaitExpression, BigIntLiteral, BinaryExpression, BindingElement, BindingName, BindingOrAssignmentElement, BindingPattern, Block, BreakOrContinueStatement, CallChain, CallExpression, CallLikeExpression, CallSignatureDeclaration, CaseBlock, CaseClause, CaseOrDefaultClause, CatchClause, CompilerOptions, ComputedPropertyName, ConciseBody, ConditionalTypeNode, Declaration, DeclarationName, DeclarationWithTypeParameters, DefaultClause, DeleteExpression, Diagnostic, ElementAccessChain, ElementAccessExpression, EmptyStatement, EntityName, ExportAssignment, ExportDeclaration, ExportSpecifier, Expression, ExpressionStatement, ForInOrOfStatement, ForInStatement, ForInitializer, ForOfStatement, FunctionLikeDeclaration, FunctionTypeNode, GeneratedIdentifier, HasInitializer, HasType, Identifier, IfStatement, ImportClause, ImportDeclaration, ImportSpecifier, ImportTypeNode, IndexSignatureDeclaration, IndexedAccessTypeNode, InferTypeNode, IterationStatement, JsxAttribute, JsxAttributeLike, JsxAttributes, JsxChild, JsxClosingElement, JsxClosingFragment, JsxElement, JsxExpression, JsxOpeningElement, JsxOpeningFragment, JsxOpeningLikeElement, JsxSelfClosingElement, JsxSpreadAttribute, JsxTagNameExpression, JsxText, LeftHandSideExpression, LiteralExpression, LiteralTypeNode, MappedTypeNode, MetaProperty, MethodSignature, Modifier, ModuleBlock, ModuleBody, ModuleDeclaration, NamedDeclaration, NamedExportBindings, NamedExports, NamedImportBindings, NamedImports, NamespaceExport, NamespaceImport, NoSubstitutionTemplateLiteral, Node, NodeArray, NotEmittedStatement, NumericLiteral, ObjectBindingPattern, ObjectLiteralElement, ObjectLiteralElementLike, ObjectLiteralExpression, OmittedExpression, OptionalChain, OptionalChainRoot, ParameterDeclaration, ParenthesizedExpression, ParenthesizedTypeNode, PostfixUnaryExpression, PrefixUnaryExpression, PropertyAccessChain, PropertyAccessExpression, PropertyAssignment, PropertyName, PropertySignature, QualifiedName, ReturnStatement, ShorthandPropertyAssignment, SignatureDeclaration, SortedReadonlyArray, SourceFile, SpreadAssignment, SpreadElement, Statement, StringLiteral, StringLiteralLike, SwitchStatement, Symbol, SyntaxList, TemplateHead, TemplateLiteral, TemplateMiddle, TemplateSpan, TemplateTail, TextChangeRange, TextSpan, ThrowStatement, TryStatement, TypeAliasDeclaration, TypeElement, TypeLiteralNode, TypeNode, TypeOfExpression, TypeOnlyCompatibleAliasDeclaration, TypeOperatorNode, TypeParameterDeclaration, TypePredicateNode, TypeQueryNode, TypeReferenceNode, UnaryExpression, UnionTypeNode, UnparsedNode, UnparsedPrepend, UnparsedSource, UnparsedTextLike, VariableDeclaration, VariableDeclarationList, VariableStatement, __String } from "./_namespaces/ts.js";
|
|
3
|
+
export declare function isExternalModuleNameRelative(moduleName: string): boolean;
|
|
4
|
+
export declare function sortAndDeduplicateDiagnostics<T extends Diagnostic>(diagnostics: readonly T[]): SortedReadonlyArray<T>;
|
|
5
|
+
export declare function getDefaultLibFileName(options: CompilerOptions): string;
|
|
6
|
+
export declare function textSpanEnd(span: TextSpan): number;
|
|
7
|
+
export declare function textSpanIsEmpty(span: TextSpan): boolean;
|
|
8
|
+
export declare function textSpanContainsPosition(span: TextSpan, position: number): boolean;
|
|
9
|
+
export declare function textSpanIntersectsWith(span: TextSpan, start: number, length: number): boolean;
|
|
10
|
+
export declare function decodedTextSpanIntersectsWith(start1: number, length1: number, start2: number, length2: number): boolean;
|
|
11
|
+
export declare function textSpanIntersectsWithPosition(span: TextSpan, position: number): boolean;
|
|
12
|
+
export declare function createTextSpan(start: number, length: number): TextSpan;
|
|
13
|
+
export declare function createTextSpanFromBounds(start: number, end: number): TextSpan;
|
|
14
|
+
export declare function textChangeRangeNewSpan(range: TextChangeRange): TextSpan;
|
|
15
|
+
export declare function textChangeRangeIsUnchanged(range: TextChangeRange): boolean;
|
|
16
|
+
export declare function createTextChangeRange(span: TextSpan, newLength: number): TextChangeRange;
|
|
17
|
+
export declare function isEmptyBindingPattern(node: BindingName): node is BindingPattern;
|
|
18
|
+
export declare function isEmptyBindingElement(node: BindingElement | ArrayBindingElement): boolean;
|
|
19
|
+
export declare function walkUpBindingElementsAndPatterns(binding: BindingElement): VariableDeclaration | ParameterDeclaration;
|
|
20
|
+
export declare function getCombinedModifierFlags(node: Declaration): ModifierFlags;
|
|
21
|
+
export declare function getCombinedNodeFlags(node: Node): NodeFlags;
|
|
22
|
+
export declare function getOriginalNode(node: Node): Node;
|
|
23
|
+
export declare function getOriginalNode<T extends Node>(node: Node, nodeTest: (node: Node) => node is T): T;
|
|
24
|
+
export declare function getOriginalNode(node: Node | undefined): Node | undefined;
|
|
25
|
+
export declare function getOriginalNode<T extends Node>(node: Node | undefined, nodeTest: (node: Node) => node is T): T | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Gets a value indicating whether a node originated in the parse tree.
|
|
28
|
+
*
|
|
29
|
+
* @param node The node to test.
|
|
30
|
+
*/
|
|
31
|
+
export declare function isParseTreeNode(node: Node): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Gets the original parse tree node for a node.
|
|
34
|
+
*
|
|
35
|
+
* @param node The original node.
|
|
36
|
+
* @returns The original parse tree node if found; otherwise, undefined.
|
|
37
|
+
*/
|
|
38
|
+
export declare function getParseTreeNode(node: Node): Node;
|
|
39
|
+
/**
|
|
40
|
+
* Gets the original parse tree node for a node.
|
|
41
|
+
*
|
|
42
|
+
* @param node The original node.
|
|
43
|
+
* @param nodeTest A callback used to ensure the correct type of parse tree node is returned.
|
|
44
|
+
* @returns The original parse tree node if found; otherwise, undefined.
|
|
45
|
+
*/
|
|
46
|
+
export declare function getParseTreeNode<T extends Node>(node: Node | undefined, nodeTest?: (node: Node) => node is T): T | undefined;
|
|
47
|
+
/** Add an extra underscore to identifiers that start with two underscores to avoid issues with magic names like '__proto__' */
|
|
48
|
+
export declare function escapeLeadingUnderscores(identifier: string): __String;
|
|
49
|
+
/**
|
|
50
|
+
* Remove extra underscore from escaped identifier text content.
|
|
51
|
+
*
|
|
52
|
+
* @param identifier The escaped identifier text.
|
|
53
|
+
* @returns The unescaped identifier text.
|
|
54
|
+
*/
|
|
55
|
+
export declare function unescapeLeadingUnderscores(identifier: __String): string;
|
|
56
|
+
export declare function idText(identifierOrPrivateName: Identifier): string;
|
|
57
|
+
export declare function symbolName(symbol: Symbol): string;
|
|
58
|
+
export declare function nodeHasName(statement: Node, name: Identifier): boolean;
|
|
59
|
+
export declare function isNamedDeclaration(node: Node): node is NamedDeclaration & {
|
|
60
|
+
name: DeclarationName;
|
|
61
|
+
};
|
|
62
|
+
export declare function getNonAssignedNameOfDeclaration(declaration: Declaration | Expression): DeclarationName | undefined;
|
|
63
|
+
export declare function getNameOfDeclaration(declaration: Declaration | Expression): DeclarationName | undefined;
|
|
64
|
+
/** Os parâmetros de tipo que a declaração escreve. */
|
|
65
|
+
export declare function getEffectiveTypeParameterDeclarations(node: DeclarationWithTypeParameters): readonly TypeParameterDeclaration[];
|
|
66
|
+
/** A constraint que o parâmetro de tipo escreve. */
|
|
67
|
+
export declare function getEffectiveConstraintOfTypeParameter(node: TypeParameterDeclaration): TypeNode | undefined;
|
|
68
|
+
export declare function isNumericLiteral(node: Node): node is NumericLiteral;
|
|
69
|
+
export declare function isBigIntLiteral(node: Node): node is BigIntLiteral;
|
|
70
|
+
export declare function isStringLiteral(node: Node): node is StringLiteral;
|
|
71
|
+
export declare function isJsxText(node: Node): node is JsxText;
|
|
72
|
+
export declare function isTemplateHead(node: Node): node is TemplateHead;
|
|
73
|
+
export declare function isTemplateTail(node: Node): node is TemplateTail;
|
|
74
|
+
export declare function isIdentifier(node: Node): node is Identifier;
|
|
75
|
+
export declare function isQualifiedName(node: Node): node is QualifiedName;
|
|
76
|
+
export declare function isComputedPropertyName(node: Node): node is ComputedPropertyName;
|
|
77
|
+
export declare function isTypeParameterDeclaration(node: Node): node is TypeParameterDeclaration;
|
|
78
|
+
export declare function isParameter(node: Node): node is ParameterDeclaration;
|
|
79
|
+
export declare function isPropertySignature(node: Node): node is PropertySignature;
|
|
80
|
+
export declare function isMethodSignature(node: Node): node is MethodSignature;
|
|
81
|
+
export declare function isCallSignatureDeclaration(node: Node): node is CallSignatureDeclaration;
|
|
82
|
+
export declare function isIndexSignatureDeclaration(node: Node): node is IndexSignatureDeclaration;
|
|
83
|
+
export declare function isTypePredicateNode(node: Node): node is TypePredicateNode;
|
|
84
|
+
export declare function isTypeReferenceNode(node: Node): node is TypeReferenceNode;
|
|
85
|
+
export declare function isFunctionTypeNode(node: Node): node is FunctionTypeNode;
|
|
86
|
+
export declare function isTypeQueryNode(node: Node): node is TypeQueryNode;
|
|
87
|
+
export declare function isTypeLiteralNode(node: Node): node is TypeLiteralNode;
|
|
88
|
+
export declare function isArrayTypeNode(node: Node): node is ArrayTypeNode;
|
|
89
|
+
export declare function isUnionTypeNode(node: Node): node is UnionTypeNode;
|
|
90
|
+
export declare function isConditionalTypeNode(node: Node): node is ConditionalTypeNode;
|
|
91
|
+
export declare function isInferTypeNode(node: Node): node is InferTypeNode;
|
|
92
|
+
export declare function isParenthesizedTypeNode(node: Node): node is ParenthesizedTypeNode;
|
|
93
|
+
export declare function isTypeOperatorNode(node: Node): node is TypeOperatorNode;
|
|
94
|
+
export declare function isIndexedAccessTypeNode(node: Node): node is IndexedAccessTypeNode;
|
|
95
|
+
export declare function isMappedTypeNode(node: Node): node is MappedTypeNode;
|
|
96
|
+
export declare function isLiteralTypeNode(node: Node): node is LiteralTypeNode;
|
|
97
|
+
export declare function isImportTypeNode(node: Node): node is ImportTypeNode;
|
|
98
|
+
export declare function isObjectBindingPattern(node: Node): node is ObjectBindingPattern;
|
|
99
|
+
export declare function isArrayBindingPattern(node: Node): node is ArrayBindingPattern;
|
|
100
|
+
export declare function isBindingElement(node: Node): node is BindingElement;
|
|
101
|
+
export declare function isArrayLiteralExpression(node: Node): node is ArrayLiteralExpression;
|
|
102
|
+
export declare function isObjectLiteralExpression(node: Node): node is ObjectLiteralExpression;
|
|
103
|
+
export declare function isPropertyAccessExpression(node: Node): node is PropertyAccessExpression;
|
|
104
|
+
export declare function isPropertyAccessChain(node: Node): node is PropertyAccessChain;
|
|
105
|
+
export declare function isElementAccessExpression(node: Node): node is ElementAccessExpression;
|
|
106
|
+
export declare function isCallExpression(node: Node): node is CallExpression;
|
|
107
|
+
export declare function isCallChain(node: Node): node is CallChain;
|
|
108
|
+
export declare function isOptionalChain(node: Node): node is PropertyAccessChain | ElementAccessChain | CallChain;
|
|
109
|
+
export declare function isOptionalChainRoot(node: Node): node is OptionalChainRoot;
|
|
110
|
+
/**
|
|
111
|
+
* Determines whether a node is the expression preceding an optional chain (i.e. `a` in `a?.b`).
|
|
112
|
+
*/
|
|
113
|
+
export declare function isExpressionOfOptionalChainRoot(node: Node): node is Expression & {
|
|
114
|
+
parent: OptionalChainRoot;
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* Determines whether a node is the outermost `OptionalChain` in an ECMAScript `OptionalExpression`:
|
|
118
|
+
*
|
|
119
|
+
* 1. For `a?.b.c`, the outermost chain is `a?.b.c` (`c` is the end of the chain starting at `a?.`)
|
|
120
|
+
* 2. For `a?.b!`, the outermost chain is `a?.b` (`b` is the end of the chain starting at `a?.`)
|
|
121
|
+
* 3. For `(a?.b.c).d`, the outermost chain is `a?.b.c` (`c` is the end of the chain starting at `a?.` since parens end the chain)
|
|
122
|
+
* 4. For `a?.b.c?.d`, both `a?.b.c` and `a?.b.c?.d` are outermost (`c` is the end of the chain starting at `a?.`, and `d` is
|
|
123
|
+
* the end of the chain starting at `c?.`)
|
|
124
|
+
* 5. For `a?.(b?.c).d`, both `b?.c` and `a?.(b?.c)d` are outermost (`c` is the end of the chain starting at `b`, and `d` is
|
|
125
|
+
* the end of the chain starting at `a?.`)
|
|
126
|
+
*/
|
|
127
|
+
export declare function isOutermostOptionalChain(node: OptionalChain): boolean;
|
|
128
|
+
export declare function isNullishCoalesce(node: Node): boolean;
|
|
129
|
+
export declare function isParenthesizedExpression(node: Node): node is ParenthesizedExpression;
|
|
130
|
+
export declare function skipPartiallyEmittedExpressions(node: Expression): Expression;
|
|
131
|
+
export declare function skipPartiallyEmittedExpressions(node: Node): Node;
|
|
132
|
+
export declare function isArrowFunction(node: Node): node is ArrowFunction;
|
|
133
|
+
export declare function isDeleteExpression(node: Node): node is DeleteExpression;
|
|
134
|
+
export declare function isTypeOfExpression(node: Node): node is TypeOfExpression;
|
|
135
|
+
export declare function isAwaitExpression(node: Node): node is AwaitExpression;
|
|
136
|
+
export declare function isPrefixUnaryExpression(node: Node): node is PrefixUnaryExpression;
|
|
137
|
+
export declare function isBinaryExpression(node: Node): node is BinaryExpression;
|
|
138
|
+
export declare function isSpreadElement(node: Node): node is SpreadElement;
|
|
139
|
+
export declare function isOmittedExpression(node: Node): node is OmittedExpression;
|
|
140
|
+
export declare function isAsExpression(node: Node): node is AsExpression;
|
|
141
|
+
export declare function isMetaProperty(node: Node): node is MetaProperty;
|
|
142
|
+
export declare function isTemplateSpan(node: Node): node is TemplateSpan;
|
|
143
|
+
export declare function isBlock(node: Node): node is Block;
|
|
144
|
+
export declare function isVariableStatement(node: Node): node is VariableStatement;
|
|
145
|
+
export declare function isEmptyStatement(node: Node): node is EmptyStatement;
|
|
146
|
+
export declare function isExpressionStatement(node: Node): node is ExpressionStatement;
|
|
147
|
+
export declare function isIfStatement(node: Node): node is IfStatement;
|
|
148
|
+
export declare function isForInStatement(node: Node): node is ForInStatement;
|
|
149
|
+
export declare function isForOfStatement(node: Node): node is ForOfStatement;
|
|
150
|
+
export declare function isBreakOrContinueStatement(node: Node): node is BreakOrContinueStatement;
|
|
151
|
+
export declare function isReturnStatement(node: Node): node is ReturnStatement;
|
|
152
|
+
export declare function isSwitchStatement(node: Node): node is SwitchStatement;
|
|
153
|
+
export declare function isThrowStatement(node: Node): node is ThrowStatement;
|
|
154
|
+
export declare function isTryStatement(node: Node): node is TryStatement;
|
|
155
|
+
export declare function isVariableDeclaration(node: Node): node is VariableDeclaration;
|
|
156
|
+
export declare function isVariableDeclarationList(node: Node): node is VariableDeclarationList;
|
|
157
|
+
export declare function isTypeAliasDeclaration(node: Node): node is TypeAliasDeclaration;
|
|
158
|
+
export declare function isModuleDeclaration(node: Node): node is ModuleDeclaration;
|
|
159
|
+
export declare function isModuleBlock(node: Node): node is ModuleBlock;
|
|
160
|
+
export declare function isCaseBlock(node: Node): node is CaseBlock;
|
|
161
|
+
export declare function isImportDeclaration(node: Node): node is ImportDeclaration;
|
|
162
|
+
export declare function isImportClause(node: Node): node is ImportClause;
|
|
163
|
+
export declare function isNamespaceImport(node: Node): node is NamespaceImport;
|
|
164
|
+
export declare function isNamespaceExport(node: Node): node is NamespaceExport;
|
|
165
|
+
export declare function isNamedExportBindings(node: Node): node is NamedExportBindings;
|
|
166
|
+
export declare function isNamedImports(node: Node): node is NamedImports;
|
|
167
|
+
export declare function isImportSpecifier(node: Node): node is ImportSpecifier;
|
|
168
|
+
export declare function isExportAssignment(node: Node): node is ExportAssignment;
|
|
169
|
+
export declare function isExportDeclaration(node: Node): node is ExportDeclaration;
|
|
170
|
+
export declare function isNamedExports(node: Node): node is NamedExports;
|
|
171
|
+
export declare function isExportSpecifier(node: Node): node is ExportSpecifier;
|
|
172
|
+
export declare function isJsxElement(node: Node): node is JsxElement;
|
|
173
|
+
export declare function isJsxSelfClosingElement(node: Node): node is JsxSelfClosingElement;
|
|
174
|
+
export declare function isJsxOpeningElement(node: Node): node is JsxOpeningElement;
|
|
175
|
+
export declare function isJsxClosingElement(node: Node): node is JsxClosingElement;
|
|
176
|
+
export declare function isJsxOpeningFragment(node: Node): node is JsxOpeningFragment;
|
|
177
|
+
export declare function isJsxClosingFragment(node: Node): node is JsxClosingFragment;
|
|
178
|
+
export declare function isJsxAttribute(node: Node): node is JsxAttribute;
|
|
179
|
+
export declare function isJsxAttributes(node: Node): node is JsxAttributes;
|
|
180
|
+
export declare function isJsxSpreadAttribute(node: Node): node is JsxSpreadAttribute;
|
|
181
|
+
export declare function isJsxExpression(node: Node): node is JsxExpression;
|
|
182
|
+
export declare function isCaseClause(node: Node): node is CaseClause;
|
|
183
|
+
export declare function isDefaultClause(node: Node): node is DefaultClause;
|
|
184
|
+
export declare function isCatchClause(node: Node): node is CatchClause;
|
|
185
|
+
export declare function isPropertyAssignment(node: Node): node is PropertyAssignment;
|
|
186
|
+
export declare function isShorthandPropertyAssignment(node: Node): node is ShorthandPropertyAssignment;
|
|
187
|
+
export declare function isSpreadAssignment(node: Node): node is SpreadAssignment;
|
|
188
|
+
export declare function isSourceFile(node: Node): node is SourceFile;
|
|
189
|
+
export declare function isUnparsedSource(node: Node): node is UnparsedSource;
|
|
190
|
+
export declare function isUnparsedPrepend(node: Node): node is UnparsedPrepend;
|
|
191
|
+
export declare function isUnparsedTextLike(node: Node): node is UnparsedTextLike;
|
|
192
|
+
export declare function isUnparsedNode(node: Node): node is UnparsedNode;
|
|
193
|
+
export declare function isSyntaxList(n: Node): n is SyntaxList;
|
|
194
|
+
export declare function isNodeKind(kind: SyntaxKind): boolean;
|
|
195
|
+
/**
|
|
196
|
+
* True if node is of some token syntax kind.
|
|
197
|
+
* For example, this is true for an IfKeyword but not for an IfStatement.
|
|
198
|
+
* Literals are considered tokens, except TemplateLiteral, but does include TemplateHead/Middle/Tail.
|
|
199
|
+
*/
|
|
200
|
+
export declare function isToken(n: Node): boolean;
|
|
201
|
+
export declare function isNodeArray<T extends Node>(array: readonly T[]): array is NodeArray<T>;
|
|
202
|
+
export declare function isLiteralKind(kind: SyntaxKind): boolean;
|
|
203
|
+
export declare function isLiteralExpression(node: Node): node is LiteralExpression;
|
|
204
|
+
export declare function isTemplateLiteralKind(kind: SyntaxKind): boolean;
|
|
205
|
+
export type TemplateLiteralToken = NoSubstitutionTemplateLiteral | TemplateHead | TemplateMiddle | TemplateTail;
|
|
206
|
+
export declare function isTemplateMiddleOrTemplateTail(node: Node): node is TemplateMiddle | TemplateTail;
|
|
207
|
+
export declare function isImportOrExportSpecifier(node: Node): node is ImportSpecifier | ExportSpecifier;
|
|
208
|
+
export declare function isTypeOnlyImportOrExportDeclaration(node: Node): node is TypeOnlyCompatibleAliasDeclaration;
|
|
209
|
+
export declare function isStringTextContainingNode(node: Node): node is StringLiteral | TemplateLiteralToken;
|
|
210
|
+
export declare function isGeneratedIdentifier(node: Node): node is GeneratedIdentifier;
|
|
211
|
+
export declare function isModifierKind(token: SyntaxKind): token is Modifier["kind"];
|
|
212
|
+
export declare function isModifier(node: Node): node is Modifier;
|
|
213
|
+
export declare function isEntityName(node: Node): node is EntityName;
|
|
214
|
+
export declare function isPropertyName(node: Node): node is PropertyName;
|
|
215
|
+
export declare function isBindingName(node: Node): node is BindingName;
|
|
216
|
+
export declare function isFunctionLike(node: Node): node is SignatureDeclaration;
|
|
217
|
+
export declare function isFunctionLikeDeclaration(node: Node): node is FunctionLikeDeclaration;
|
|
218
|
+
export declare function isFunctionLikeKind(kind: SyntaxKind): boolean;
|
|
219
|
+
export declare function isFunctionOrModuleBlock(node: Node): boolean;
|
|
220
|
+
export declare function isTypeElement(node: Node): node is TypeElement;
|
|
221
|
+
export declare function isObjectLiteralElementLike(node: Node): node is ObjectLiteralElementLike;
|
|
222
|
+
/**
|
|
223
|
+
* Node test that determines whether a node is a valid type node.
|
|
224
|
+
* This differs from the `isPartOfTypeNode` function which determines whether a node is *part*
|
|
225
|
+
* of a TypeNode.
|
|
226
|
+
*/
|
|
227
|
+
export declare function isTypeNode(node: Node): node is TypeNode;
|
|
228
|
+
export declare function isBindingPattern(node: Node | undefined): node is BindingPattern;
|
|
229
|
+
export declare function isAssignmentPattern(node: Node): node is AssignmentPattern;
|
|
230
|
+
export declare function isArrayBindingElement(node: Node): node is ArrayBindingElement;
|
|
231
|
+
/**
|
|
232
|
+
* Determines whether the BindingOrAssignmentElement is a BindingElement-like declaration
|
|
233
|
+
*/
|
|
234
|
+
export declare function isDeclarationBindingElement(bindingElement: BindingOrAssignmentElement): bindingElement is VariableDeclaration | ParameterDeclaration | BindingElement;
|
|
235
|
+
export declare function isPropertyAccessOrQualifiedNameOrImportTypeNode(node: Node): node is PropertyAccessExpression | QualifiedName | ImportTypeNode;
|
|
236
|
+
export declare function isPropertyAccessOrQualifiedName(node: Node): node is PropertyAccessExpression | QualifiedName;
|
|
237
|
+
export declare function isCallLikeExpression(node: Node): node is CallLikeExpression;
|
|
238
|
+
/** A chamada. Na tag, também o `new` (CK-02). */
|
|
239
|
+
export declare function isCallOrNewExpression(node: Node): node is CallExpression;
|
|
240
|
+
export declare function isTemplateLiteral(node: Node): node is TemplateLiteral;
|
|
241
|
+
export declare function isLeftHandSideExpression(node: Node): node is LeftHandSideExpression;
|
|
242
|
+
export declare function isUnaryExpression(node: Node): node is UnaryExpression;
|
|
243
|
+
export declare function isUnaryExpressionWithWrite(expr: Node): expr is PrefixUnaryExpression | PostfixUnaryExpression;
|
|
244
|
+
/**
|
|
245
|
+
* Determines whether a node is an expression based only on its kind.
|
|
246
|
+
* Use `isExpressionNode` if not in transforms.
|
|
247
|
+
*/
|
|
248
|
+
export declare function isExpression(node: Node): node is Expression;
|
|
249
|
+
export declare function isAssertionExpression(node: Node): node is AssertionExpression;
|
|
250
|
+
export declare function isNotEmittedStatement(node: Node): node is NotEmittedStatement;
|
|
251
|
+
export declare function isIterationStatement(node: Node): node is IterationStatement;
|
|
252
|
+
export declare function isForInOrOfStatement(node: Node): node is ForInOrOfStatement;
|
|
253
|
+
export declare function isConciseBody(node: Node): node is ConciseBody;
|
|
254
|
+
export declare function isForInitializer(node: Node): node is ForInitializer;
|
|
255
|
+
export declare function isModuleBody(node: Node): node is ModuleBody;
|
|
256
|
+
export declare function isNamedImportBindings(node: Node): node is NamedImportBindings;
|
|
257
|
+
export declare function isDeclaration(node: Node): node is NamedDeclaration;
|
|
258
|
+
/**
|
|
259
|
+
* Determines whether the node is a statement that is not also a declaration
|
|
260
|
+
*/
|
|
261
|
+
export declare function isStatementButNotDeclaration(node: Node): node is Statement;
|
|
262
|
+
export declare function isStatement(node: Node): node is Statement;
|
|
263
|
+
export declare function isJsxTagNameExpression(node: Node): node is JsxTagNameExpression;
|
|
264
|
+
export declare function isJsxChild(node: Node): node is JsxChild;
|
|
265
|
+
export declare function isJsxAttributeLike(node: Node): node is JsxAttributeLike;
|
|
266
|
+
export declare function isStringLiteralOrJsxExpression(node: Node): node is StringLiteral | JsxExpression;
|
|
267
|
+
export declare function isJsxOpeningLikeElement(node: Node): node is JsxOpeningLikeElement;
|
|
268
|
+
export declare function isCaseOrDefaultClause(node: Node): node is CaseOrDefaultClause;
|
|
269
|
+
/** True if has type node attached to it. */
|
|
270
|
+
export declare function hasType(node: Node): node is HasType;
|
|
271
|
+
/** True if has initializer node attached to it. */
|
|
272
|
+
export declare function hasInitializer(node: Node): node is HasInitializer;
|
|
273
|
+
export declare function isObjectLiteralElement(node: Node): node is ObjectLiteralElement;
|
|
274
|
+
export declare function isStringLiteralLike(node: Node): node is StringLiteralLike;
|