@tslite/parser 1.10.0 → 1.13.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,473 @@
|
|
|
1
|
+
import { AssignmentDeclarationKind, CharacterCodes, Comparison, EmitFlags, Extension, Map, ModifierFlags, ScriptKind, SymbolFlags, SyntaxKind } from "./_namespaces/ts.js";
|
|
2
|
+
import type { AccessExpression, AmbientModuleDeclaration, AnyImportOrReExport, AnyImportSyntax, AnyValidImportOrReExport, AssignmentExpression, AssignmentOperatorToken, BinaryExpression, BindableObjectDefinePropertyCall, BindableStaticAccessExpression, BindableStaticElementAccessExpression, BindableStaticNameExpression, Block, CallExpression, CallLikeExpression, CompilerOptions, Declaration, DeclarationName, DeclarationWithTypeParameterChildren, DeclarationWithTypeParameters, Diagnostic, DiagnosticMessage, DiagnosticMessageChain, DiagnosticRelatedInformation, DiagnosticWithLocation, DynamicNamedBinaryExpression, DynamicNamedDeclaration, ElementAccessExpression, EntityName, EntityNameExpression, EntityNameOrEntityNameExpression, EqualityComparer, EqualsToken, ExportAssignment, ExportDeclaration, Expression, FunctionLikeDeclaration, GetCanonicalFileName, HasExpressionInitializer, Identifier, ImportCall, ImportDeclaration, ImportMetaProperty, ImportTypeNode, JsonSourceFile, LateVisibilityPaintedStatement, LiteralImportTypeNode, LiteralLikeElementAccessExpression, LiteralLikeNode, MapLike, ModuleDeclaration, NamedImportsOrExports, Node, NodeArray, NumericLiteral, ObjectLiteralElement, ObjectTypeDeclaration, ParameterDeclaration, PrefixUnaryExpression, PrologueDirective, PropertyAccessEntityNameExpression, PropertyAccessExpression, PropertyName, PseudoBigInt, QualifiedName, ReadonlyMap, ReadonlyUnderscoreEscapedMap, RequireOrImportCall, ResolvedModuleFull, ReturnStatement, SignatureDeclaration, SourceFile, SourceFileLike, SourceMapSource, Statement, StringLiteralLike, Symbol, SymbolTable, TextRange, TextSpan, Token, TypeElement, TypeNode, TypeParameterDeclaration, TypeReferenceNode, UnderscoreEscapedMap, VariableDeclaration, VariableDeclarationList, VariableLikeDeclaration, WellKnownSymbolExpression, __String } from "./_namespaces/ts.js";
|
|
3
|
+
export declare const defaultMaximumTruncationLength = 160;
|
|
4
|
+
export declare const noTruncationMaximumTruncationLength = 1000000;
|
|
5
|
+
export declare function getDeclarationOfKind<T extends Declaration>(symbol: Symbol, kind: T["kind"]): T | undefined;
|
|
6
|
+
/** Create a new escaped identifier map. */
|
|
7
|
+
export declare function createUnderscoreEscapedMap<T>(): UnderscoreEscapedMap<T>;
|
|
8
|
+
export declare function hasEntries(map: ReadonlyUnderscoreEscapedMap<any> | undefined): map is ReadonlyUnderscoreEscapedMap<any>;
|
|
9
|
+
export declare function createSymbolTable(symbols?: readonly Symbol[]): SymbolTable;
|
|
10
|
+
/**
|
|
11
|
+
* Iterates through the parent chain of a node and performs the callback on each parent until the callback
|
|
12
|
+
* returns a truthy value, then returns that value.
|
|
13
|
+
* If no such value is found, it applies the callback until the parent pointer is undefined or the callback returns "quit"
|
|
14
|
+
* At that point findAncestor returns undefined.
|
|
15
|
+
*/
|
|
16
|
+
export declare function findAncestor<T extends Node>(node: Node | undefined, callback: (element: Node) => element is T): T | undefined;
|
|
17
|
+
export declare function findAncestor(node: Node | undefined, callback: (element: Node) => boolean | "quit"): Node | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Calls `callback` for each entry in the map, returning the first truthy result.
|
|
20
|
+
* Use `map.forEach` instead for normal iteration.
|
|
21
|
+
*/
|
|
22
|
+
export declare function forEachEntry<T, U>(map: ReadonlyUnderscoreEscapedMap<T>, callback: (value: T, key: __String) => U | undefined): U | undefined;
|
|
23
|
+
export declare function forEachEntry<T, U>(map: ReadonlyMap<T>, callback: (value: T, key: string) => U | undefined): U | undefined;
|
|
24
|
+
/** `forEachEntry` for just keys. */
|
|
25
|
+
export declare function forEachKey<T>(map: ReadonlyUnderscoreEscapedMap<unknown>, callback: (key: __String) => T | undefined): T | undefined;
|
|
26
|
+
export declare function forEachKey<T>(map: ReadonlyMap<unknown>, callback: (key: string) => T | undefined): T | undefined;
|
|
27
|
+
/** Copy entries from `source` to `target`. */
|
|
28
|
+
export declare function copyEntries<T>(source: ReadonlyUnderscoreEscapedMap<T>, target: UnderscoreEscapedMap<T>): void;
|
|
29
|
+
export declare function copyEntries<T>(source: ReadonlyMap<T>, target: Map<T>): void;
|
|
30
|
+
/** O conjunto dos elementos de um array, ou das chaves que o `makeKey` dá a eles. */
|
|
31
|
+
export declare function arrayToSet(array: readonly string[]): Map<true>;
|
|
32
|
+
export declare function arrayToSet<T>(array: readonly T[], makeKey: (value: T) => string | undefined): Map<true>;
|
|
33
|
+
export declare function arrayToSet<T>(array: readonly T[], makeKey: (value: T) => __String | undefined): UnderscoreEscapedMap<true>;
|
|
34
|
+
export declare function cloneMap(map: SymbolTable): SymbolTable;
|
|
35
|
+
export declare function cloneMap<T>(map: ReadonlyMap<T>): Map<T>;
|
|
36
|
+
export declare function cloneMap<T>(map: ReadonlyUnderscoreEscapedMap<T>): UnderscoreEscapedMap<T>;
|
|
37
|
+
export declare function getFullWidth(node: Node): number;
|
|
38
|
+
export declare function getResolvedModule(sourceFile: SourceFile | undefined, moduleNameText: string): ResolvedModuleFull | undefined;
|
|
39
|
+
export declare function setResolvedModule(sourceFile: SourceFile, moduleNameText: string, resolvedModule: ResolvedModuleFull): void;
|
|
40
|
+
export declare function containsParseError(node: Node): boolean;
|
|
41
|
+
/** O id do nó, dado na primeira vez que alguém pede: indexa as tabelas laterais do binder e do checker. */
|
|
42
|
+
export declare function getNodeId(node: Node): number;
|
|
43
|
+
export declare function getSourceFileOfNode(node: Node): SourceFile;
|
|
44
|
+
export declare function getSourceFileOfNode(node: Node | undefined): SourceFile | undefined;
|
|
45
|
+
export declare function getStartPositionOfLine(line: number, sourceFile: SourceFileLike): number;
|
|
46
|
+
export declare function getEndLinePosition(line: number, sourceFile: SourceFileLike): number;
|
|
47
|
+
export declare function nodeIsMissing(node: Node | undefined): boolean;
|
|
48
|
+
export declare function nodeIsPresent(node: Node | undefined): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Determine if the given comment is a triple-slash
|
|
51
|
+
*
|
|
52
|
+
* @return true if the comment is a triple-slash comment else false
|
|
53
|
+
*/
|
|
54
|
+
export declare function isRecognizedTripleSlashComment(text: string, commentPos: number, commentEnd: number): boolean;
|
|
55
|
+
export declare function isPinnedComment(text: string, start: number): boolean;
|
|
56
|
+
export declare function getTokenPosOfNode(node: Node, sourceFile?: SourceFileLike): number;
|
|
57
|
+
export declare function getSourceTextOfNodeFromSourceFile(sourceFile: SourceFile, node: Node, includeTrivia?: boolean): string;
|
|
58
|
+
export declare function getTextOfNodeFromSourceText(sourceText: string, node: Node, includeTrivia?: boolean): string;
|
|
59
|
+
export declare function getTextOfNode(node: Node, includeTrivia?: boolean): string;
|
|
60
|
+
/**
|
|
61
|
+
* Note: it is expected that the `nodeArray` and the `node` are within the same file.
|
|
62
|
+
* For example, searching for a `SourceFile` in a `SourceFile[]` wouldn't work.
|
|
63
|
+
*/
|
|
64
|
+
export declare function indexOfNode(nodeArray: readonly Node[], node: Node): number;
|
|
65
|
+
/**
|
|
66
|
+
* Gets flags that control emit behavior of a node.
|
|
67
|
+
*/
|
|
68
|
+
export declare function getEmitFlags(node: Node): EmitFlags;
|
|
69
|
+
export declare function getLiteralText(node: LiteralLikeNode, sourceFile: SourceFile, neverAsciiEscape: boolean | undefined, jsxAttributeEscape: boolean): string;
|
|
70
|
+
export declare function makeIdentifierFromModuleName(moduleName: string): string;
|
|
71
|
+
export declare function isBlockOrCatchScoped(declaration: Declaration): boolean;
|
|
72
|
+
export declare function isCatchClauseVariableDeclarationOrBindingElement(declaration: Declaration): boolean;
|
|
73
|
+
/** O módulo ambiente é só o `declare global`: o de nome em string (`declare module "x"`) saiu (CK-02, princípio 4). */
|
|
74
|
+
export declare function isAmbientModule(node: Node): node is AmbientModuleDeclaration;
|
|
75
|
+
/**
|
|
76
|
+
* An effective module (namespace) declaration is either
|
|
77
|
+
* 1. An actual declaration: namespace X { ... }
|
|
78
|
+
* 2. A Javascript declaration, which is:
|
|
79
|
+
* An identifier in a nested property access expression: Y in `X.Y.Z = { ... }`
|
|
80
|
+
*/
|
|
81
|
+
export declare function isEffectiveModuleDeclaration(node: Node): node is Identifier | ModuleDeclaration;
|
|
82
|
+
export declare function isGlobalScopeAugmentation(module: ModuleDeclaration): boolean;
|
|
83
|
+
export declare function isExternalModuleAugmentation(node: Node): node is AmbientModuleDeclaration;
|
|
84
|
+
export declare function isModuleAugmentationExternal(node: AmbientModuleDeclaration): boolean;
|
|
85
|
+
export declare function getNonAugmentationDeclaration(symbol: Symbol): Declaration | undefined;
|
|
86
|
+
export declare function isBlockScope(node: Node, parentNode: Node): boolean;
|
|
87
|
+
/** Na tag, também o callback, o typedef e a assinatura do JSDoc, que têm parâmetros de tipo sem filhos (CK-03). */
|
|
88
|
+
export declare function isDeclarationWithTypeParameters(node: Node): node is DeclarationWithTypeParameters;
|
|
89
|
+
export declare function isDeclarationWithTypeParameterChildren(node: Node): node is DeclarationWithTypeParameterChildren;
|
|
90
|
+
export declare function isAnyImportSyntax(node: Node): node is AnyImportSyntax;
|
|
91
|
+
export declare function isLateVisibilityPaintedStatement(node: Node): node is LateVisibilityPaintedStatement;
|
|
92
|
+
export declare function isAnyImportOrReExport(node: Node): node is AnyImportOrReExport;
|
|
93
|
+
export declare function getEnclosingBlockScopeContainer(node: Node): Node;
|
|
94
|
+
export declare function declarationNameToString(name: DeclarationName | QualifiedName | undefined): string;
|
|
95
|
+
export declare function isComputedNonLiteralName(name: PropertyName): boolean;
|
|
96
|
+
export declare function createDiagnosticForNode(node: Node, message: DiagnosticMessage, arg0?: string | number, arg1?: string | number, arg2?: string | number, arg3?: string | number): DiagnosticWithLocation;
|
|
97
|
+
export declare function createDiagnosticForNodeArray(sourceFile: SourceFile, nodes: NodeArray<Node>, message: DiagnosticMessage, arg0?: string | number, arg1?: string | number, arg2?: string | number, arg3?: string | number): DiagnosticWithLocation;
|
|
98
|
+
export declare function createDiagnosticForNodeInSourceFile(sourceFile: SourceFile, node: Node, message: DiagnosticMessage, arg0?: string | number, arg1?: string | number, arg2?: string | number, arg3?: string | number): DiagnosticWithLocation;
|
|
99
|
+
export declare function createDiagnosticForNodeFromMessageChain(node: Node, messageChain: DiagnosticMessageChain, relatedInformation?: DiagnosticRelatedInformation[]): DiagnosticWithLocation;
|
|
100
|
+
export declare function createDiagnosticForRange(sourceFile: SourceFile, range: TextRange, message: DiagnosticMessage): DiagnosticWithLocation;
|
|
101
|
+
export declare function getSpanOfTokenAtPosition(sourceFile: SourceFile, pos: number): TextSpan;
|
|
102
|
+
export declare function getErrorSpanForNode(sourceFile: SourceFile, node: Node): TextSpan;
|
|
103
|
+
export declare function isExternalOrCommonJsModule(file: SourceFile): boolean;
|
|
104
|
+
export declare function isJsonSourceFile(file: SourceFile): file is JsonSourceFile;
|
|
105
|
+
export declare function isDeclarationReadonly(declaration: Declaration): boolean;
|
|
106
|
+
export declare function isVarConst(node: VariableDeclaration | VariableDeclarationList): boolean;
|
|
107
|
+
export declare function isLet(node: Node): boolean;
|
|
108
|
+
export declare function isImportCall(n: Node): n is ImportCall;
|
|
109
|
+
export declare function isImportMeta(n: Node): n is ImportMetaProperty;
|
|
110
|
+
export declare function isLiteralImportTypeNode(n: Node): n is LiteralImportTypeNode;
|
|
111
|
+
export declare function isPrologueDirective(node: Node): node is PrologueDirective;
|
|
112
|
+
export declare function isCustomPrologue(node: Statement): boolean;
|
|
113
|
+
export declare function isHoistedVariableStatement(node: Statement): boolean;
|
|
114
|
+
export declare function getLeadingCommentRangesOfNode(node: Node, sourceFileOfNode: SourceFile): import("./types.js").CommentRange[] | undefined;
|
|
115
|
+
export declare function isPartOfTypeNode(node: Node): boolean;
|
|
116
|
+
export declare function forEachReturnStatement<T>(body: Block, visitor: (stmt: ReturnStatement) => T): T | undefined;
|
|
117
|
+
export declare function getMembersOfDeclaration(node: Declaration): NodeArray<TypeElement | ObjectLiteralElement> | undefined;
|
|
118
|
+
export declare function isVariableLike(node: Node): node is VariableLikeDeclaration;
|
|
119
|
+
export declare function isFunctionBlock(node: Node): boolean;
|
|
120
|
+
export declare function getContainingFunction(node: Node): SignatureDeclaration | undefined;
|
|
121
|
+
export declare function getContainingFunctionDeclaration(node: Node): FunctionLikeDeclaration | undefined;
|
|
122
|
+
export declare function getThisContainer(node: Node, includeArrowFunctions: boolean): Node;
|
|
123
|
+
export declare function getImmediatelyInvokedFunctionExpression(func: Node): CallExpression | undefined;
|
|
124
|
+
/** O nome de uma referência de tipo. Na tag, também o de um `extends` ou de um `implements` (CK-02). */
|
|
125
|
+
export declare function getEntityNameFromTypeNode(node: TypeNode): EntityNameOrEntityNameExpression | undefined;
|
|
126
|
+
/** A expressão chamada: a de uma chamada, ou a tag de um elemento JSX. Na tag, também a de um template marcado (CK-02). */
|
|
127
|
+
export declare function getInvokedExpression(node: CallLikeExpression): Expression;
|
|
128
|
+
export declare function isJSXTagName(node: Node): boolean;
|
|
129
|
+
export declare function isExpressionNode(node: Node): boolean;
|
|
130
|
+
export declare function isInExpressionContext(node: Node): boolean;
|
|
131
|
+
export declare function isPartOfTypeQuery(node: Node): boolean;
|
|
132
|
+
export declare function isSourceFileJS(file: SourceFile): boolean;
|
|
133
|
+
export declare function isInJSFile(node: Node | undefined): boolean;
|
|
134
|
+
/**
|
|
135
|
+
* Returns true if the node is a CallExpression to the identifier 'require' with
|
|
136
|
+
* exactly one argument (of the form 'require("name")').
|
|
137
|
+
* This function does not test if the node is in a JavaScript file or not.
|
|
138
|
+
*/
|
|
139
|
+
export declare function isRequireCall(callExpression: Node, requireStringLiteralLikeArgument: true): callExpression is RequireOrImportCall & {
|
|
140
|
+
expression: Identifier;
|
|
141
|
+
arguments: [StringLiteralLike];
|
|
142
|
+
};
|
|
143
|
+
export declare function isRequireCall(callExpression: Node, requireStringLiteralLikeArgument: boolean): callExpression is CallExpression;
|
|
144
|
+
export declare function isSingleOrDoubleQuote(charCode: number): charCode is CharacterCodes.doubleQuote | CharacterCodes.singleQuote;
|
|
145
|
+
export declare function isStringDoubleQuoted(str: StringLiteralLike, sourceFile: SourceFile): boolean;
|
|
146
|
+
export declare function isAssignmentDeclaration(decl: Declaration): decl is Identifier | CallExpression | PropertyAccessExpression | BinaryExpression;
|
|
147
|
+
export declare function getEffectiveInitializer(node: HasExpressionInitializer): Expression | undefined;
|
|
148
|
+
/**
|
|
149
|
+
* Os inicializadores de expando reconhecidos: a arrow chamada na hora (`(() => {})()`), a arrow, o object literal vazio
|
|
150
|
+
* e, quando inicializa um protótipo, o object literal com membros.
|
|
151
|
+
*
|
|
152
|
+
* Devolve o inicializador, ou `undefined` se ele não for um desses.
|
|
153
|
+
*/
|
|
154
|
+
export declare function getExpandoInitializer(initializer: Node, isPrototypeAssignment: boolean): Expression | undefined;
|
|
155
|
+
export declare function isDefaultedExpandoInitializer(node: BinaryExpression): boolean | undefined;
|
|
156
|
+
export declare function isExportsIdentifier(node: Node): boolean;
|
|
157
|
+
export declare function isModuleIdentifier(node: Node): boolean;
|
|
158
|
+
export declare function isModuleExportsAccessExpression(node: Node): node is LiteralLikeElementAccessExpression & {
|
|
159
|
+
expression: Identifier;
|
|
160
|
+
};
|
|
161
|
+
export declare function getAssignmentDeclarationKind(expr: BinaryExpression | CallExpression): AssignmentDeclarationKind;
|
|
162
|
+
export declare function isBindableObjectDefinePropertyCall(expr: CallExpression): expr is BindableObjectDefinePropertyCall;
|
|
163
|
+
/** x.y OR x[0] */
|
|
164
|
+
export declare function isLiteralLikeAccess(node: Node): node is LiteralLikeElementAccessExpression | PropertyAccessExpression;
|
|
165
|
+
/** x[0] OR x['a'] OR x[Symbol.y] */
|
|
166
|
+
export declare function isLiteralLikeElementAccess(node: Node): node is LiteralLikeElementAccessExpression;
|
|
167
|
+
/** Any series of property and element accesses. */
|
|
168
|
+
export declare function isBindableStaticAccessExpression(node: Node): node is BindableStaticAccessExpression;
|
|
169
|
+
/** Any series of property and element accesses, ending in a literal element access */
|
|
170
|
+
export declare function isBindableStaticElementAccessExpression(node: Node): node is BindableStaticElementAccessExpression;
|
|
171
|
+
export declare function isBindableStaticNameExpression(node: Node): node is BindableStaticNameExpression;
|
|
172
|
+
export declare function getNameOrArgument(expr: PropertyAccessExpression | LiteralLikeElementAccessExpression): Identifier | (Expression & (NumericLiteral | StringLiteralLike | WellKnownSymbolExpression));
|
|
173
|
+
/**
|
|
174
|
+
* Does not handle signed numeric names like `a[+0]` - handling those would require handling prefix unary expressions
|
|
175
|
+
* throughout late binding handling as well, which is awkward (but ultimately probably doable if there is demand)
|
|
176
|
+
*/
|
|
177
|
+
export declare function getElementOrPropertyAccessArgumentExpressionOrName(node: AccessExpression): Identifier | StringLiteralLike | NumericLiteral | ElementAccessExpression | undefined;
|
|
178
|
+
export declare function getElementOrPropertyAccessName(node: LiteralLikeElementAccessExpression | PropertyAccessExpression): __String;
|
|
179
|
+
export declare function getElementOrPropertyAccessName(node: AccessExpression): __String | undefined;
|
|
180
|
+
export declare function getAssignmentDeclarationPropertyAccessKind(lhs: AccessExpression): AssignmentDeclarationKind;
|
|
181
|
+
export declare function getInitializerOfBinaryExpression(expr: BinaryExpression): Expression;
|
|
182
|
+
export declare function setValueDeclaration(symbol: Symbol, node: Declaration): void;
|
|
183
|
+
export declare function importFromModuleSpecifier(node: StringLiteralLike): AnyValidImportOrReExport;
|
|
184
|
+
export declare function tryGetImportFromModuleSpecifier(node: StringLiteralLike): AnyValidImportOrReExport | undefined;
|
|
185
|
+
export declare function getExternalModuleName(node: AnyImportOrReExport | ImportTypeNode): Expression | undefined;
|
|
186
|
+
/** Na tag, também o `import =` (CK-03), que nunca é import default. */
|
|
187
|
+
export declare function isDefaultImport(node: ImportDeclaration | ExportDeclaration): boolean;
|
|
188
|
+
export declare function hasQuestionToken(node: Node): boolean;
|
|
189
|
+
/** Na tag, também o inicializador de uma propriedade de classe (CK-02). */
|
|
190
|
+
export declare function getSingleInitializerOfVariableStatementOrPropertyDeclaration(node: Node): Expression | undefined;
|
|
191
|
+
export declare function hasRestParameter(s: SignatureDeclaration): boolean;
|
|
192
|
+
export declare function isRestParameter(node: ParameterDeclaration): boolean;
|
|
193
|
+
export declare enum AssignmentKind {
|
|
194
|
+
None = 0,
|
|
195
|
+
Definite = 1,
|
|
196
|
+
Compound = 2
|
|
197
|
+
}
|
|
198
|
+
export declare function getAssignmentTargetKind(node: Node): AssignmentKind;
|
|
199
|
+
export declare function isAssignmentTarget(node: Node): boolean;
|
|
200
|
+
export declare function walkUpParenthesizedExpressions(node: Node): Node;
|
|
201
|
+
export declare function skipParentheses(node: Expression): Expression;
|
|
202
|
+
export declare function skipParentheses(node: Node): Node;
|
|
203
|
+
export declare function isDeleteTarget(node: Node): boolean;
|
|
204
|
+
export declare function isNodeDescendantOf(node: Node, ancestor: Node | undefined): boolean;
|
|
205
|
+
export declare function isDeclarationName(name: Node): boolean;
|
|
206
|
+
/**
|
|
207
|
+
* A declaração de que o nome é o nome. Na tag, também o parâmetro do JSDoc num nome qualificado (CK-03) e o nome
|
|
208
|
+
* `#private` (CK-02).
|
|
209
|
+
*/
|
|
210
|
+
export declare function getDeclarationFromName(name: Node): Declaration | undefined;
|
|
211
|
+
export declare function isLiteralComputedPropertyDeclarationName(node: Node): boolean;
|
|
212
|
+
export declare function isIdentifierName(node: Identifier): boolean;
|
|
213
|
+
/**
|
|
214
|
+
* A declaração que cria um símbolo alias: `import x from`, `import * as x from`, `import { a as x } from`,
|
|
215
|
+
* `export { a as x }`, `export * as x from`, `export default` de um nome, e o shorthand e a propriedade de objeto cujo
|
|
216
|
+
* valor é um nome.
|
|
217
|
+
*/
|
|
218
|
+
export declare function isAliasSymbolDeclaration(node: Node): boolean;
|
|
219
|
+
export declare function getAliasDeclarationFromName(node: EntityName): Declaration | undefined;
|
|
220
|
+
export declare function isAliasableExpression(e: Expression): e is EntityNameExpression;
|
|
221
|
+
export declare function exportAssignmentIsAlias(node: ExportAssignment | BinaryExpression): boolean;
|
|
222
|
+
export declare function getExportAssignmentExpression(node: ExportAssignment | BinaryExpression): Expression;
|
|
223
|
+
export declare function getAncestor(node: Node | undefined, kind: SyntaxKind): Node | undefined;
|
|
224
|
+
export declare function isKeyword(token: SyntaxKind): boolean;
|
|
225
|
+
export declare function isContextualKeyword(token: SyntaxKind): boolean;
|
|
226
|
+
export declare function isNonContextualKeyword(token: SyntaxKind): boolean;
|
|
227
|
+
export declare function isStringANonContextualKeyword(name: string): boolean;
|
|
228
|
+
export declare function isIdentifierANonContextualKeyword({ originalKeywordKind }: Identifier): boolean;
|
|
229
|
+
export type TriviaKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia;
|
|
230
|
+
export declare function isTrivia(token: SyntaxKind): token is TriviaKind;
|
|
231
|
+
export declare enum FunctionFlags {
|
|
232
|
+
Normal = 0,// Function is a normal function
|
|
233
|
+
Async = 2,// Function is an async function
|
|
234
|
+
Invalid = 4
|
|
235
|
+
}
|
|
236
|
+
export declare function getFunctionFlags(node: SignatureDeclaration | undefined): FunctionFlags;
|
|
237
|
+
export declare function isAsyncFunction(node: Node): boolean;
|
|
238
|
+
export declare function isStringOrNumericLiteralLike(node: Node): node is StringLiteralLike | NumericLiteral;
|
|
239
|
+
export declare function isSignedNumericLiteral(node: Node): node is PrefixUnaryExpression & {
|
|
240
|
+
operand: NumericLiteral;
|
|
241
|
+
};
|
|
242
|
+
/**
|
|
243
|
+
* A declaration has a dynamic name if all of the following are true:
|
|
244
|
+
* 1. The declaration has a computed property name.
|
|
245
|
+
* 2. The computed name is *not* expressed as a StringLiteral.
|
|
246
|
+
* 3. The computed name is *not* expressed as a NumericLiteral.
|
|
247
|
+
* 4. The computed name is *not* expressed as a PlusToken or MinusToken
|
|
248
|
+
* immediately followed by a NumericLiteral.
|
|
249
|
+
* 5. The computed name is *not* expressed as `Symbol.<name>`, where `<name>`
|
|
250
|
+
* is a property of the Symbol constructor that denotes a built-in
|
|
251
|
+
* Symbol.
|
|
252
|
+
*/
|
|
253
|
+
export declare function hasDynamicName(declaration: Declaration): declaration is DynamicNamedDeclaration | DynamicNamedBinaryExpression;
|
|
254
|
+
export declare function isDynamicName(name: DeclarationName): boolean;
|
|
255
|
+
/**
|
|
256
|
+
* Checks if the expression is of the form:
|
|
257
|
+
* Symbol.name
|
|
258
|
+
* where Symbol is literally the word "Symbol", and name is any identifierName
|
|
259
|
+
*/
|
|
260
|
+
export declare function isWellKnownSymbolSyntactically(node: Node): node is WellKnownSymbolExpression;
|
|
261
|
+
export declare function getPropertyNameForPropertyNameNode(name: PropertyName): __String | undefined;
|
|
262
|
+
export type PropertyNameLiteral = Identifier | StringLiteralLike | NumericLiteral;
|
|
263
|
+
export declare function isPropertyNameLiteral(node: Node): node is PropertyNameLiteral;
|
|
264
|
+
export declare function getTextOfIdentifierOrLiteral(node: PropertyNameLiteral): string;
|
|
265
|
+
export declare function getEscapedTextOfIdentifierOrLiteral(node: PropertyNameLiteral): __String;
|
|
266
|
+
export declare function getPropertyNameForKnownSymbolName(symbolName: string): __String;
|
|
267
|
+
export declare function isKnownSymbol(symbol: Symbol): boolean;
|
|
268
|
+
/**
|
|
269
|
+
* Includes the word "Symbol" with unicode escapes
|
|
270
|
+
*/
|
|
271
|
+
export declare function isESSymbolIdentifier(node: Node): boolean;
|
|
272
|
+
export declare function isParameterDeclaration(node: Node): boolean;
|
|
273
|
+
export declare function getRootDeclaration(node: Node): Node;
|
|
274
|
+
export declare function nodeIsSynthesized(range: TextRange): boolean;
|
|
275
|
+
export declare enum Associativity {
|
|
276
|
+
Left = 0,
|
|
277
|
+
Right = 1
|
|
278
|
+
}
|
|
279
|
+
export declare function getExpressionAssociativity(expression: Expression): Associativity;
|
|
280
|
+
export declare function getOperatorAssociativity(kind: SyntaxKind, operator: SyntaxKind): Associativity;
|
|
281
|
+
export declare function getExpressionPrecedence(expression: Expression): number;
|
|
282
|
+
export declare function getOperator(expression: Expression): SyntaxKind;
|
|
283
|
+
export declare function getOperatorPrecedence(nodeKind: SyntaxKind, operatorKind: SyntaxKind): number;
|
|
284
|
+
export declare function getBinaryOperatorPrecedence(kind: SyntaxKind): number;
|
|
285
|
+
/**
|
|
286
|
+
* Based heavily on the abstract 'Quote'/'QuoteJSONString' operation from ECMA-262 (24.3.2.2),
|
|
287
|
+
* but augmented for a few select characters (e.g. lineSeparator, paragraphSeparator, nextLine)
|
|
288
|
+
* Note that this doesn't actually wrap the input in double quotes.
|
|
289
|
+
*/
|
|
290
|
+
export declare function escapeString(s: string, quoteChar?: CharacterCodes.doubleQuote | CharacterCodes.singleQuote | CharacterCodes.backtick): string;
|
|
291
|
+
export declare function escapeNonAsciiString(s: string, quoteChar?: CharacterCodes.doubleQuote | CharacterCodes.singleQuote | CharacterCodes.backtick): string;
|
|
292
|
+
export declare function escapeJsxAttributeString(s: string, quoteChar?: CharacterCodes.doubleQuote | CharacterCodes.singleQuote): string;
|
|
293
|
+
/** O texto sem as aspas simples, as duplas ou as crases que o cercam, quando as duas pontas são iguais. */
|
|
294
|
+
export declare function stripQuotes(name: string): string;
|
|
295
|
+
export declare function isIntrinsicJsxName(name: __String | string): boolean;
|
|
296
|
+
export declare function getIndentString(level: number): string;
|
|
297
|
+
export declare function getIndentSize(): number;
|
|
298
|
+
export declare function hostUsesCaseSensitiveFileNames(host: {
|
|
299
|
+
useCaseSensitiveFileNames?(): boolean;
|
|
300
|
+
}): boolean;
|
|
301
|
+
export declare function getLineOfLocalPosition(sourceFile: SourceFile, pos: number): number;
|
|
302
|
+
export declare function getLineOfLocalPositionFromLineMap(lineMap: readonly number[], pos: number): number;
|
|
303
|
+
/** A anotação de tipo de uma variável, de um parâmetro ou de uma propriedade. */
|
|
304
|
+
export declare function getEffectiveTypeAnnotationNode(node: Node): TypeNode | undefined;
|
|
305
|
+
/** A anotação do retorno de uma assinatura. */
|
|
306
|
+
export declare function getEffectiveReturnTypeNode(node: SignatureDeclaration): TypeNode | undefined;
|
|
307
|
+
export declare function hasModifiers(node: Node): boolean;
|
|
308
|
+
export declare function hasModifier(node: Node, flags: ModifierFlags): boolean;
|
|
309
|
+
export declare function hasReadonlyModifier(node: Node): boolean;
|
|
310
|
+
export declare function getSelectedModifierFlags(node: Node, flags: ModifierFlags): ModifierFlags;
|
|
311
|
+
export declare function getModifierFlags(node: Node): ModifierFlags;
|
|
312
|
+
export declare function getModifierFlagsNoCache(node: Node): ModifierFlags;
|
|
313
|
+
export declare function modifierToFlag(token: SyntaxKind): ModifierFlags;
|
|
314
|
+
export declare function isAssignmentOperator(token: SyntaxKind): boolean;
|
|
315
|
+
export declare function isAssignmentExpression(node: Node, excludeCompoundAssignment: true): node is AssignmentExpression<EqualsToken>;
|
|
316
|
+
export declare function isAssignmentExpression(node: Node, excludeCompoundAssignment?: false): node is AssignmentExpression<AssignmentOperatorToken>;
|
|
317
|
+
export declare function isEntityNameExpression(node: Node): node is EntityNameExpression;
|
|
318
|
+
export declare function getFirstIdentifier(node: EntityNameOrEntityNameExpression): Identifier;
|
|
319
|
+
export declare function isDottedName(node: Expression): boolean;
|
|
320
|
+
export declare function isPropertyAccessEntityNameExpression(node: Node): node is PropertyAccessEntityNameExpression;
|
|
321
|
+
export declare function tryGetPropertyAccessOrIdentifierToString(expr: Expression): string | undefined;
|
|
322
|
+
export declare function isPrototypeAccess(node: Node): node is BindableStaticAccessExpression;
|
|
323
|
+
export declare function isRightSideOfQualifiedNameOrPropertyAccess(node: Node): boolean;
|
|
324
|
+
export declare function isEmptyArrayLiteral(expression: Node): boolean;
|
|
325
|
+
/** Return ".ts", ".d.ts", or ".tsx", if that is the extension. */
|
|
326
|
+
export declare function tryExtractTSExtension(fileName: string): string | undefined;
|
|
327
|
+
export declare function createRange(pos: number, end?: number): TextRange;
|
|
328
|
+
export declare function rangeIsOnSingleLine(range: TextRange, sourceFile: SourceFile): boolean;
|
|
329
|
+
export declare function rangeStartPositionsAreOnSameLine(range1: TextRange, range2: TextRange, sourceFile: SourceFile): boolean;
|
|
330
|
+
export declare function rangeEndPositionsAreOnSameLine(range1: TextRange, range2: TextRange, sourceFile: SourceFile): boolean;
|
|
331
|
+
export declare function rangeStartIsOnSameLineAsRangeEnd(range1: TextRange, range2: TextRange, sourceFile: SourceFile): boolean;
|
|
332
|
+
export declare function rangeEndIsOnSameLineAsRangeStart(range1: TextRange, range2: TextRange, sourceFile: SourceFile): boolean;
|
|
333
|
+
export declare function getLinesBetweenRangeEndAndRangeStart(range1: TextRange, range2: TextRange, sourceFile: SourceFile, includeSecondRangeComments: boolean): number;
|
|
334
|
+
export declare function isNodeArrayMultiLine(list: NodeArray<Node>, sourceFile: SourceFile): boolean;
|
|
335
|
+
export declare function positionsAreOnSameLine(pos1: number, pos2: number, sourceFile: SourceFile): boolean;
|
|
336
|
+
export declare function getStartPositionOfRange(range: TextRange, sourceFile: SourceFile, includeComments: boolean): number;
|
|
337
|
+
export declare function getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter(pos: number, stopPos: number, sourceFile: SourceFile, includeComments?: boolean): number;
|
|
338
|
+
export declare function getLinesBetweenPositionAndNextNonWhitespaceCharacter(pos: number, stopPos: number, sourceFile: SourceFile, includeComments?: boolean): number;
|
|
339
|
+
/**
|
|
340
|
+
* Os modificadores da declaração de valor do símbolo. A propriedade sintética de uma união e o protótipo não têm
|
|
341
|
+
* declaração, e a acessibilidade e o `static` que o `tsc` dava a eles eram da classe.
|
|
342
|
+
*/
|
|
343
|
+
export declare function getDeclarationModifierFlagsFromSymbol(s: Symbol): ModifierFlags;
|
|
344
|
+
/**
|
|
345
|
+
* As flags do símbolo somadas às do exportado dele: o membro exportado de um módulo ganha um símbolo local só com o
|
|
346
|
+
* `ExportValue`, e as flags de verdade ficam no de exportação (o `declareModuleMember` do binder).
|
|
347
|
+
*/
|
|
348
|
+
export declare function getCombinedLocalAndExportSymbolFlags(symbol: Symbol): SymbolFlags;
|
|
349
|
+
export declare function isWriteOnlyAccess(node: Node): boolean;
|
|
350
|
+
export declare function isWriteAccess(node: Node): boolean;
|
|
351
|
+
export declare function compareDataObjects(dst: any, src: any): boolean;
|
|
352
|
+
export declare function showModuleSpecifier({ moduleSpecifier }: ImportDeclaration): string;
|
|
353
|
+
export declare function getLastChild(node: Node): Node | undefined;
|
|
354
|
+
/** Põe a chave no mapa, com o valor ou `true`, e diz se ela ainda não estava lá. */
|
|
355
|
+
export declare function addToSeen(seen: Map<true>, key: string | number): boolean;
|
|
356
|
+
export declare function addToSeen<T>(seen: Map<T>, key: string | number, value: T): boolean;
|
|
357
|
+
export declare function isObjectTypeDeclaration(node: Node): node is ObjectTypeDeclaration;
|
|
358
|
+
export declare function isTypeNodeKind(kind: SyntaxKind): boolean;
|
|
359
|
+
export declare function isAccessExpression(node: Node): node is AccessExpression;
|
|
360
|
+
export declare function isNamedImportsOrExports(node: Node): node is NamedImportsOrExports;
|
|
361
|
+
export interface ObjectAllocator {
|
|
362
|
+
getNodeConstructor(): new (kind: SyntaxKind, pos?: number, end?: number) => Node;
|
|
363
|
+
getTokenConstructor(): new <TKind extends SyntaxKind>(kind: TKind, pos?: number, end?: number) => Token<TKind>;
|
|
364
|
+
getIdentifierConstructor(): new (kind: SyntaxKind.Identifier, pos?: number, end?: number) => Identifier;
|
|
365
|
+
getSourceFileConstructor(): new (kind: SyntaxKind.SourceFile, pos?: number, end?: number) => SourceFile;
|
|
366
|
+
getSymbolConstructor(): new (flags: SymbolFlags, name: __String) => Symbol;
|
|
367
|
+
getSourceMapSourceConstructor(): new (fileName: string, text: string, skipTrivia?: (pos: number) => number) => SourceMapSource;
|
|
368
|
+
}
|
|
369
|
+
declare function Symbol(this: Symbol, flags: SymbolFlags, name: __String): void;
|
|
370
|
+
declare function Node(this: Node, kind: SyntaxKind, pos: number, end: number): void;
|
|
371
|
+
declare function Token(this: Node, kind: SyntaxKind, pos: number, end: number): void;
|
|
372
|
+
declare function Identifier(this: Node, kind: SyntaxKind, pos: number, end: number): void;
|
|
373
|
+
declare function SourceMapSource(this: SourceMapSource, fileName: string, text: string, skipTrivia?: (pos: number) => number): void;
|
|
374
|
+
export declare let objectAllocator: ObjectAllocator;
|
|
375
|
+
/**
|
|
376
|
+
* Troca os construtores da árvore. O language service troca os de cada nó e o do símbolo pelos dele, que têm os métodos
|
|
377
|
+
* que os serviços chamam (`node.getStart()`, `symbol.getDocumentationComment()`), ao carregar.
|
|
378
|
+
*/
|
|
379
|
+
export declare function setObjectAllocator(alloc: ObjectAllocator): void;
|
|
380
|
+
export declare function formatStringFromArgs(text: string, args: ArrayLike<string | number>, baseIndex?: number): string;
|
|
381
|
+
export declare let localizedDiagnosticMessages: MapLike<string> | undefined;
|
|
382
|
+
export declare function setLocalizedDiagnosticMessages(messages: typeof localizedDiagnosticMessages): void;
|
|
383
|
+
export declare function getLocaleSpecificMessage(message: DiagnosticMessage): string;
|
|
384
|
+
export declare function createFileDiagnostic(file: SourceFile, start: number, length: number, message: DiagnosticMessage, ...args: (string | number | undefined)[]): DiagnosticWithLocation;
|
|
385
|
+
export declare function formatMessage(_dummy: any, message: DiagnosticMessage, ...args: (string | number | undefined)[]): string;
|
|
386
|
+
export declare function createCompilerDiagnostic(message: DiagnosticMessage, ...args: (string | number | undefined)[]): Diagnostic;
|
|
387
|
+
export declare function chainDiagnosticMessages(details: DiagnosticMessageChain | DiagnosticMessageChain[] | undefined, message: DiagnosticMessage, ...args: (string | number | undefined)[]): DiagnosticMessageChain;
|
|
388
|
+
export declare function concatenateDiagnosticMessageChains(headChain: DiagnosticMessageChain, tailChain: DiagnosticMessageChain): void;
|
|
389
|
+
/** O texto inteiro de uma mensagem encadeada: cada elo numa linha, indentado de dois em dois espaços pela profundidade. */
|
|
390
|
+
export declare function flattenDiagnosticMessageText(diag: string | DiagnosticMessageChain | undefined, newLine: string, indent?: number): string;
|
|
391
|
+
export declare function compareDiagnostics(d1: Diagnostic, d2: Diagnostic): Comparison;
|
|
392
|
+
export declare function compareDiagnosticsSkipRelatedInformation(d1: Diagnostic, d2: Diagnostic): Comparison;
|
|
393
|
+
export declare function unreachableCodeIsError(options: CompilerOptions): boolean;
|
|
394
|
+
export declare function tryRemoveDirectoryPrefix(path: string, dirPath: string, getCanonicalFileName: GetCanonicalFileName): string | undefined;
|
|
395
|
+
export declare function ensureScriptKind(fileName: string, scriptKind: ScriptKind | undefined): ScriptKind;
|
|
396
|
+
export declare function getScriptKindFromFileName(fileName: string): ScriptKind;
|
|
397
|
+
/** Must have ".d.ts" first because if ".ts" goes first, that will be detected as the extension instead of ".d.ts". */
|
|
398
|
+
export declare const supportedTSExtensionsForExtractExtension: readonly Extension[];
|
|
399
|
+
export declare const supportedJSExtensions: readonly Extension[];
|
|
400
|
+
export declare function hasJSFileExtension(fileName: string): boolean;
|
|
401
|
+
export declare function removeFileExtension(path: string): string;
|
|
402
|
+
export declare function tryRemoveExtension(path: string, extension: string): string | undefined;
|
|
403
|
+
export declare function removeExtension(path: string, extension: string): string;
|
|
404
|
+
export declare function positionIsSynthesized(pos: number): boolean;
|
|
405
|
+
/** True if an extension is one of the supported TypeScript extensions. */
|
|
406
|
+
export declare function extensionIsTS(ext: Extension): boolean;
|
|
407
|
+
export declare function resolutionExtensionIsTSOrJson(ext: Extension): boolean;
|
|
408
|
+
/**
|
|
409
|
+
* O diagnóstico de um módulo resolvido que a extensão não deixa entrar no programa, ou `undefined`. Os parâmetros dele
|
|
410
|
+
* são o nome do módulo importado e o arquivo a que resolveu; vale também para o módulo que fica sem tipo.
|
|
411
|
+
*/
|
|
412
|
+
export declare function getResolutionDiagnostic({ extension }: ResolvedModuleFull): DiagnosticMessage | undefined;
|
|
413
|
+
/**
|
|
414
|
+
* Gets the extension from a path.
|
|
415
|
+
* Path must have a valid extension.
|
|
416
|
+
*/
|
|
417
|
+
export declare function extensionFromPath(path: string): Extension;
|
|
418
|
+
export declare function tryGetExtensionFromPath(path: string): Extension | undefined;
|
|
419
|
+
export type Mutable<T extends object> = {
|
|
420
|
+
-readonly [K in keyof T]: T[K];
|
|
421
|
+
};
|
|
422
|
+
export declare function sliceAfter<T>(arr: readonly T[], value: T): readonly T[];
|
|
423
|
+
export declare function addRelatedInfo<T extends Diagnostic>(diagnostic: T, ...relatedInformation: DiagnosticRelatedInformation[]): T;
|
|
424
|
+
export declare function minAndMax<T>(arr: readonly T[], getValue: (value: T) => number): {
|
|
425
|
+
readonly min: number;
|
|
426
|
+
readonly max: number;
|
|
427
|
+
};
|
|
428
|
+
export interface ReadonlyNodeSet<TNode extends Node> {
|
|
429
|
+
has(node: TNode): boolean;
|
|
430
|
+
forEach(cb: (node: TNode) => void): void;
|
|
431
|
+
some(pred: (node: TNode) => boolean): boolean;
|
|
432
|
+
}
|
|
433
|
+
export declare class NodeSet<TNode extends Node> implements ReadonlyNodeSet<TNode> {
|
|
434
|
+
private map;
|
|
435
|
+
add(node: TNode): void;
|
|
436
|
+
tryAdd(node: TNode): boolean;
|
|
437
|
+
has(node: TNode): boolean;
|
|
438
|
+
forEach(cb: (node: TNode) => void): void;
|
|
439
|
+
some(pred: (node: TNode) => boolean): boolean;
|
|
440
|
+
}
|
|
441
|
+
export interface ReadonlyNodeMap<TNode extends Node, TValue> {
|
|
442
|
+
get(node: TNode): TValue | undefined;
|
|
443
|
+
has(node: TNode): boolean;
|
|
444
|
+
}
|
|
445
|
+
export declare class NodeMap<TNode extends Node, TValue> implements ReadonlyNodeMap<TNode, TValue> {
|
|
446
|
+
private map;
|
|
447
|
+
get(node: TNode): TValue | undefined;
|
|
448
|
+
getOrUpdate(node: TNode, setValue: () => TValue): TValue;
|
|
449
|
+
set(node: TNode, value: TValue): void;
|
|
450
|
+
has(node: TNode): boolean;
|
|
451
|
+
forEach(cb: (value: TValue, node: TNode) => void): void;
|
|
452
|
+
}
|
|
453
|
+
export declare function rangeOfNode(node: Node): TextRange;
|
|
454
|
+
export declare function rangeOfTypeParameters(typeParameters: NodeArray<TypeParameterDeclaration>): TextRange;
|
|
455
|
+
/**
|
|
456
|
+
* Se o arquivo fica sem checagem: o que tem a diretiva `/// <reference no-default-lib="true"/>`, a lib, que se usa e
|
|
457
|
+
* não se checa (o `skipDefaultLibCheck` da configuração fixa, CK-24; o `skipLibCheck` é desligado).
|
|
458
|
+
*/
|
|
459
|
+
export declare function skipTypeChecking(sourceFile: SourceFile): boolean;
|
|
460
|
+
export declare function getOrUpdate<T>(map: Map<T>, key: string, getDefault: () => T): T;
|
|
461
|
+
/**
|
|
462
|
+
* Converts a bigint literal string, e.g. `0x1234n`,
|
|
463
|
+
* to its decimal string representation, e.g. `4660`.
|
|
464
|
+
*/
|
|
465
|
+
export declare function parsePseudoBigInt(stringValue: string): string;
|
|
466
|
+
export declare function pseudoBigIntToString({ negative, base10Value }: PseudoBigInt): string;
|
|
467
|
+
export declare function isValidTypeOnlyAliasUseSite(useSite: Node): boolean;
|
|
468
|
+
export declare function typeOnlyDeclarationIsExport(typeOnlyDeclaration: Node): boolean;
|
|
469
|
+
export declare function isIdentifierTypeReference(node: Node): node is TypeReferenceNode & {
|
|
470
|
+
typeName: Identifier;
|
|
471
|
+
};
|
|
472
|
+
export declare function arrayIsHomogeneous<T>(array: readonly T[], comparer?: EqualityComparer<T>): boolean;
|
|
473
|
+
export {};
|