@lpc-lang/core 1.1.2-5.1
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/README.md +255 -0
- package/bin/lpc +4 -0
- package/bin/lpcserver +4 -0
- package/cancellationToken/cancellationToken.d.ts +8 -0
- package/cancellationToken/cancellationToken.d.ts.map +1 -0
- package/cancellationToken/serverCancellationToken.d.ts +21 -0
- package/cancellationToken/serverCancellationToken.d.ts.map +1 -0
- package/cli/_namespaces/lpc.d.ts +2 -0
- package/cli/_namespaces/lpc.d.ts.map +1 -0
- package/cli/lpc.d.ts +2 -0
- package/cli/lpc.d.ts.map +1 -0
- package/compiler/LpcConfig.d.ts +17 -0
- package/compiler/LpcConfig.d.ts.map +1 -0
- package/compiler/_namespaces/lpc.d.ts +49 -0
- package/compiler/_namespaces/lpc.d.ts.map +1 -0
- package/compiler/_namespaces/lpc.moduleSpecifiers.d.ts +2 -0
- package/compiler/_namespaces/lpc.moduleSpecifiers.d.ts.map +1 -0
- package/compiler/_namespaces/lpc.performance.d.ts +2 -0
- package/compiler/_namespaces/lpc.performance.d.ts.map +1 -0
- package/compiler/binder.d.ts +2 -0
- package/compiler/binder.d.ts.map +1 -0
- package/compiler/builderPublic.d.ts +76 -0
- package/compiler/builderPublic.d.ts.map +1 -0
- package/compiler/checker.d.ts +2 -0
- package/compiler/checker.d.ts.map +1 -0
- package/compiler/commandLineParser.d.ts +47 -0
- package/compiler/commandLineParser.d.ts.map +1 -0
- package/compiler/core.d.ts +3 -0
- package/compiler/core.d.ts.map +1 -0
- package/compiler/corePublic.d.ts +19 -0
- package/compiler/corePublic.d.ts.map +1 -0
- package/compiler/debug.d.ts +71 -0
- package/compiler/debug.d.ts.map +1 -0
- package/compiler/diagnosticInformation.d.ts +518 -0
- package/compiler/diagnosticInformation.d.ts.map +1 -0
- package/compiler/emitter.d.ts +11 -0
- package/compiler/emitter.d.ts.map +1 -0
- package/compiler/executeCommandLine.d.ts +15 -0
- package/compiler/executeCommandLine.d.ts.map +1 -0
- package/compiler/expressionToTypeNode.d.ts +2 -0
- package/compiler/expressionToTypeNode.d.ts.map +1 -0
- package/compiler/factory/baseNodeFactory.d.ts +2 -0
- package/compiler/factory/baseNodeFactory.d.ts.map +1 -0
- package/compiler/factory/emitHelper.d.ts +2 -0
- package/compiler/factory/emitHelper.d.ts.map +1 -0
- package/compiler/factory/emitNode.d.ts +22 -0
- package/compiler/factory/emitNode.d.ts.map +1 -0
- package/compiler/factory/nodeChildren.d.ts +2 -0
- package/compiler/factory/nodeChildren.d.ts.map +1 -0
- package/compiler/factory/nodeConverters.d.ts +2 -0
- package/compiler/factory/nodeConverters.d.ts.map +1 -0
- package/compiler/factory/nodeFactory.d.ts +4 -0
- package/compiler/factory/nodeFactory.d.ts.map +1 -0
- package/compiler/factory/parenthesizerRules.d.ts +2 -0
- package/compiler/factory/parenthesizerRules.d.ts.map +1 -0
- package/compiler/factory/utilities.d.ts +2 -0
- package/compiler/factory/utilities.d.ts.map +1 -0
- package/compiler/factory/utilitiesPublic.d.ts +4 -0
- package/compiler/factory/utilitiesPublic.d.ts.map +1 -0
- package/compiler/lpcFileHandler.d.ts +10 -0
- package/compiler/lpcFileHandler.d.ts.map +1 -0
- package/compiler/lpcJsHelpers.d.ts +17 -0
- package/compiler/lpcJsHelpers.d.ts.map +1 -0
- package/compiler/lpcbuild.d.ts +2 -0
- package/compiler/lpcbuild.d.ts.map +1 -0
- package/compiler/lpcbuildPublic.d.ts +26 -0
- package/compiler/lpcbuildPublic.d.ts.map +1 -0
- package/compiler/moduleNameResolver.d.ts +55 -0
- package/compiler/moduleNameResolver.d.ts.map +1 -0
- package/compiler/moduleSpecifiers.d.ts +2 -0
- package/compiler/moduleSpecifiers.d.ts.map +1 -0
- package/compiler/nodeTests.d.ts +115 -0
- package/compiler/nodeTests.d.ts.map +1 -0
- package/compiler/parser.d.ts +65 -0
- package/compiler/parser.d.ts.map +1 -0
- package/compiler/path.d.ts +2 -0
- package/compiler/path.d.ts.map +1 -0
- package/compiler/perfLoger.d.ts +2 -0
- package/compiler/perfLoger.d.ts.map +1 -0
- package/compiler/performance.d.ts +2 -0
- package/compiler/performance.d.ts.map +1 -0
- package/compiler/performanceCore.d.ts +2 -0
- package/compiler/performanceCore.d.ts.map +1 -0
- package/compiler/program.d.ts +72 -0
- package/compiler/program.d.ts.map +1 -0
- package/compiler/resolutionCache.d.ts +6 -0
- package/compiler/resolutionCache.d.ts.map +1 -0
- package/compiler/resolver.d.ts +1 -0
- package/compiler/resolver.d.ts.map +1 -0
- package/compiler/scanner.d.ts +85 -0
- package/compiler/scanner.d.ts.map +1 -0
- package/compiler/sourcemap.d.ts +2 -0
- package/compiler/sourcemap.d.ts.map +1 -0
- package/compiler/sys.d.ts +56 -0
- package/compiler/sys.d.ts.map +1 -0
- package/compiler/tracing.d.ts +31 -0
- package/compiler/tracing.d.ts.map +1 -0
- package/compiler/transformers/declarations.d.ts +2 -0
- package/compiler/transformers/declarations.d.ts.map +1 -0
- package/compiler/transformers.d.ts +2 -0
- package/compiler/transformers.d.ts.map +1 -0
- package/compiler/types.d.ts +3284 -0
- package/compiler/types.d.ts.map +1 -0
- package/compiler/utilities.d.ts +57 -0
- package/compiler/utilities.d.ts.map +1 -0
- package/compiler/utilitiesPublic.d.ts +213 -0
- package/compiler/utilitiesPublic.d.ts.map +1 -0
- package/compiler/visitorPublic.d.ts +72 -0
- package/compiler/visitorPublic.d.ts.map +1 -0
- package/compiler/watch.d.ts +2 -0
- package/compiler/watch.d.ts.map +1 -0
- package/compiler/watchPublic.d.ts +44 -0
- package/compiler/watchPublic.d.ts.map +1 -0
- package/compiler/watchUtilities.d.ts +14 -0
- package/compiler/watchUtilities.d.ts.map +1 -0
- package/config-types.d.ts +33 -0
- package/config-types.d.ts.map +1 -0
- package/harness/harnessIO.d.ts +4 -0
- package/harness/harnessIO.d.ts.map +1 -0
- package/lpc/_namespaces/lpc.d.ts +6 -0
- package/lpc/_namespaces/lpc.d.ts.map +1 -0
- package/lpc/_namespaces/lpc.server.d.ts +2 -0
- package/lpc/_namespaces/lpc.server.d.ts.map +1 -0
- package/lpc/lpc.d.ts +2 -0
- package/lpc/lpc.d.ts.map +1 -0
- package/lpcserver/document.d.ts +1 -0
- package/lpcserver/document.d.ts.map +1 -0
- package/lpcserver/nodeServer.d.ts +25 -0
- package/lpcserver/nodeServer.d.ts.map +1 -0
- package/lpcserver/protocol.const.d.ts +46 -0
- package/lpcserver/protocol.const.d.ts.map +1 -0
- package/lpcserver/server.d.ts +3 -0
- package/lpcserver/server.d.ts.map +1 -0
- package/lpcserver/textRendering.d.ts +14 -0
- package/lpcserver/textRendering.d.ts.map +1 -0
- package/lpcserver/typeConverters.d.ts +44 -0
- package/lpcserver/typeConverters.d.ts.map +1 -0
- package/lpcserver/utils.d.ts +14 -0
- package/lpcserver/utils.d.ts.map +1 -0
- package/package.json +48 -0
- package/parse-fluff-docs.d.ts +2 -0
- package/parse-fluff-docs.d.ts.map +1 -0
- package/parse-ld-docs.d.ts +2 -0
- package/parse-ld-docs.d.ts.map +1 -0
- package/server/_namespaces/lpc.d.ts +5 -0
- package/server/_namespaces/lpc.d.ts.map +1 -0
- package/server/_namespaces/lpc.server.d.ts +11 -0
- package/server/_namespaces/lpc.server.d.ts.map +1 -0
- package/server/_namespaces/lpc.server.protocol.d.ts +2 -0
- package/server/_namespaces/lpc.server.protocol.d.ts.map +1 -0
- package/server/editorServices.d.ts +261 -0
- package/server/editorServices.d.ts.map +1 -0
- package/server/project.d.ts +143 -0
- package/server/project.d.ts.map +1 -0
- package/server/protocol.d.ts +962 -0
- package/server/protocol.d.ts.map +1 -0
- package/server/scriptInfo.d.ts +53 -0
- package/server/scriptInfo.d.ts.map +1 -0
- package/server/scriptVersionCache.d.ts +2 -0
- package/server/scriptVersionCache.d.ts.map +1 -0
- package/server/session.d.ts +150 -0
- package/server/session.d.ts.map +1 -0
- package/server/types.d.ts +24 -0
- package/server/types.d.ts.map +1 -0
- package/server/utilities.d.ts +2 -0
- package/server/utilities.d.ts.map +1 -0
- package/server/utilitiesPublic.d.ts +37 -0
- package/server/utilitiesPublic.d.ts.map +1 -0
- package/server.d.ts +2 -0
- package/server.d.ts.map +1 -0
- package/services/_namespaces/lpc.Completions.StringCompletions.d.ts +2 -0
- package/services/_namespaces/lpc.Completions.StringCompletions.d.ts.map +1 -0
- package/services/_namespaces/lpc.Completions.d.ts +4 -0
- package/services/_namespaces/lpc.Completions.d.ts.map +1 -0
- package/services/_namespaces/lpc.FindAllReferences.d.ts +3 -0
- package/services/_namespaces/lpc.FindAllReferences.d.ts.map +1 -0
- package/services/_namespaces/lpc.GoToDefinition.d.ts +2 -0
- package/services/_namespaces/lpc.GoToDefinition.d.ts.map +1 -0
- package/services/_namespaces/lpc.JsDoc.d.ts +2 -0
- package/services/_namespaces/lpc.JsDoc.d.ts.map +1 -0
- package/services/_namespaces/lpc.NavigationBar.d.ts +2 -0
- package/services/_namespaces/lpc.NavigationBar.d.ts.map +1 -0
- package/services/_namespaces/lpc.Rename.d.ts +2 -0
- package/services/_namespaces/lpc.Rename.d.ts.map +1 -0
- package/services/_namespaces/lpc.SignatureHelp.d.ts +2 -0
- package/services/_namespaces/lpc.SignatureHelp.d.ts.map +1 -0
- package/services/_namespaces/lpc.SymbolDisplay.d.ts +2 -0
- package/services/_namespaces/lpc.SymbolDisplay.d.ts.map +1 -0
- package/services/_namespaces/lpc.codefix.d.ts +3 -0
- package/services/_namespaces/lpc.codefix.d.ts.map +1 -0
- package/services/_namespaces/lpc.d.ts +30 -0
- package/services/_namespaces/lpc.d.ts.map +1 -0
- package/services/_namespaces/lpc.formatting.d.ts +7 -0
- package/services/_namespaces/lpc.formatting.d.ts.map +1 -0
- package/services/_namespaces/lpc.textChanges.d.ts +2 -0
- package/services/_namespaces/lpc.textChanges.d.ts.map +1 -0
- package/services/classifier2020.d.ts +2 -0
- package/services/classifier2020.d.ts.map +1 -0
- package/services/codefixes/helpers.d.ts +2 -0
- package/services/codefixes/helpers.d.ts.map +1 -0
- package/services/codefixes/importFixes.d.ts +2 -0
- package/services/codefixes/importFixes.d.ts.map +1 -0
- package/services/completions.d.ts +2 -0
- package/services/completions.d.ts.map +1 -0
- package/services/documentRegistry.d.ts +90 -0
- package/services/documentRegistry.d.ts.map +1 -0
- package/services/exportInfoMap.d.ts +5 -0
- package/services/exportInfoMap.d.ts.map +1 -0
- package/services/findAllReferences.d.ts +2 -0
- package/services/findAllReferences.d.ts.map +1 -0
- package/services/formatting/formatting.d.ts +2 -0
- package/services/formatting/formatting.d.ts.map +1 -0
- package/services/formatting/formattingContext.d.ts +2 -0
- package/services/formatting/formattingContext.d.ts.map +1 -0
- package/services/formatting/rule.d.ts +2 -0
- package/services/formatting/rule.d.ts.map +1 -0
- package/services/formatting/rules.d.ts +2 -0
- package/services/formatting/rules.d.ts.map +1 -0
- package/services/formatting/rulesMap.d.ts +2 -0
- package/services/formatting/rulesMap.d.ts.map +1 -0
- package/services/formatting/smartIndenter.d.ts +2 -0
- package/services/formatting/smartIndenter.d.ts.map +1 -0
- package/services/goToDefinition.d.ts +2 -0
- package/services/goToDefinition.d.ts.map +1 -0
- package/services/importTracker.d.ts +2 -0
- package/services/importTracker.d.ts.map +1 -0
- package/services/jsDoc.d.ts +2 -0
- package/services/jsDoc.d.ts.map +1 -0
- package/services/navigationBar.d.ts +2 -0
- package/services/navigationBar.d.ts.map +1 -0
- package/services/rename.d.ts +2 -0
- package/services/rename.d.ts.map +1 -0
- package/services/services.d.ts +54 -0
- package/services/services.d.ts.map +1 -0
- package/services/signatureHelp.d.ts +2 -0
- package/services/signatureHelp.d.ts.map +1 -0
- package/services/sourcemaps.d.ts +2 -0
- package/services/sourcemaps.d.ts.map +1 -0
- package/services/stringCompletions.d.ts +2 -0
- package/services/stringCompletions.d.ts.map +1 -0
- package/services/suggestionDiagnostics.d.ts +2 -0
- package/services/suggestionDiagnostics.d.ts.map +1 -0
- package/services/symbolDisplay.d.ts +2 -0
- package/services/symbolDisplay.d.ts.map +1 -0
- package/services/textChanges.d.ts +2 -0
- package/services/textChanges.d.ts.map +1 -0
- package/services/types.d.ts +901 -0
- package/services/types.d.ts.map +1 -0
- package/services/utilities.d.ts +3 -0
- package/services/utilities.d.ts.map +1 -0
- package/src/cli.js +58 -0
- package/src/cli.js.map +7 -0
- package/src/efuns/fluffos/arrays.h +205 -0
- package/src/efuns/fluffos/async.h +84 -0
- package/src/efuns/fluffos/buffers.h +80 -0
- package/src/efuns/fluffos/calls.h +275 -0
- package/src/efuns/fluffos/contrib.h +805 -0
- package/src/efuns/fluffos/db.h +125 -0
- package/src/efuns/fluffos/driver.h +107 -0
- package/src/efuns/fluffos/ed.h +48 -0
- package/src/efuns/fluffos/efuns.fluffos.h +75 -0
- package/src/efuns/fluffos/external.h +30 -0
- package/src/efuns/fluffos/filesystem.h +154 -0
- package/src/efuns/fluffos/floats.h +136 -0
- package/src/efuns/fluffos/functions.h +104 -0
- package/src/efuns/fluffos/general.h +548 -0
- package/src/efuns/fluffos/interactive.h +777 -0
- package/src/efuns/fluffos/internals.h +455 -0
- package/src/efuns/fluffos/lpc-config.json +10 -0
- package/src/efuns/fluffos/mappings.h +205 -0
- package/src/efuns/fluffos/misc.h +43 -0
- package/src/efuns/fluffos/mudlib.h +228 -0
- package/src/efuns/fluffos/numbers.h +41 -0
- package/src/efuns/fluffos/objects.h +365 -0
- package/src/efuns/fluffos/parsing.h +220 -0
- package/src/efuns/fluffos/pcre.h +75 -0
- package/src/efuns/fluffos/sockets.h +276 -0
- package/src/efuns/fluffos/strings.h +542 -0
- package/src/efuns/fluffos/system.h +408 -0
- package/src/efuns/fluffos/zh-cn/arrays.zh-cn.h +167 -0
- package/src/efuns/fluffos/zh-cn/async.zh-cn.h +81 -0
- package/src/efuns/fluffos/zh-cn/buffers.zh-cn.h +69 -0
- package/src/efuns/fluffos/zh-cn/calls.zh-cn.h +242 -0
- package/src/efuns/fluffos/zh-cn/contrib.zh-cn.h +767 -0
- package/src/efuns/fluffos/zh-cn/db.zh-cn.h +113 -0
- package/src/efuns/fluffos/zh-cn/ed.zh-cn.h +42 -0
- package/src/efuns/fluffos/zh-cn/efuns.fluffos.h +76 -0
- package/src/efuns/fluffos/zh-cn/external.zh-cn.h +25 -0
- package/src/efuns/fluffos/zh-cn/filesystem.zh-cn.h +140 -0
- package/src/efuns/fluffos/zh-cn/floats.zh-cn.h +129 -0
- package/src/efuns/fluffos/zh-cn/functions.zh-cn.h +87 -0
- package/src/efuns/fluffos/zh-cn/general.zh-cn.h +506 -0
- package/src/efuns/fluffos/zh-cn/interactive.zh-cn.h +659 -0
- package/src/efuns/fluffos/zh-cn/internals.zh-cn.h +356 -0
- package/src/efuns/fluffos/zh-cn/mappings.zh-cn.h +188 -0
- package/src/efuns/fluffos/zh-cn/misc.zh-cn.h +43 -0
- package/src/efuns/fluffos/zh-cn/mudlib.zh-cn.h +190 -0
- package/src/efuns/fluffos/zh-cn/numbers.zh-cn.h +36 -0
- package/src/efuns/fluffos/zh-cn/objects.zh-cn.h +280 -0
- package/src/efuns/fluffos/zh-cn/parsing.zh-cn.h +212 -0
- package/src/efuns/fluffos/zh-cn/pcre.zh-cn.h +67 -0
- package/src/efuns/fluffos/zh-cn/sockets.zh-cn.h +230 -0
- package/src/efuns/fluffos/zh-cn/strings.zh-cn.h +484 -0
- package/src/efuns/fluffos/zh-cn/system.zh-cn.h +366 -0
- package/src/efuns/ldmud/defines.h +69 -0
- package/src/efuns/ldmud/efun.h +10449 -0
- package/src/efuns/ldmud/efuns.ldmud.h +87 -0
- package/src/efuns/ldmud/lpc-config.json +9 -0
- package/src/efuns/ldmud/obsolete.h +2168 -0
- package/src/lpc.js +82486 -0
- package/src/lpc.js.map +6 -0
- package/src/server.js +129 -0
- package/src/server.js.map +7 -0
- package/types.d.ts +23 -0
- package/types.d.ts.map +1 -0
- package/utils.d.ts +21 -0
- package/utils.d.ts.map +1 -0
|
@@ -0,0 +1,3284 @@
|
|
|
1
|
+
import { CreateSourceFileOptions, MapLike, ModuleResolutionCache, Mutable } from "./_namespaces/lpc.js";
|
|
2
|
+
export type NodeId = number;
|
|
3
|
+
export type SymbolId = number;
|
|
4
|
+
export type Path = string & {
|
|
5
|
+
__pathBrand: any;
|
|
6
|
+
};
|
|
7
|
+
/** SymbolTable based on ES6 Map interface. */
|
|
8
|
+
export type SymbolTable = Map<string, Symbol>;
|
|
9
|
+
export interface TextRange {
|
|
10
|
+
pos: number;
|
|
11
|
+
end: number;
|
|
12
|
+
}
|
|
13
|
+
export interface ReadonlyTextRange {
|
|
14
|
+
readonly pos: number;
|
|
15
|
+
readonly end: number;
|
|
16
|
+
}
|
|
17
|
+
export interface MacroIncludedFileRange {
|
|
18
|
+
posInOrigin?: number;
|
|
19
|
+
endInOrigin?: number;
|
|
20
|
+
originFilename?: string;
|
|
21
|
+
}
|
|
22
|
+
/** Base Node */
|
|
23
|
+
export interface Node extends ReadonlyTextRange {
|
|
24
|
+
readonly kind: SyntaxKind;
|
|
25
|
+
readonly flags: NodeFlags;
|
|
26
|
+
readonly parent: Node;
|
|
27
|
+
}
|
|
28
|
+
export interface EmitNode {
|
|
29
|
+
flags: EmitFlags;
|
|
30
|
+
internalFlags: InternalEmitFlags;
|
|
31
|
+
annotatedNodes?: Node[];
|
|
32
|
+
leadingComments?: SynthesizedComment[];
|
|
33
|
+
trailingComments?: SynthesizedComment[];
|
|
34
|
+
commentRange?: TextRange;
|
|
35
|
+
constantValue?: string | number;
|
|
36
|
+
externalHelpersModuleName?: Identifier;
|
|
37
|
+
externalHelpers?: boolean;
|
|
38
|
+
helpers?: EmitHelper[];
|
|
39
|
+
startsOnNewLine?: boolean;
|
|
40
|
+
snippetElement?: SnippetElement;
|
|
41
|
+
typeNode?: TypeNode;
|
|
42
|
+
classThis?: Identifier;
|
|
43
|
+
assignedName?: Expression;
|
|
44
|
+
identifierTypeArguments?: NodeArray<TypeNode | TypeParameterDeclaration>;
|
|
45
|
+
autoGenerate: AutoGenerateInfo | undefined;
|
|
46
|
+
}
|
|
47
|
+
export interface TypeChecker {
|
|
48
|
+
getTypeOfSymbol(symbol: Symbol): Type;
|
|
49
|
+
createSymbol(flags: SymbolFlags, name: string, checkFlags?: CheckFlags): TransientSymbol;
|
|
50
|
+
getStringType(): Type;
|
|
51
|
+
signatureToString(signature: Signature, enclosingDeclaration?: Node, flags?: TypeFormatFlags, kind?: SignatureKind): string;
|
|
52
|
+
symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): string;
|
|
53
|
+
getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature | undefined;
|
|
54
|
+
/** Follow all aliases to get the original symbol. */
|
|
55
|
+
getAliasedSymbol(symbol: Symbol): Symbol;
|
|
56
|
+
getSymbolAtLocation(node: Node): Symbol | undefined;
|
|
57
|
+
getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type;
|
|
58
|
+
getRootSymbols(symbol: Symbol): readonly Symbol[];
|
|
59
|
+
evaluate(expr: Expression, location?: Declaration): EvaluatorResult<string | number>;
|
|
60
|
+
/**
|
|
61
|
+
* True if this type is assignable to `ReadonlyArray<any>`.
|
|
62
|
+
*/
|
|
63
|
+
isArrayLikeType(type: Type): boolean;
|
|
64
|
+
/** Note that the resulting nodes cannot be checked. */
|
|
65
|
+
typeToTypeNode(type: Type, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): TypeNode | undefined;
|
|
66
|
+
getReturnTypeOfSignature(signature: Signature): Type;
|
|
67
|
+
resolveName(name: string, location: Node | undefined, meaning: SymbolFlags, excludeGlobals: boolean): Symbol | undefined;
|
|
68
|
+
resolveBaseTypesOfClass(type: InterfaceType): Type[];
|
|
69
|
+
isArgumentsSymbol(symbol: Symbol): boolean;
|
|
70
|
+
/**
|
|
71
|
+
* returns unknownSignature in the case of an error.
|
|
72
|
+
* returns undefined if the node is not valid.
|
|
73
|
+
* @param argumentCount Apparent number of arguments, passed in case of a possibly incomplete call. This should come from an ArgumentListInfo. See `signatureHelp.ts`.
|
|
74
|
+
*/
|
|
75
|
+
getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[], argumentCount?: number): Signature | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* The function returns the value (local variable) symbol of an identifier in the short-hand property assignment.
|
|
78
|
+
* This is necessary as an identifier in short-hand property assignment can contains two meaning: property name and property value.
|
|
79
|
+
*/
|
|
80
|
+
getShorthandAssignmentValueSymbol(location: Node | undefined): Symbol | undefined;
|
|
81
|
+
isUnknownSymbol(symbol: Symbol): boolean;
|
|
82
|
+
isUndefinedSymbol(symbol: Symbol): boolean;
|
|
83
|
+
getMergedSymbol(symbol: Symbol): Symbol;
|
|
84
|
+
getTypeAtLocation(node: Node): Type;
|
|
85
|
+
getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[];
|
|
86
|
+
/**
|
|
87
|
+
* Depending on the operation performed, it may be appropriate to throw away the checker
|
|
88
|
+
* if the cancellation token is triggered. Typically, if it is used for error checking
|
|
89
|
+
* and the operation is cancelled, then it should be discarded, otherwise it is safe to keep.
|
|
90
|
+
*/
|
|
91
|
+
runWithCancellationToken<T>(token: CancellationToken, cb: (checker: TypeChecker) => T): T;
|
|
92
|
+
/** Note that the resulting nodes cannot be checked. */
|
|
93
|
+
symbolToTypeParameterDeclarations(symbol: Symbol, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): NodeArray<TypeParameterDeclaration> | undefined;
|
|
94
|
+
getNullableType(type: Type, flags: TypeFlags): Type;
|
|
95
|
+
getNonNullableType(type: Type): Type;
|
|
96
|
+
getSignaturesOfType(type: Type, kind: SignatureKind): readonly Signature[];
|
|
97
|
+
getIndexTypeOfType(type: Type, kind: IndexKind): Type | undefined;
|
|
98
|
+
getBaseConstraintOfType(type: Type): Type | undefined;
|
|
99
|
+
getDefaultFromTypeParameter(type: Type): Type | undefined;
|
|
100
|
+
getPropertyOfType(type: Type, propertyName: string): Symbol | undefined;
|
|
101
|
+
getTypeFromTypeNode(node: TypeNode): Type;
|
|
102
|
+
getFullyQualifiedName(symbol: Symbol): string;
|
|
103
|
+
getWidenedType(type: Type): Type;
|
|
104
|
+
getAugmentedPropertiesOfType(type: Type): Symbol[];
|
|
105
|
+
getPropertiesOfType(type: Type): Symbol[];
|
|
106
|
+
getExportsOfModule(moduleSymbol: Symbol): Symbol[];
|
|
107
|
+
getTypePredicateOfSignature(signature: Signature): TypePredicate | undefined;
|
|
108
|
+
/** Note that the resulting nodes cannot be checked. */
|
|
109
|
+
typeParameterToDeclaration(parameter: TypeParameter, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): TypeParameterDeclaration | undefined;
|
|
110
|
+
/** Note that the resulting nodes cannot be checked. */
|
|
111
|
+
symbolToParameterDeclaration(symbol: Symbol, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): ParameterDeclaration | undefined;
|
|
112
|
+
isOptionalParameter(node: ParameterDeclaration): boolean;
|
|
113
|
+
}
|
|
114
|
+
export type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string> | MapLike<string[]> | ProjectReference[] | null | undefined;
|
|
115
|
+
export interface TypeAcquisition {
|
|
116
|
+
enable?: boolean;
|
|
117
|
+
include?: string[];
|
|
118
|
+
exclude?: string[];
|
|
119
|
+
disableFilenameBasedTypeAcquisition?: boolean;
|
|
120
|
+
[option: string]: CompilerOptionsValue | undefined;
|
|
121
|
+
}
|
|
122
|
+
export interface ProjectReference {
|
|
123
|
+
/** A normalized path on disk */
|
|
124
|
+
path: string;
|
|
125
|
+
/** The path as the user originally wrote it */
|
|
126
|
+
originalPath?: string;
|
|
127
|
+
/** @deprecated */
|
|
128
|
+
prepend?: boolean;
|
|
129
|
+
/** True if it is intended that this reference form a circularity */
|
|
130
|
+
circular?: boolean;
|
|
131
|
+
}
|
|
132
|
+
/** Either a parsed command line or a parsed tsconfig.json */
|
|
133
|
+
export interface ParsedCommandLine {
|
|
134
|
+
options: CompilerOptions;
|
|
135
|
+
typeAcquisition?: TypeAcquisition;
|
|
136
|
+
fileNames: string[];
|
|
137
|
+
projectReferences?: readonly ProjectReference[];
|
|
138
|
+
watchOptions?: WatchOptions;
|
|
139
|
+
raw?: any;
|
|
140
|
+
errors: Diagnostic[];
|
|
141
|
+
wildcardDirectories?: MapLike<WatchDirectoryFlags>;
|
|
142
|
+
compileOnSave?: boolean;
|
|
143
|
+
}
|
|
144
|
+
export interface ResolvedProjectReference {
|
|
145
|
+
commandLine: ParsedCommandLine;
|
|
146
|
+
sourceFile: SourceFile;
|
|
147
|
+
references?: readonly (ResolvedProjectReference | undefined)[];
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Represents the result of module resolution.
|
|
151
|
+
* Module resolution will pick up tsx/jsx/js files even if '--jsx' and '--allowJs' are turned off.
|
|
152
|
+
* The Program will then filter results based on these flags.
|
|
153
|
+
*
|
|
154
|
+
* Prefer to return a `ResolvedModuleFull` so that the file type does not have to be inferred.
|
|
155
|
+
*/
|
|
156
|
+
export interface ResolvedModule {
|
|
157
|
+
/** Path of the file the module was resolved to. */
|
|
158
|
+
resolvedFileName: string;
|
|
159
|
+
/** True if `resolvedFileName` comes from `node_modules`. */
|
|
160
|
+
isExternalLibraryImport?: boolean;
|
|
161
|
+
/**
|
|
162
|
+
* True if the original module reference used a .ts extension to refer directly to a .ts file,
|
|
163
|
+
* which should produce an error during checking if emit is enabled.
|
|
164
|
+
*/
|
|
165
|
+
resolvedUsingTsExtension?: boolean;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* ResolvedModule with an explicitly provided `extension` property.
|
|
169
|
+
* Prefer this over `ResolvedModule`.
|
|
170
|
+
* If changing this, remember to change `moduleResolutionIsEqualTo`.
|
|
171
|
+
*/
|
|
172
|
+
export interface ResolvedModuleFull extends ResolvedModule {
|
|
173
|
+
/**
|
|
174
|
+
* Extension of resolvedFileName. This must match what's at the end of resolvedFileName.
|
|
175
|
+
* This is optional for backwards-compatibility, but will be added if not provided.
|
|
176
|
+
*/
|
|
177
|
+
extension: string;
|
|
178
|
+
packageId?: PackageId;
|
|
179
|
+
}
|
|
180
|
+
export interface ResolvedTypeReferenceDirective {
|
|
181
|
+
primary: boolean;
|
|
182
|
+
resolvedFileName: string | undefined;
|
|
183
|
+
packageId?: PackageId;
|
|
184
|
+
/** True if `resolvedFileName` comes from `node_modules`. */
|
|
185
|
+
isExternalLibraryImport?: boolean;
|
|
186
|
+
}
|
|
187
|
+
export interface ResolvedTypeReferenceDirectiveWithFailedLookupLocations {
|
|
188
|
+
readonly resolvedTypeReferenceDirective: ResolvedTypeReferenceDirective | undefined;
|
|
189
|
+
}
|
|
190
|
+
export interface ResolvedModuleWithFailedLookupLocations {
|
|
191
|
+
readonly resolvedModule: ResolvedModuleFull | undefined;
|
|
192
|
+
}
|
|
193
|
+
export declare const enum SignatureKind {
|
|
194
|
+
Call = 0,
|
|
195
|
+
Construct = 1
|
|
196
|
+
}
|
|
197
|
+
export type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression;
|
|
198
|
+
export interface Type {
|
|
199
|
+
flags: TypeFlags;
|
|
200
|
+
symbol: Symbol;
|
|
201
|
+
pattern?: DestructuringPattern;
|
|
202
|
+
aliasSymbol?: Symbol;
|
|
203
|
+
aliasTypeArguments?: readonly Type[];
|
|
204
|
+
}
|
|
205
|
+
export declare const enum SyntaxKind {
|
|
206
|
+
Unknown = 0,// fIrst token
|
|
207
|
+
EndOfFileToken = 1,
|
|
208
|
+
SingleLineCommentTrivia = 2,
|
|
209
|
+
MultiLineCommentTrivia = 3,
|
|
210
|
+
NewLineTrivia = 4,
|
|
211
|
+
WhitespaceTrivia = 5,
|
|
212
|
+
ConflictMarkerTrivia = 6,
|
|
213
|
+
MacroIdentifierTrivia = 7,
|
|
214
|
+
ShebangTrivia = 8,
|
|
215
|
+
NonTextFileMarkerTrivia = 9,
|
|
216
|
+
NumericLiteral = 10,
|
|
217
|
+
IntLiteral = 11,
|
|
218
|
+
CharLiteral = 12,
|
|
219
|
+
FloatLiteral = 13,
|
|
220
|
+
BytesLiteral = 14,
|
|
221
|
+
StringArrayLiteral = 15,
|
|
222
|
+
StringLiteral = 16,
|
|
223
|
+
OpenBraceToken = 17,
|
|
224
|
+
BacktickToken = 18,
|
|
225
|
+
CloseBraceToken = 19,
|
|
226
|
+
OpenParenToken = 20,
|
|
227
|
+
CloseParenToken = 21,
|
|
228
|
+
OpenBracketToken = 22,
|
|
229
|
+
CloseBracketToken = 23,
|
|
230
|
+
DotToken = 24,
|
|
231
|
+
DotDotDotToken = 25,
|
|
232
|
+
SemicolonToken = 26,
|
|
233
|
+
CommaToken = 27,
|
|
234
|
+
QuestionDotToken = 28,
|
|
235
|
+
LessThanToken = 29,
|
|
236
|
+
LessThanSlashToken = 30,
|
|
237
|
+
LessThanDotDotToken = 31,
|
|
238
|
+
GreaterThanToken = 32,
|
|
239
|
+
LessThanEqualsToken = 33,
|
|
240
|
+
GreaterThanEqualsToken = 34,
|
|
241
|
+
EqualsEqualsToken = 35,
|
|
242
|
+
ExclamationEqualsToken = 36,
|
|
243
|
+
EqualsEqualsEqualsToken = 37,
|
|
244
|
+
ExclamationEqualsEqualsToken = 38,
|
|
245
|
+
EqualsGreaterThanToken = 39,
|
|
246
|
+
MinusGreaterThanToken = 40,
|
|
247
|
+
PlusToken = 41,
|
|
248
|
+
MinusToken = 42,
|
|
249
|
+
AsteriskToken = 43,
|
|
250
|
+
AsteriskAsteriskToken = 44,
|
|
251
|
+
SlashToken = 45,
|
|
252
|
+
PercentToken = 46,
|
|
253
|
+
PlusPlusToken = 47,
|
|
254
|
+
MinusMinusToken = 48,
|
|
255
|
+
LessThanLessThanToken = 49,
|
|
256
|
+
GreaterThanGreaterThanToken = 50,
|
|
257
|
+
GreaterThanGreaterThanGreaterThanToken = 51,
|
|
258
|
+
AmpersandToken = 52,
|
|
259
|
+
BarToken = 53,
|
|
260
|
+
CaretToken = 54,
|
|
261
|
+
ExclamationToken = 55,
|
|
262
|
+
DoubleExclamationToken = 56,
|
|
263
|
+
TildeToken = 57,
|
|
264
|
+
AmpersandAmpersandToken = 58,
|
|
265
|
+
BarBarToken = 59,
|
|
266
|
+
QuestionToken = 60,
|
|
267
|
+
ColonToken = 61,
|
|
268
|
+
AtToken = 62,
|
|
269
|
+
AtAtToken = 63,
|
|
270
|
+
QuestionQuestionToken = 64,
|
|
271
|
+
HashToken = 65,
|
|
272
|
+
OpenParenColonToken = 66,// for inline closures
|
|
273
|
+
ColonCloseParenToken = 67,
|
|
274
|
+
OpenParenBracketToken = 68,// for mapping literal
|
|
275
|
+
OpenParenBraceToken = 69,// for array literal
|
|
276
|
+
OpenParenAsteriskToken = 70,// (*fn) shortcut for evaluate()
|
|
277
|
+
ColonColonToken = 71,
|
|
278
|
+
LambdaToken = 72,
|
|
279
|
+
DotDotToken = 73,
|
|
280
|
+
EqualsToken = 74,// first assignment
|
|
281
|
+
PlusEqualsToken = 75,
|
|
282
|
+
MinusEqualsToken = 76,
|
|
283
|
+
AsteriskEqualsToken = 77,
|
|
284
|
+
AsteriskAsteriskEqualsToken = 78,
|
|
285
|
+
SlashEqualsToken = 79,
|
|
286
|
+
PercentEqualsToken = 80,
|
|
287
|
+
LessThanLessThanEqualsToken = 81,
|
|
288
|
+
GreaterThanGreaterThanEqualsToken = 82,
|
|
289
|
+
GreaterThanGreaterThanGreaterThanEqualsToken = 83,
|
|
290
|
+
AmpersandEqualsToken = 84,
|
|
291
|
+
BarEqualsToken = 85,
|
|
292
|
+
BarBarEqualsToken = 86,
|
|
293
|
+
QuestionQuestionEqualsToken = 87,
|
|
294
|
+
CaretEqualsToken = 88,// last assignment
|
|
295
|
+
Identifier = 89,
|
|
296
|
+
StringizedIdentifier = 90,
|
|
297
|
+
IntKeyword = 92,// FIrst Keyword, FirstReserved Word
|
|
298
|
+
FloatKeyword = 93,
|
|
299
|
+
StringKeyword = 94,
|
|
300
|
+
LwObjectKeyword = 95,
|
|
301
|
+
UndefinedKeyword = 96,
|
|
302
|
+
AnyKeyword = 97,
|
|
303
|
+
ClosureKeyword = 98,
|
|
304
|
+
StructKeyword = 99,
|
|
305
|
+
CatchKeyword = 100,
|
|
306
|
+
MixedKeyword = 101,
|
|
307
|
+
UnknownKeyword = 102,
|
|
308
|
+
InKeyword = 103,
|
|
309
|
+
MappingKeyword = 104,
|
|
310
|
+
VoidKeyword = 105,
|
|
311
|
+
BreakKeyword = 106,
|
|
312
|
+
BytesKeyword = 107,
|
|
313
|
+
BufferKeyword = 108,
|
|
314
|
+
DoKeyword = 109,
|
|
315
|
+
ElseKeyword = 110,
|
|
316
|
+
ForKeyword = 111,
|
|
317
|
+
ForEachKeyword = 112,
|
|
318
|
+
CaseKeyword = 113,
|
|
319
|
+
DefaultKeyword = 114,
|
|
320
|
+
IfKeyword = 115,
|
|
321
|
+
ReturnKeyword = 116,
|
|
322
|
+
SwitchKeyword = 117,
|
|
323
|
+
WhileKeyword = 118,
|
|
324
|
+
AsyncKeyword = 119,
|
|
325
|
+
InheritKeyword = 120,
|
|
326
|
+
ContinueKeyword = 121,
|
|
327
|
+
PrivateKeyword = 122,
|
|
328
|
+
ProtectedKeyword = 123,
|
|
329
|
+
PublicKeyword = 124,
|
|
330
|
+
StaticKeyword = 125,
|
|
331
|
+
VisibleKeyword = 126,
|
|
332
|
+
NoSaveKeyword = 127,
|
|
333
|
+
NoShadowKeyword = 128,
|
|
334
|
+
IntrinsicKeyword = 129,
|
|
335
|
+
NoMaskKeyword = 130,
|
|
336
|
+
VarArgsKeyword = 131,
|
|
337
|
+
DeprecatedKeyword = 132,// LastReservedWord
|
|
338
|
+
ClassKeyword = 133,
|
|
339
|
+
StatusKeyword = 134,
|
|
340
|
+
FalseKeyword = 135,// JSON-only
|
|
341
|
+
TrueKeyword = 136,// JSON-only
|
|
342
|
+
NullKeyword = 137,// JSON-only
|
|
343
|
+
FunctionKeyword = 138,// can be used as a param name
|
|
344
|
+
SymbolKeyword = 139,// not reserved in fluffos
|
|
345
|
+
ObjectKeyword = 140,// can occur in a super expr i.e. object::fn()
|
|
346
|
+
RefKeyword = 141,// fluff only
|
|
347
|
+
IsKeyword = 142,// use for type predicates only
|
|
348
|
+
FunctionsKeyword = 143,// inherit modifier
|
|
349
|
+
VirtualKeyword = 144,// inherit modifier
|
|
350
|
+
NewKeyword = 145,// LastKeyword and LastToken - everything after this will be processed by the binder
|
|
351
|
+
QualifiedName = 146,// First Node
|
|
352
|
+
ComputedPropertyName = 147,
|
|
353
|
+
TypeParameter = 148,
|
|
354
|
+
Parameter = 149,
|
|
355
|
+
IndexSignature = 150,
|
|
356
|
+
CallSignature = 151,
|
|
357
|
+
PropertyDeclaration = 152,
|
|
358
|
+
PropertySignature = 153,
|
|
359
|
+
MethodDeclaration = 154,
|
|
360
|
+
InterfaceDeclaration = 155,
|
|
361
|
+
MethodSignature = 156,
|
|
362
|
+
UnionType = 157,// First Type Node
|
|
363
|
+
FunctionType = 158,
|
|
364
|
+
IntersectionType = 159,
|
|
365
|
+
RestType = 160,
|
|
366
|
+
ArrayType = 161,
|
|
367
|
+
TupleType = 162,
|
|
368
|
+
TypeLiteral = 163,
|
|
369
|
+
TypeQuery = 164,
|
|
370
|
+
ParenthesizedType = 165,
|
|
371
|
+
TypeReference = 166,
|
|
372
|
+
TypePredicate = 167,
|
|
373
|
+
ConditionalType = 168,// Last TYpe Node
|
|
374
|
+
FunctionDeclaration = 169,
|
|
375
|
+
ClassDeclaration = 170,
|
|
376
|
+
ExportSpecifier = 171,
|
|
377
|
+
ExportDeclaration = 172,
|
|
378
|
+
MissingDeclaration = 173,
|
|
379
|
+
PropertyAssignment = 174,
|
|
380
|
+
ShorthandPropertyAssignment = 175,
|
|
381
|
+
SourceFile = 176,
|
|
382
|
+
Bundle = 177,
|
|
383
|
+
IncludeDirective = 178,
|
|
384
|
+
DefineDirective = 179,
|
|
385
|
+
UndefDirective = 180,
|
|
386
|
+
IfDirective = 181,
|
|
387
|
+
IfDefDirective = 182,
|
|
388
|
+
IfNDefDirective = 183,
|
|
389
|
+
ElseDirective = 184,
|
|
390
|
+
ElseIfDirective = 185,
|
|
391
|
+
EndIfDirective = 186,
|
|
392
|
+
PragmaDirective = 187,
|
|
393
|
+
JSDocTypeExpression = 188,// First JSDoc Node
|
|
394
|
+
JSDocNameReference = 189,
|
|
395
|
+
JSDocMemberName = 190,// C#p
|
|
396
|
+
JSDocAllType = 191,// The * type
|
|
397
|
+
JSDocUnknownType = 192,// The ? type
|
|
398
|
+
JSDocNullableType = 193,
|
|
399
|
+
JSDocNonNullableType = 194,
|
|
400
|
+
JSDocOptionalType = 195,
|
|
401
|
+
JSDocFunctionType = 196,
|
|
402
|
+
JSDocVariadicType = 197,
|
|
403
|
+
JSDocNamepathType = 198,// https://jsdoc.app/about-namepaths.html
|
|
404
|
+
JSDoc = 199,
|
|
405
|
+
/** @deprecated Use SyntaxKind.JSDoc */
|
|
406
|
+
JSDocComment = 199,
|
|
407
|
+
JSDocText = 200,
|
|
408
|
+
JSDocTypeLiteral = 201,
|
|
409
|
+
JSDocSignature = 202,
|
|
410
|
+
JSDocLink = 203,
|
|
411
|
+
JSDocLinkCode = 204,
|
|
412
|
+
JSDocLinkPlain = 205,
|
|
413
|
+
JSDocTag = 206,
|
|
414
|
+
JSDocAugmentsTag = 207,
|
|
415
|
+
JSDocImplementsTag = 208,
|
|
416
|
+
JSDocAuthorTag = 209,
|
|
417
|
+
JSDocDeprecatedTag = 210,
|
|
418
|
+
JSDocClassTag = 211,
|
|
419
|
+
JSDocPublicTag = 212,
|
|
420
|
+
JSDocPrivateTag = 213,
|
|
421
|
+
JSDocProtectedTag = 214,
|
|
422
|
+
JSDocReadonlyTag = 215,
|
|
423
|
+
JSDocOverrideTag = 216,
|
|
424
|
+
JSDocCallbackTag = 217,
|
|
425
|
+
JSDocOverloadTag = 218,
|
|
426
|
+
JSDocEnumTag = 219,
|
|
427
|
+
JSDocParameterTag = 220,
|
|
428
|
+
JSDocReturnTag = 221,
|
|
429
|
+
JSDocThisTag = 222,
|
|
430
|
+
JSDocTypeTag = 223,
|
|
431
|
+
JSDocTemplateTag = 224,
|
|
432
|
+
JSDocTypedefTag = 225,
|
|
433
|
+
JSDocSeeTag = 226,
|
|
434
|
+
JSDocPropertyTag = 227,
|
|
435
|
+
JSDocVariableTag = 228,
|
|
436
|
+
JSDocThrowsTag = 229,
|
|
437
|
+
JSDocSatisfiesTag = 230,
|
|
438
|
+
JSDocImportTag = 231,// Last JSDoc Node
|
|
439
|
+
SyntaxList = 232,
|
|
440
|
+
NotEmittedStatement = 233,
|
|
441
|
+
PartiallyEmittedExpression = 234,
|
|
442
|
+
CommaListExpression = 235,
|
|
443
|
+
Block = 236,
|
|
444
|
+
VariableDeclaration = 237,
|
|
445
|
+
VariableDeclarationList = 238,
|
|
446
|
+
TypeAliasDeclaration = 239,
|
|
447
|
+
CaseBlock = 240,
|
|
448
|
+
StructDeclaration = 241,// WAS: ClassDeclaration,
|
|
449
|
+
VariableStatement = 242,// FirstStatement
|
|
450
|
+
ForStatement = 243,
|
|
451
|
+
ForEachStatement = 244,
|
|
452
|
+
DoWhileStatement = 245,
|
|
453
|
+
WhileStatement = 246,
|
|
454
|
+
ExpressionStatement = 247,
|
|
455
|
+
ReturnStatement = 248,
|
|
456
|
+
LabeledStatement = 249,
|
|
457
|
+
BreakStatement = 250,
|
|
458
|
+
ContinueStatement = 251,
|
|
459
|
+
InheritDeclaration = 252,
|
|
460
|
+
IfStatement = 253,
|
|
461
|
+
EmptyStatement = 254,
|
|
462
|
+
CatchStatement = 255,
|
|
463
|
+
SwitchStatement = 256,// LastStatement
|
|
464
|
+
LiteralType = 257,
|
|
465
|
+
StructType = 258,
|
|
466
|
+
InferType = 259,
|
|
467
|
+
ThisType = 260,
|
|
468
|
+
IndexedAccessType = 261,
|
|
469
|
+
NamedTupleMember = 262,
|
|
470
|
+
TypeOperator = 263,
|
|
471
|
+
MappedType = 264,
|
|
472
|
+
ArrayBindingPattern = 265,
|
|
473
|
+
BindingElement = 266,
|
|
474
|
+
ConditionalExpression = 267,
|
|
475
|
+
CatchExpression = 268,
|
|
476
|
+
BinaryExpression = 269,
|
|
477
|
+
FunctionExpression = 270,
|
|
478
|
+
ArrowFunction = 271,
|
|
479
|
+
CallExpression = 272,
|
|
480
|
+
CloneObjectExpression = 273,
|
|
481
|
+
ClassExpression = 274,
|
|
482
|
+
SyntheticExpression = 275,
|
|
483
|
+
NewExpression = 276,
|
|
484
|
+
NewStructExpression = 277,
|
|
485
|
+
EvaluateExpression = 278,
|
|
486
|
+
TypeAssertionExpression = 279,
|
|
487
|
+
ExpressionWithTypeArguments = 280,
|
|
488
|
+
ElementAccessExpression = 281,
|
|
489
|
+
RangeExpression = 282,
|
|
490
|
+
InlineClosureExpression = 283,
|
|
491
|
+
LambdaIdentifierExpression = 284,
|
|
492
|
+
LambdaOperatorExpression = 285,
|
|
493
|
+
PropertyAccessExpression = 286,
|
|
494
|
+
SuperAccessExpression = 287,
|
|
495
|
+
PostfixUnaryExpression = 288,
|
|
496
|
+
ParenthesizedExpression = 289,
|
|
497
|
+
ArrayLiteralExpression = 290,
|
|
498
|
+
MappingLiteralExpression = 291,
|
|
499
|
+
MappingEntryExpression = 292,
|
|
500
|
+
ObjectLiteralExpression = 293,
|
|
501
|
+
SpreadElement = 294,
|
|
502
|
+
ByRefElement = 295,
|
|
503
|
+
CastExpression = 296,
|
|
504
|
+
OmittedExpression = 297,
|
|
505
|
+
PrefixUnaryExpression = 298,
|
|
506
|
+
CaseClause = 299,
|
|
507
|
+
HeritageClause = 300,
|
|
508
|
+
DefaultClause = 301,
|
|
509
|
+
Count = 302,
|
|
510
|
+
FirstReservedWord = 92,
|
|
511
|
+
LastReservedWord = 132,
|
|
512
|
+
FirstKeyword = 92,
|
|
513
|
+
LastKeyword = 145,
|
|
514
|
+
FirstToken = 0,
|
|
515
|
+
LastToken = 145,
|
|
516
|
+
FirstStatement = 242,
|
|
517
|
+
LastStatement = 256,
|
|
518
|
+
FirstAssignment = 74,
|
|
519
|
+
LastAssignment = 88,
|
|
520
|
+
SuperKeyword = 71,
|
|
521
|
+
FirstTypeNode = 157,
|
|
522
|
+
LastTypeNode = 168,
|
|
523
|
+
FirstNode = 146,
|
|
524
|
+
FirstFutureReservedWord = 92,
|
|
525
|
+
LastFutureReservedWord = 145,
|
|
526
|
+
FirstJSDocNode = 188,
|
|
527
|
+
LastJSDocNode = 231,
|
|
528
|
+
FirstLiteralToken = 11,
|
|
529
|
+
LastLiteralToken = 16,
|
|
530
|
+
FirstJSDocTagNode = 188,
|
|
531
|
+
LastJSDocTagNode = 231,
|
|
532
|
+
FirstTriviaToken = 2,
|
|
533
|
+
LastTriviaToken = 8,
|
|
534
|
+
FirstBinaryOperator = 29,
|
|
535
|
+
LastBinaryOperator = 88,
|
|
536
|
+
FirstPunctuation = 17,
|
|
537
|
+
LastPunctuation = 73
|
|
538
|
+
}
|
|
539
|
+
export declare const enum TypeFlags {
|
|
540
|
+
Any = 1,
|
|
541
|
+
Unknown = 2,
|
|
542
|
+
String = 4,
|
|
543
|
+
Number = 8,
|
|
544
|
+
Boolean = 16,
|
|
545
|
+
Enum = 32,// Numeric computed enum member value
|
|
546
|
+
Float = 64,
|
|
547
|
+
StringLiteral = 128,
|
|
548
|
+
IntLiteral = 256,
|
|
549
|
+
BooleanLiteral = 512,
|
|
550
|
+
EnumLiteral = 1024,// Always combined with StringLiteral, NumberLiteral, or Union
|
|
551
|
+
FloatLiteral = 2048,
|
|
552
|
+
Bytes = 4096,
|
|
553
|
+
BytesLiteral = 8192,// unique symbol
|
|
554
|
+
Void = 16384,
|
|
555
|
+
Undefined = 32768,
|
|
556
|
+
Null = 65536,
|
|
557
|
+
Never = 131072,// Never type
|
|
558
|
+
TypeParameter = 262144,// Type parameter
|
|
559
|
+
Object = 524288,// Object type
|
|
560
|
+
Union = 1048576,// Union (T | U)
|
|
561
|
+
Intersection = 2097152,// Intersection (T & U)
|
|
562
|
+
Index = 4194304,// keyof T
|
|
563
|
+
IndexedAccess = 8388608,// T[K]
|
|
564
|
+
Conditional = 16777216,// T extends U ? X : Y
|
|
565
|
+
Substitution = 33554432,// Type parameter substitution
|
|
566
|
+
NonPrimitive = 67108864,// intrinsic object type
|
|
567
|
+
TemplateLiteral = 134217728,// Template literal type
|
|
568
|
+
StringMapping = 268435456,// Used by union/intersection type construction
|
|
569
|
+
LpcDocVariable = -2147483648,
|
|
570
|
+
Literal = 2944,
|
|
571
|
+
Unit = 101280,
|
|
572
|
+
Freshable = 2976,
|
|
573
|
+
StringOrNumberLiteral = 384,
|
|
574
|
+
PossiblyFalsy = 121820,
|
|
575
|
+
StringLike = 402653316,
|
|
576
|
+
NumberLike = 2344,
|
|
577
|
+
BooleanLike = 528,
|
|
578
|
+
EnumLike = 1056,
|
|
579
|
+
VoidLike = 49152,
|
|
580
|
+
BytesLike = 12288,
|
|
581
|
+
UnionOrIntersection = 3145728,
|
|
582
|
+
StructuredType = 3670016,
|
|
583
|
+
TypeVariable = 8650752,
|
|
584
|
+
InstantiableNonPrimitive = 58982400,
|
|
585
|
+
InstantiablePrimitive = 406847488,
|
|
586
|
+
Instantiable = 465829888,
|
|
587
|
+
StructuredOrInstantiable = 469499904,
|
|
588
|
+
Narrowable = 536624063
|
|
589
|
+
}
|
|
590
|
+
export declare const enum TypeFormatFlags {
|
|
591
|
+
None = 0,
|
|
592
|
+
NoTruncation = 1,// Don't truncate typeToString result
|
|
593
|
+
WriteArrayAsGenericType = 2,// Write Array<T> instead T[]
|
|
594
|
+
GenerateNamesForShadowedTypeParams = 4,// When a type parameter T is shadowing another T, generate a name for it so it can still be referenced
|
|
595
|
+
UseStructuralFallback = 8,// When an alias cannot be named by its symbol, rather than report an error, fallback to a structural printout if possible
|
|
596
|
+
WriteTypeArgumentsOfSignature = 32,// Write the type arguments instead of type parameters of the signature
|
|
597
|
+
UseFullyQualifiedType = 64,// Write out the fully qualified type name (eg. Module.Type, instead of Type)
|
|
598
|
+
SuppressAnyReturnType = 256,// If the return type is any-like, don't offer a return type.
|
|
599
|
+
MultilineObjectLiterals = 1024,// Always print object literals across multiple lines (only used to map into node builder flags)
|
|
600
|
+
WriteClassExpressionAsTypeLiteral = 2048,// Write a type literal instead of (Anonymous class)
|
|
601
|
+
UseTypeOfFunction = 4096,// Write typeof instead of function type literal
|
|
602
|
+
OmitParameterModifiers = 8192,// Omit modifiers on parameters
|
|
603
|
+
UseAliasDefinedOutsideCurrentScope = 16384,// For a `type T = ... ` defined in a different file, write `T` instead of its value, even though `T` can't be accessed in the current scope.
|
|
604
|
+
UseSingleQuotesForStringLiteralType = 268435456,// Use single quotes for string literal type
|
|
605
|
+
NoTypeReduction = 536870912,// Don't call getReducedType
|
|
606
|
+
OmitThisParameter = 33554432,
|
|
607
|
+
AllowUniqueESSymbolType = 1048576,// This is bit 20 to align with the same bit in `NodeBuilderFlags`
|
|
608
|
+
AddUndefined = 131072,// Add undefined to types of initialized, non-optional parameters
|
|
609
|
+
WriteArrowStyleSignature = 262144,// Write arrow style signature
|
|
610
|
+
InArrayType = 524288,// Writing an array element type
|
|
611
|
+
InElementType = 2097152,// Writing an array or union element type
|
|
612
|
+
InFirstTypeArgument = 4194304,// Writing first type argument of the instantiated type
|
|
613
|
+
InTypeAlias = 8388608,// Writing type in type alias declaration
|
|
614
|
+
NodeBuilderFlagsMask = 848330095
|
|
615
|
+
}
|
|
616
|
+
export declare const enum NodeFlags {
|
|
617
|
+
None = 0,
|
|
618
|
+
Variable = 1,// Variable declaration
|
|
619
|
+
ExternalFile = 4,// Included from an external file
|
|
620
|
+
Synthesized = 16,// Node was synthesized during transformation
|
|
621
|
+
IncludeContext = 32,// Node was parsed from an include file
|
|
622
|
+
MacroContext = 64,// Node was parsed as a result of a macro expansion
|
|
623
|
+
ExportContext = 128,// Export context (initialized by binding)
|
|
624
|
+
HasImplicitReturn = 512,// If function implicitly returns on one of codepaths (initialized by binding)
|
|
625
|
+
HasExplicitReturn = 1024,// If function has explicit reachable return on one of codepaths (initialized by binding)
|
|
626
|
+
HasAsyncFunctions = 4096,// If the file has async (i.e. LD coroutine) functions (initialized by binding)
|
|
627
|
+
DisallowInContext = 8192,// If node was parsed in a context where 'in-expressions' are not allowed
|
|
628
|
+
YieldContext = 16384,// If node was parsed in the 'yield' context created when parsing a generator
|
|
629
|
+
DisallowTypes = 32768,// If node was parsed in a context where types are not allowed
|
|
630
|
+
AwaitContext = 65536,// If node was parsed in the 'await' context created when parsing an async function
|
|
631
|
+
DisallowCommaContext = 131072,// If node was parsed in a context where comma expr are not allow
|
|
632
|
+
ThisNodeHasError = 262144,// If the parser encountered an error when parsing the code that created this node
|
|
633
|
+
DisallowConditionalTypesContext = 524288,
|
|
634
|
+
ThisNodeOrAnySubNodesHasError = 1048576,// If this node or any of its children had an error
|
|
635
|
+
HasAggregatedChildData = 2097152,// If we've computed data from children and cached it in this node
|
|
636
|
+
OptionalChain = 4194304,// not used
|
|
637
|
+
JSDoc = 16777216,// If has '@deprecated' JSDoc tag
|
|
638
|
+
ReachabilityCheckFlags = 1536,
|
|
639
|
+
ReachabilityAndEmitFlags = 1536,
|
|
640
|
+
ContextFlags = 34332768,
|
|
641
|
+
BlockScoped = 1,// Indicates whether the identifier is part of a JSDoc namespace
|
|
642
|
+
IncludeOrMacro = 96
|
|
643
|
+
}
|
|
644
|
+
export declare const enum EmitFlags {
|
|
645
|
+
None = 0,
|
|
646
|
+
SingleLine = 1,// The contents of this node should be emitted on a single line.
|
|
647
|
+
MultiLine = 2,
|
|
648
|
+
AdviseOnEmitNode = 4,// The printer should invoke the onEmitNode callback when printing this node.
|
|
649
|
+
NoSubstitution = 8,// Disables further substitution of an expression.
|
|
650
|
+
CapturesThis = 16,// The function captures a lexical `this`
|
|
651
|
+
NoLeadingSourceMap = 32,// Do not emit a leading source map location for this node.
|
|
652
|
+
NoTrailingSourceMap = 64,// Do not emit a trailing source map location for this node.
|
|
653
|
+
NoSourceMap = 96,// Do not emit a source map location for this node.
|
|
654
|
+
NoNestedSourceMaps = 128,// Do not emit source map locations for children of this node.
|
|
655
|
+
NoTokenLeadingSourceMaps = 256,// Do not emit leading source map location for token nodes.
|
|
656
|
+
NoTokenTrailingSourceMaps = 512,// Do not emit trailing source map location for token nodes.
|
|
657
|
+
NoTokenSourceMaps = 768,// Do not emit source map locations for tokens of this node.
|
|
658
|
+
NoLeadingComments = 1024,// Do not emit leading comments for this node.
|
|
659
|
+
NoTrailingComments = 2048,// Do not emit trailing comments for this node.
|
|
660
|
+
NoComments = 3072,// Do not emit comments for this node.
|
|
661
|
+
NoNestedComments = 4096,
|
|
662
|
+
HelperName = 8192,// The Identifier refers to an *unscoped* emit helper (one that is emitted at the top of the file)
|
|
663
|
+
ExportName = 16384,// Ensure an export prefix is added for an identifier that points to an exported declaration with a local name (see SymbolFlags.ExportHasLocal).
|
|
664
|
+
LocalName = 32768,// Ensure an export prefix is not added for an identifier that points to an exported declaration.
|
|
665
|
+
InternalName = 65536,// The name is internal to an ES5 class body function.
|
|
666
|
+
Indented = 131072,// Adds an explicit extra indentation level for class and function bodies when printing (used to match old emitter).
|
|
667
|
+
NoIndentation = 262144,// Do not indent the node.
|
|
668
|
+
AsyncFunctionBody = 524288,
|
|
669
|
+
ReuseTempVariableScope = 1048576,// Reuse the existing temp variable scope during emit.
|
|
670
|
+
CustomPrologue = 2097152,// Treat the statement as if it were a prologue directive (NOTE: Prologue directives are *not* transformed).
|
|
671
|
+
NoHoisting = 4194304,// Do not hoist this declaration in --module system
|
|
672
|
+
Iterator = 8388608,// The expression to a `yield*` should be treated as an Iterator when down-leveling, not an Iterable.
|
|
673
|
+
NoAsciiEscaping = 16777216
|
|
674
|
+
}
|
|
675
|
+
export declare const enum ModifierFlags {
|
|
676
|
+
None = 0,
|
|
677
|
+
Public = 1,// Property/Method
|
|
678
|
+
Private = 2,// Property/Method
|
|
679
|
+
Protected = 4,// Property/Method
|
|
680
|
+
NoMask = 32,//
|
|
681
|
+
NoShadow = 64,//
|
|
682
|
+
NoSave = 128,//
|
|
683
|
+
Static = 256,// Property/Method
|
|
684
|
+
VarArgs = 512,
|
|
685
|
+
Visible = 1024,
|
|
686
|
+
Export = 2048,// Declarations
|
|
687
|
+
Ambient = 4096,
|
|
688
|
+
Readonly = 8192,
|
|
689
|
+
In = 16384,// Contravariance modifier
|
|
690
|
+
Out = 32768,// Covariance modifier
|
|
691
|
+
Deprecated = 65536,
|
|
692
|
+
HasComputedJSDocModifiers = 268435456,// Indicates the computed modifier flags include modifiers from JSDoc.
|
|
693
|
+
HasComputedFlags = 536870912,// Modifier flags have been computed
|
|
694
|
+
AccessibilityModifier = 7,
|
|
695
|
+
ParameterPropertyModifier = 167,
|
|
696
|
+
NonPublicAccessibilityModifier = 6,
|
|
697
|
+
All = 67559,
|
|
698
|
+
Modifier = 67559
|
|
699
|
+
}
|
|
700
|
+
export declare const enum ElementFlags {
|
|
701
|
+
Required = 1,// T
|
|
702
|
+
Optional = 2,// T?
|
|
703
|
+
Rest = 4,// ...T[]
|
|
704
|
+
Variadic = 8,// ...T
|
|
705
|
+
Fixed = 3,
|
|
706
|
+
Variable = 12,
|
|
707
|
+
NonRequired = 14,
|
|
708
|
+
NonRest = 11
|
|
709
|
+
}
|
|
710
|
+
export type KeywordTypeSyntaxKind = SyntaxKind.AnyKeyword | SyntaxKind.IntKeyword | SyntaxKind.FloatKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.BytesKeyword | SyntaxKind.MappingKeyword | SyntaxKind.StatusKeyword | SyntaxKind.LwObjectKeyword | SyntaxKind.ClosureKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.BufferKeyword | SyntaxKind.MixedKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.StringKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VoidKeyword;
|
|
711
|
+
export type TokenSyntaxKind = SyntaxKind.Unknown | SyntaxKind.EndOfFileToken | TriviaSyntaxKind | LiteralSyntaxKind | PunctuationSyntaxKind | SyntaxKind.Identifier | KeywordSyntaxKind;
|
|
712
|
+
export type TypeNodeSyntaxKind = KeywordTypeSyntaxKind | SyntaxKind.TupleType | SyntaxKind.InferType | SyntaxKind.UnionType | SyntaxKind.NamedTupleMember | SyntaxKind.IndexedAccessType | SyntaxKind.StructType | SyntaxKind.ArrayType | SyntaxKind.LiteralType | SyntaxKind.ThisType | SyntaxKind.TypePredicate | SyntaxKind.MappedType | SyntaxKind.TypeLiteral | SyntaxKind.ParenthesizedType | SyntaxKind.TypeReference | SyntaxKind.ExpressionWithTypeArguments | SyntaxKind.FunctionType | SyntaxKind.ConditionalType | SyntaxKind.IntersectionType | SyntaxKind.JSDocTypeExpression | SyntaxKind.JSDocAllType | SyntaxKind.JSDocUnknownType | SyntaxKind.JSDocNonNullableType | SyntaxKind.JSDocNullableType | SyntaxKind.JSDocOptionalType | SyntaxKind.JSDocFunctionType | SyntaxKind.JSDocVariadicType | SyntaxKind.JSDocNamepathType | SyntaxKind.JSDocSignature | SyntaxKind.JSDocTypeLiteral;
|
|
713
|
+
export type PropertyName = Identifier | StringLiteral | IntLiteral | ComputedPropertyName;
|
|
714
|
+
export type MemberName = Identifier;
|
|
715
|
+
export type DeclarationName = PropertyName | StringLiteral | Expression | ElementAccessExpression | BindingPattern | EntityNameExpression;
|
|
716
|
+
export interface Symbol {
|
|
717
|
+
flags: SymbolFlags;
|
|
718
|
+
name: string;
|
|
719
|
+
declarations?: Declaration[];
|
|
720
|
+
valueDeclaration?: Declaration;
|
|
721
|
+
members?: SymbolTable;
|
|
722
|
+
exports?: SymbolTable;
|
|
723
|
+
inherits?: Map<string, Type>;
|
|
724
|
+
globalExports?: SymbolTable;
|
|
725
|
+
}
|
|
726
|
+
export interface TrueLiteral extends PrimaryExpression {
|
|
727
|
+
readonly kind: SyntaxKind.TrueKeyword;
|
|
728
|
+
}
|
|
729
|
+
export interface FalseLiteral extends PrimaryExpression {
|
|
730
|
+
readonly kind: SyntaxKind.FalseKeyword;
|
|
731
|
+
}
|
|
732
|
+
export interface NodeFactory {
|
|
733
|
+
createSourceFile(statements: readonly Statement[], endOfFileToken: EndOfFileToken, flags: NodeFlags): SourceFile;
|
|
734
|
+
createNodeArray<T extends Node>(elements?: readonly T[], hasTrailingComma?: boolean): NodeArray<T>;
|
|
735
|
+
createIntLiteral(value: string | number, numericLiteralFlags?: TokenFlags): IntLiteral;
|
|
736
|
+
createFloatLiteral(value: string | number, numericLiteralFlags?: TokenFlags): FloatLiteral;
|
|
737
|
+
createStringLiteral(text: string): StringLiteral;
|
|
738
|
+
createBytesLiteral(text: string): BytesLiteral;
|
|
739
|
+
createStringLiteralFromNode(sourceNode: PropertyNameLiteral, isSingleQuote?: boolean): StringLiteral;
|
|
740
|
+
createTrue(): TrueLiteral;
|
|
741
|
+
createFalse(): FalseLiteral;
|
|
742
|
+
createToken(token: SyntaxKind.EndOfFileToken): EndOfFileToken;
|
|
743
|
+
createToken(token: SyntaxKind.Unknown): Token<SyntaxKind.Unknown>;
|
|
744
|
+
createIdentifier(text: string): Identifier;
|
|
745
|
+
createLiteralLikeNode(kind: LiteralToken["kind"], text: string): LiteralToken;
|
|
746
|
+
createEmptyStatement(): EmptyStatement;
|
|
747
|
+
createModifier<T extends ModifierSyntaxKind>(kind: T): ModifierToken<T>;
|
|
748
|
+
createModifiersFromModifierFlags(flags: ModifierFlags): Modifier[] | undefined;
|
|
749
|
+
createQualifiedName(left: EntityName, right: string | Identifier): QualifiedName;
|
|
750
|
+
createComputedPropertyName(expression: Expression): ComputedPropertyName;
|
|
751
|
+
updateComputedPropertyName(node: ComputedPropertyName, expression: Expression): ComputedPropertyName;
|
|
752
|
+
createIndexSignature(modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration;
|
|
753
|
+
createTypeParameterDeclaration(modifiers: readonly Modifier[] | undefined, name: string | Identifier, constraint?: TypeNode, defaultType?: TypeNode): TypeParameterDeclaration;
|
|
754
|
+
updateTypeParameterDeclaration(node: TypeParameterDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration;
|
|
755
|
+
createMethodSignature(modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): MethodSignature;
|
|
756
|
+
createCallSignature(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): CallSignatureDeclaration;
|
|
757
|
+
createFunctionTypeNode(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): FunctionTypeNode;
|
|
758
|
+
createBindingElement(dotDotDotToken: DotDotDotToken | undefined, propertyName: string | PropertyName | undefined, name: string | BindingName, initializer?: Expression): BindingElement;
|
|
759
|
+
updateBindingElement(node: BindingElement, dotDotDotToken: DotDotDotToken | undefined, propertyName: PropertyName | undefined, name: BindingName, initializer: Expression | undefined): BindingElement;
|
|
760
|
+
createIncludeDirective(content: StringLiteral[], localFirst: boolean): IncludeDirective;
|
|
761
|
+
createPragmaDirective(expression: NodeArray<Identifier>): PragmaDirective;
|
|
762
|
+
createDefineDirective(name: string | Identifier | TypeNode, args: NodeArray<ParameterDeclaration>, range: TextRange): DefineDirective;
|
|
763
|
+
createUndefDirective(name: string | Identifier): UndefDirective;
|
|
764
|
+
createTypePredicateNode(assertsModifier: undefined, parameterName: Identifier | ThisTypeNode | string, type: TypeNode | undefined): TypePredicateNode;
|
|
765
|
+
updateTypePredicateNode(node: TypePredicateNode, assertsModifier: undefined, parameterName: Identifier | ThisTypeNode, type: TypeNode | undefined): TypePredicateNode;
|
|
766
|
+
createKeywordTypeNode<TKind extends KeywordTypeSyntaxKind>(kind: TKind): KeywordTypeNode<TKind>;
|
|
767
|
+
createTypeReferenceNode(typeName: string | EntityName, typeArguments?: readonly TypeNode[]): TypeReferenceNode;
|
|
768
|
+
updateTypeReferenceNode(node: TypeReferenceNode, typeName: EntityName, typeArguments: NodeArray<TypeNode> | undefined): TypeReferenceNode;
|
|
769
|
+
createUnionTypeNode(types: readonly TypeNode[]): UnionTypeNode;
|
|
770
|
+
createIntersectionTypeNode(types: readonly TypeNode[]): IntersectionTypeNode;
|
|
771
|
+
createArrayTypeNode(elementType: TypeNode): ArrayTypeNode;
|
|
772
|
+
createParenthesizedType(type: TypeNode): ParenthesizedTypeNode;
|
|
773
|
+
createLiteralTypeNode(literal: LiteralTypeNode["literal"]): LiteralTypeNode;
|
|
774
|
+
createTypeLiteralNode(members: readonly TypeElement[] | undefined): TypeLiteralNode;
|
|
775
|
+
createStructTypeNode(name: Identifier): StructTypeNode;
|
|
776
|
+
createPropertySignature(modifiers: readonly Modifier[] | undefined, name: PropertyName | string, type: TypeNode | undefined): PropertySignature;
|
|
777
|
+
createStructDeclarationNode(modifiers: readonly Modifier[] | undefined, name: Identifier, heritageName: Identifier | undefined, type: TypeNode): StructDeclaration;
|
|
778
|
+
createBlock(statements: readonly Statement[], multiLine?: boolean): Block;
|
|
779
|
+
createVariableStatement(modifiers: readonly Modifier[] | undefined, type: TypeNode | undefined, declarationList: VariableDeclarationList | readonly VariableDeclaration[]): VariableStatement;
|
|
780
|
+
createVariableDeclarationList(declarations: readonly VariableDeclaration[], flags?: NodeFlags): VariableDeclarationList;
|
|
781
|
+
createVariableDeclaration(name: string | BindingName, refToken?: RefToken, type?: TypeNode | undefined, initializer?: Expression | undefined): VariableDeclaration;
|
|
782
|
+
createFunctionDeclaration(modifiers: readonly Modifier[] | undefined, name: string | Identifier | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration;
|
|
783
|
+
createExpressionStatement(expression: Expression): ExpressionStatement;
|
|
784
|
+
createReturnStatement(expression?: Expression): ReturnStatement;
|
|
785
|
+
createBreakStatement(label?: string | Identifier): BreakStatement;
|
|
786
|
+
createContinueStatement(label?: string | Identifier): ContinueStatement;
|
|
787
|
+
createInheritDeclaration(importClause: InheritClauseNodeType, modifiers: readonly Modifier[] | undefined): InheritDeclaration;
|
|
788
|
+
createIfStatement(expression: Expression, thenStatement: Statement, elseStatement?: Statement): IfStatement;
|
|
789
|
+
createSwitchStatement(expression: Expression, preBlock: NodeArray<Statement>, caseBlock: CaseBlock): SwitchStatement;
|
|
790
|
+
createCaseBlock(clauses: readonly CaseOrDefaultClause[]): CaseBlock;
|
|
791
|
+
createDefaultClause(statements: readonly Statement[]): DefaultClause;
|
|
792
|
+
createCaseClause(expression: Expression, statements: readonly Statement[]): CaseClause;
|
|
793
|
+
createForStatement(initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement): ForStatement;
|
|
794
|
+
createForEachStatement(initializer: ForInitializer | undefined, range: Expression | undefined, statement: Statement): ForEachStatement;
|
|
795
|
+
createDoWhileStatement(statement: Statement, expression: Expression): DoWhileStatement;
|
|
796
|
+
createWhileStatement(statement: Statement, expression: Expression): WhileStatement;
|
|
797
|
+
createParameterDeclaration(modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, ampToken?: AmpersandToken | RefToken, type?: TypeNode, initializer?: Expression): ParameterDeclaration;
|
|
798
|
+
createCatchStatement(expression: Expression | undefined, block: Block): CatchStatement;
|
|
799
|
+
createExpressionWithTypeArguments(expression: Expression, typeArguments: readonly TypeNode[] | undefined): ExpressionWithTypeArguments;
|
|
800
|
+
createCatchExpression(expression: Expression, modifier?: Identifier, modifierExpression?: Expression, block?: Block): CatchExpression;
|
|
801
|
+
createEvaluateExpression(expression: Expression, argumentsArray: readonly Expression[] | undefined): EvaluateExpression;
|
|
802
|
+
createNewExpression(expression: Expression | TypeNode | undefined, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly NewExpressionArgument[] | undefined): NewExpression;
|
|
803
|
+
createSpreadElement(expression: Expression): SpreadElement;
|
|
804
|
+
createByRefElement(ampToken: AmpersandToken | RefToken, expr: Expression): ByRefElement;
|
|
805
|
+
createFunctionExpression(modifiers: readonly Modifier[] | undefined, name: string | Identifier | undefined, parameters: readonly ParameterDeclaration[] | undefined, type: TypeNode | undefined, body: Block): FunctionExpression;
|
|
806
|
+
createOmittedExpression(): OmittedExpression;
|
|
807
|
+
createParenthesizedExpression(expression: Expression): ParenthesizedExpression;
|
|
808
|
+
createConditionalExpression(condition: Expression, questionToken: QuestionToken | undefined, whenTrue: Expression, colonToken: ColonToken | undefined, whenFalse: Expression): ConditionalExpression;
|
|
809
|
+
createBinaryExpression(left: Expression, operator: BinaryOperator | BinaryOperatorToken, right: Expression): BinaryExpression;
|
|
810
|
+
createCallExpression(expression: Expression, argumentsArray: readonly Expression[] | undefined): CallExpression;
|
|
811
|
+
createInlineClosure(body: ConciseBody | NodeArray<Expression>): InlineClosureExpression;
|
|
812
|
+
createSuperAccessExpression(name: MemberName, namespace?: string | StringLiteral | Identifier): SuperAccessExpression;
|
|
813
|
+
createPropertyAccessExpression(expression: Expression, name: string | Identifier | Expression, propertyAccessToken?: PropertyAccessToken): PropertyAccessExpression;
|
|
814
|
+
createPrefixUnaryExpression(operator: PrefixUnaryOperator, operand: Expression): PrefixUnaryExpression;
|
|
815
|
+
createPostfixUnaryExpression(operand: Expression, operator: PostfixUnaryOperator): PostfixUnaryExpression;
|
|
816
|
+
createElementAccessExpression(expression: Expression, index: number | Expression): ElementAccessExpression;
|
|
817
|
+
createArrayLiteralExpression(elements?: readonly Expression[], multiLine?: boolean, trailingComma?: boolean): any;
|
|
818
|
+
createObjectLiteralExpression(properties?: readonly ObjectLiteralElementLike[], multiLine?: boolean): ObjectLiteralExpression;
|
|
819
|
+
createMappingLiteralExpression(initializer?: Expression, elements?: readonly Expression[], multiLine?: boolean, trailingComma?: boolean): MappingLiteralExpression;
|
|
820
|
+
createMappingEntryExpression(name: Expression, elements: readonly Expression[]): MappingEntryExpression;
|
|
821
|
+
convertToAssignmentExpression(node: Mutable<VariableDeclaration>): BinaryExpression;
|
|
822
|
+
createLambdaOperatorExpression(op: LambdaOperatorToken): LambdaOperatorExpression;
|
|
823
|
+
createLambdaIdentifierExpression(name: Expression): LambdaIdentifierExpression;
|
|
824
|
+
createCastExpression(expression: Expression, type: TypeNode): Expression;
|
|
825
|
+
createCloneObjectExpression(expression: Expression, argumentsArray: readonly Expression[] | undefined): CloneObjectExpression;
|
|
826
|
+
createTypeAssertion(type: TypeNode, expression: Expression): TypeAssertion;
|
|
827
|
+
createNewStructExpression(type: StructTypeNode, argumentsArray: readonly (Expression | ObjectLiteralElementLike)[] | undefined): NewStructExpression;
|
|
828
|
+
createRangeExpression(left: Expression, right: Expression): RangeExpression;
|
|
829
|
+
createJSDocText(text: string): JSDocText;
|
|
830
|
+
createJSDocComment(comment?: string | NodeArray<JSDocComment> | undefined, tags?: readonly JSDocTag[] | undefined): JSDoc;
|
|
831
|
+
createJSDocParameterTag(tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, isNameFirst?: boolean, comment?: string | NodeArray<JSDocComment>): JSDocParameterTag;
|
|
832
|
+
createJSDocReturnTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocReturnTag;
|
|
833
|
+
createJSDocOptionalType(type: TypeNode): JSDocOptionalType;
|
|
834
|
+
createJSDocTypeTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocTypeTag;
|
|
835
|
+
createJSDocTypeExpression(type: TypeNode): JSDocTypeExpression;
|
|
836
|
+
createJSDocNameReference(name: EntityName | JSDocMemberName): JSDocNameReference;
|
|
837
|
+
createJSDocLink(name: EntityName | JSDocMemberName | undefined, text: string): JSDocLink;
|
|
838
|
+
createJSDocLinkCode(name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkCode;
|
|
839
|
+
createJSDocLinkPlain(name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkPlain;
|
|
840
|
+
createJSDocClassTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocClassTag;
|
|
841
|
+
createJSDocPublicTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocPublicTag;
|
|
842
|
+
createJSDocPrivateTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocPrivateTag;
|
|
843
|
+
createJSDocProtectedTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocProtectedTag;
|
|
844
|
+
createJSDocDeprecatedTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocDeprecatedTag;
|
|
845
|
+
createJSDocOverrideTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocOverrideTag;
|
|
846
|
+
createJSDocUnknownTag(tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocUnknownTag;
|
|
847
|
+
createJSDocPropertyTag(tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, isNameFirst?: boolean, comment?: string | NodeArray<JSDocComment>): JSDocPropertyTag;
|
|
848
|
+
createJSDocVariableTag(tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, isNameFirst?: boolean, comment?: string | NodeArray<JSDocComment>): JSDocVariableTag;
|
|
849
|
+
createJSDocTypeLiteral(propertyTags?: readonly JSDocPropertyLikeTag[], isArrayType?: boolean): JSDocTypeLiteral;
|
|
850
|
+
createJSDocSeeTag(tagName: Identifier | undefined, name: JSDocNameReference | undefined, comment?: string | NodeArray<JSDocComment>): JSDocSeeTag;
|
|
851
|
+
createJSDocAuthorTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocAuthorTag;
|
|
852
|
+
createJSDocThrowsTag(tagName: Identifier, typeExpression: JSDocTypeExpression | undefined, comment?: string | NodeArray<JSDocComment>): JSDocThrowsTag;
|
|
853
|
+
createJSDocImplementsTag(tagName: Identifier | undefined, className: JSDocImplementsTag["class"], comment?: string | NodeArray<JSDocComment>): JSDocImplementsTag;
|
|
854
|
+
createJSDocTypedefTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | JSDocTypeLiteral, fullName?: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocTypedefTag;
|
|
855
|
+
createJSDocAugmentsTag(tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment?: string | NodeArray<JSDocComment>): JSDocAugmentsTag;
|
|
856
|
+
createJSDocSatisfiesTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocSatisfiesTag;
|
|
857
|
+
createJSDocThisTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocThisTag;
|
|
858
|
+
createJSDocVariadicType(type: TypeNode): JSDocVariadicType;
|
|
859
|
+
createJSDocSignature(typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type?: JSDocReturnTag): JSDocSignature;
|
|
860
|
+
createJSDocCallbackTag(tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocCallbackTag;
|
|
861
|
+
createJSDocOverloadTag(tagName: Identifier | undefined, typeExpression: JSDocSignature, comment?: string | NodeArray<JSDocComment>): JSDocOverloadTag;
|
|
862
|
+
createJSDocTemplateTag(tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment?: string | NodeArray<JSDocComment>): JSDocTemplateTag;
|
|
863
|
+
createPropertyAssignment(name: string | PropertyName, initializer: Expression): PropertyAssignment;
|
|
864
|
+
}
|
|
865
|
+
export interface CompilerOptions {
|
|
866
|
+
skipLibCheck?: boolean;
|
|
867
|
+
skipDefaultLibCheck?: boolean;
|
|
868
|
+
allowArbitraryExtensions?: boolean;
|
|
869
|
+
traceResolution?: boolean;
|
|
870
|
+
allowUnreachableCode?: boolean;
|
|
871
|
+
noUncheckedIndexedAccess?: boolean;
|
|
872
|
+
noFallthroughCasesInSwitch?: boolean;
|
|
873
|
+
noCheck?: boolean;
|
|
874
|
+
noUnusedLocals?: boolean;
|
|
875
|
+
noUnusedParameters?: boolean;
|
|
876
|
+
noImplicitReturns?: boolean;
|
|
877
|
+
strictObjectTypes?: boolean;
|
|
878
|
+
newLine?: NewLineKind;
|
|
879
|
+
configFile?: LpcConfigSourceFile;
|
|
880
|
+
sefunFile?: string;
|
|
881
|
+
masterFile?: string;
|
|
882
|
+
playerFile?: string;
|
|
883
|
+
configDefines?: MapLike<string>;
|
|
884
|
+
forceConsistentCasingInFileNames?: boolean;
|
|
885
|
+
noResolve?: boolean;
|
|
886
|
+
noLib?: boolean;
|
|
887
|
+
maxNodeModuleJsDepth?: number;
|
|
888
|
+
getCompilationSettings?: any;
|
|
889
|
+
configFilePath?: string;
|
|
890
|
+
driverType?: LanguageVariant;
|
|
891
|
+
rootDir?: string;
|
|
892
|
+
rootDirs?: string[];
|
|
893
|
+
outDir?: string;
|
|
894
|
+
declarationDir?: string;
|
|
895
|
+
outFile?: string;
|
|
896
|
+
paths?: MapLike<string[]>;
|
|
897
|
+
lib?: string[];
|
|
898
|
+
preserveSymlinks?: boolean;
|
|
899
|
+
disableSourceOfProjectReferenceRedirect?: boolean;
|
|
900
|
+
disableReferencedProjectLoad?: boolean;
|
|
901
|
+
module?: ModuleKind;
|
|
902
|
+
target?: ScriptTarget;
|
|
903
|
+
exactOptionalPropertyTypes?: boolean;
|
|
904
|
+
diagnostics?: boolean;
|
|
905
|
+
libIncludeDirs?: string[];
|
|
906
|
+
globalIncludeFiles?: string[];
|
|
907
|
+
resolvedGlobalIncludeFiles?: string[];
|
|
908
|
+
[option: string]: CompilerOptionsValue | LpcConfigSourceFile | undefined;
|
|
909
|
+
}
|
|
910
|
+
export declare const enum OuterExpressionKinds {
|
|
911
|
+
Parentheses = 1,
|
|
912
|
+
/** @deprecated not supported in lpc */
|
|
913
|
+
TypeAssertions = 2,
|
|
914
|
+
/** @deprecated not supported in lpc */
|
|
915
|
+
NonNullAssertions = 4,
|
|
916
|
+
PartiallyEmittedExpressions = 8,
|
|
917
|
+
Assertions = 6,
|
|
918
|
+
All = 15,
|
|
919
|
+
ExcludeJSDocTypeAssertion = 16
|
|
920
|
+
}
|
|
921
|
+
/** DIAGNOSTICS */
|
|
922
|
+
export interface DiagnosticMessage {
|
|
923
|
+
key: string;
|
|
924
|
+
category: DiagnosticCategory;
|
|
925
|
+
code: number;
|
|
926
|
+
message: string;
|
|
927
|
+
reportsUnnecessary?: {};
|
|
928
|
+
reportsDeprecated?: {};
|
|
929
|
+
}
|
|
930
|
+
export declare enum DiagnosticCategory {
|
|
931
|
+
Warning = 0,
|
|
932
|
+
Error = 1,
|
|
933
|
+
Suggestion = 2,
|
|
934
|
+
Message = 3
|
|
935
|
+
}
|
|
936
|
+
export interface DiagnosticRelatedInformation {
|
|
937
|
+
category: DiagnosticCategory;
|
|
938
|
+
code: number;
|
|
939
|
+
file: SourceFileBase | undefined;
|
|
940
|
+
start: number | undefined;
|
|
941
|
+
length: number | undefined;
|
|
942
|
+
messageText: string | DiagnosticMessageChain;
|
|
943
|
+
}
|
|
944
|
+
export interface DiagnosticWithLocation extends Diagnostic {
|
|
945
|
+
file: SourceFileBase;
|
|
946
|
+
start: number;
|
|
947
|
+
length: number;
|
|
948
|
+
}
|
|
949
|
+
/**
|
|
950
|
+
* A linked list of formatted diagnostic messages to be used as part of a multiline message.
|
|
951
|
+
* It is built from the bottom up, leaving the head to be the "main" diagnostic.
|
|
952
|
+
* While it seems that DiagnosticMessageChain is structurally similar to DiagnosticMessage,
|
|
953
|
+
* the difference is that messages are all preformatted in DMC.
|
|
954
|
+
*/
|
|
955
|
+
export interface DiagnosticMessageChain {
|
|
956
|
+
messageText: string;
|
|
957
|
+
category: DiagnosticCategory;
|
|
958
|
+
code: number;
|
|
959
|
+
next?: DiagnosticMessageChain[];
|
|
960
|
+
}
|
|
961
|
+
export interface Diagnostic extends DiagnosticRelatedInformation {
|
|
962
|
+
/** May store more in future. For now, this will simply be `true` to indicate when a diagnostic is an unused-identifier diagnostic. */
|
|
963
|
+
reportsUnnecessary?: {};
|
|
964
|
+
reportsDeprecated?: {};
|
|
965
|
+
source?: string;
|
|
966
|
+
relatedInformation?: DiagnosticRelatedInformation[];
|
|
967
|
+
}
|
|
968
|
+
export type FunctionLikeDeclaration = FunctionDeclaration | InlineClosureExpression | MethodDeclaration | FunctionExpression | ArrowFunction;
|
|
969
|
+
/** NODES */
|
|
970
|
+
export type HasJSDoc = IncludeDirective | CatchStatement | FunctionExpression | SuperAccessExpression | DefineDirective | UndefDirective | Block | StructDeclaration | PropertySignature | MethodSignature | InlineClosureExpression | InheritDeclaration | SwitchStatement | CaseClause | BreakStatement | ContinueStatement | IfStatement | ParenthesizedExpression | ExpressionStatement | EmptyStatement | EndOfFileToken | DoWhileStatement | ForStatement | ForEachStatement | FunctionDeclaration | ArrowFunction | ReturnStatement | ParameterDeclaration | VariableStatement | VariableDeclaration | WhileStatement | PropertyAssignment | ElementAccessExpression | ShorthandPropertyAssignment;
|
|
971
|
+
export type HasType = SignatureDeclaration | VariableStatement | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | ParenthesizedTypeNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocVariadicType;
|
|
972
|
+
export type HasExpressionInitializer = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyDeclaration | PropertyAssignment;
|
|
973
|
+
export type HasInitializer = HasExpressionInitializer | ForStatement | ForEachStatement;
|
|
974
|
+
export type HasModifiers = TypeParameterDeclaration | ParameterDeclaration | StructDeclaration | FunctionLikeDeclaration | PropertySignature | PropertyDeclaration | MethodSignature | MethodDeclaration | IndexSignatureDeclaration | FunctionExpression | ArrowFunction | ClassExpression | VariableStatement | FunctionDeclaration | ClassDeclaration | TypeAliasDeclaration;
|
|
975
|
+
export interface NodeArray<T extends Node> extends ReadonlyArray<T>, ReadonlyTextRange {
|
|
976
|
+
readonly hasTrailingComma: boolean;
|
|
977
|
+
readonly isComplete?: boolean;
|
|
978
|
+
}
|
|
979
|
+
export interface Token<TKind extends SyntaxKind> extends Node {
|
|
980
|
+
readonly kind: TKind;
|
|
981
|
+
}
|
|
982
|
+
export type EndOfFileToken = Token<SyntaxKind.EndOfFileToken> & JSDocContainer;
|
|
983
|
+
export type DirectiveSyntaxKind = SyntaxKind.IncludeDirective | SyntaxKind.DefineDirective | SyntaxKind.UndefDirective | SyntaxKind.IfDirective | SyntaxKind.IfDefDirective | SyntaxKind.IfNDefDirective | SyntaxKind.ElseDirective | SyntaxKind.ElseIfDirective | SyntaxKind.EndIfDirective | SyntaxKind.PragmaDirective;
|
|
984
|
+
export type KeywordSyntaxKind = SyntaxKind.AnyKeyword | SyntaxKind.TrueKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FunctionsKeyword | SyntaxKind.VirtualKeyword | SyntaxKind.IsKeyword | SyntaxKind.RefKeyword | SyntaxKind.StatusKeyword | SyntaxKind.BytesKeyword | SyntaxKind.LwObjectKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClosureKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.BufferKeyword | SyntaxKind.ClassKeyword | SyntaxKind.CaseKeyword | SyntaxKind.ClosureKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.BreakKeyword | SyntaxKind.VoidKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.ForKeyword | SyntaxKind.ForEachKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.IfKeyword | SyntaxKind.InKeyword | SyntaxKind.InheritKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.WhileKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.StaticKeyword | SyntaxKind.VisibleKeyword | SyntaxKind.NoSaveKeyword | SyntaxKind.NoShadowKeyword | SyntaxKind.NoMaskKeyword | SyntaxKind.VarArgsKeyword | SyntaxKind.DeprecatedKeyword | SyntaxKind.IntKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.StringKeyword | SyntaxKind.FloatKeyword | SyntaxKind.MixedKeyword | SyntaxKind.MappingKeyword | SyntaxKind.StructKeyword | SyntaxKind.UnknownKeyword;
|
|
985
|
+
export type ModifierSyntaxKind = SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.StaticKeyword | SyntaxKind.VisibleKeyword | SyntaxKind.NoSaveKeyword | SyntaxKind.NoShadowKeyword | SyntaxKind.NoMaskKeyword | SyntaxKind.VarArgsKeyword | SyntaxKind.DeprecatedKeyword;
|
|
986
|
+
export interface KeywordToken<TKind extends KeywordSyntaxKind> extends Token<TKind> {
|
|
987
|
+
}
|
|
988
|
+
export interface KeywordTypeNode<TKind extends KeywordTypeSyntaxKind = KeywordTypeSyntaxKind> extends KeywordToken<TKind>, TypeNode {
|
|
989
|
+
readonly kind: TKind;
|
|
990
|
+
}
|
|
991
|
+
export type CaseKeyword = KeywordToken<SyntaxKind.CaseKeyword>;
|
|
992
|
+
export type RefToken = KeywordToken<SyntaxKind.RefKeyword>;
|
|
993
|
+
export interface ModifierToken<TKind extends ModifierSyntaxKind> extends KeywordToken<TKind> {
|
|
994
|
+
}
|
|
995
|
+
export type PrivateKeyword = ModifierToken<SyntaxKind.PrivateKeyword>;
|
|
996
|
+
export type ProtectedKeyword = ModifierToken<SyntaxKind.ProtectedKeyword>;
|
|
997
|
+
export type PublicKeyword = ModifierToken<SyntaxKind.PublicKeyword>;
|
|
998
|
+
export type StaticKeyword = ModifierToken<SyntaxKind.StaticKeyword>;
|
|
999
|
+
export type VisibleKeyword = ModifierToken<SyntaxKind.VisibleKeyword>;
|
|
1000
|
+
export type NoSaveKeyword = ModifierToken<SyntaxKind.NoSaveKeyword>;
|
|
1001
|
+
export type NoShadowKeyword = ModifierToken<SyntaxKind.NoShadowKeyword>;
|
|
1002
|
+
export type NoMaskKeyword = ModifierToken<SyntaxKind.NoMaskKeyword>;
|
|
1003
|
+
export type VarArgsKeyword = ModifierToken<SyntaxKind.VarArgsKeyword>;
|
|
1004
|
+
export type DeprecatedKeyword = ModifierToken<SyntaxKind.DeprecatedKeyword>;
|
|
1005
|
+
export type Modifier = PrivateKeyword | ProtectedKeyword | PublicKeyword | StaticKeyword | VisibleKeyword | NoSaveKeyword | NoShadowKeyword | NoMaskKeyword | VarArgsKeyword | DeprecatedKeyword;
|
|
1006
|
+
/**
|
|
1007
|
+
* @deprecated for easy portion of typescript code - use Modifier
|
|
1008
|
+
*/
|
|
1009
|
+
export type ModifierLike = Modifier;
|
|
1010
|
+
export type PunctuationSyntaxKind = SyntaxKind.OpenParenBracketToken | SyntaxKind.OpenParenAsteriskToken | SyntaxKind.LambdaToken | SyntaxKind.OpenParenBraceToken | SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.OpenParenToken | SyntaxKind.CloseParenToken | SyntaxKind.OpenParenColonToken | SyntaxKind.ColonCloseParenToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.DotToken | SyntaxKind.DotDotDotToken | SyntaxKind.SemicolonToken | SyntaxKind.CommaToken | SyntaxKind.QuestionDotToken | SyntaxKind.LessThanToken | SyntaxKind.LessThanSlashToken | SyntaxKind.GreaterThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.EqualsEqualsToken | SyntaxKind.ExclamationEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.EqualsGreaterThanToken | SyntaxKind.MinusGreaterThanToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.AsteriskToken | SyntaxKind.AsteriskAsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken | SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken | SyntaxKind.ExclamationToken | SyntaxKind.DoubleExclamationToken | SyntaxKind.TildeToken | SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.QuestionToken | SyntaxKind.ColonToken | SyntaxKind.AtToken | SyntaxKind.AtAtToken | SyntaxKind.EqualsToken | SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.ColonToken | SyntaxKind.CaretEqualsToken;
|
|
1011
|
+
export type ExponentiationOperator = SyntaxKind.AsteriskAsteriskToken;
|
|
1012
|
+
export type MultiplicativeOperator = SyntaxKind.AsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken;
|
|
1013
|
+
export type MultiplicativeOperatorOrHigher = ExponentiationOperator | MultiplicativeOperator;
|
|
1014
|
+
export type AdditiveOperator = SyntaxKind.PlusToken | SyntaxKind.MinusToken;
|
|
1015
|
+
export type AdditiveOperatorOrHigher = MultiplicativeOperatorOrHigher | AdditiveOperator;
|
|
1016
|
+
export type ShiftOperator = SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken;
|
|
1017
|
+
export type ShiftOperatorOrHigher = AdditiveOperatorOrHigher | ShiftOperator;
|
|
1018
|
+
export type RelationalOperator = SyntaxKind.LessThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.InKeyword;
|
|
1019
|
+
export type RelationalOperatorOrHigher = ShiftOperatorOrHigher | RelationalOperator;
|
|
1020
|
+
export type EqualityOperator = SyntaxKind.EqualsEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.ExclamationEqualsToken;
|
|
1021
|
+
export type EqualityOperatorOrHigher = RelationalOperatorOrHigher | EqualityOperator;
|
|
1022
|
+
export type BitwiseOperator = SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken;
|
|
1023
|
+
export type BitwiseOperatorOrHigher = EqualityOperatorOrHigher | BitwiseOperator;
|
|
1024
|
+
export type LogicalOperator = SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken;
|
|
1025
|
+
export type LogicalOperatorOrHigher = BitwiseOperatorOrHigher | LogicalOperator;
|
|
1026
|
+
export type CompoundAssignmentOperator = SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.BarBarEqualsToken;
|
|
1027
|
+
export type AssignmentOperator = SyntaxKind.EqualsToken | CompoundAssignmentOperator;
|
|
1028
|
+
export type AssignmentOperatorOrHigher = LogicalOperatorOrHigher | AssignmentOperator;
|
|
1029
|
+
export type BinaryOperator = AssignmentOperatorOrHigher | SyntaxKind.CommaToken;
|
|
1030
|
+
export type BinaryOperatorToken = Token<BinaryOperator>;
|
|
1031
|
+
export type LogicalOrCoalescingAssignmentOperator = SyntaxKind.BarBarEqualsToken;
|
|
1032
|
+
export type LambdaOperatorToken = Token<PunctuationSyntaxKind>;
|
|
1033
|
+
export interface PunctuationToken<TKind extends PunctuationSyntaxKind> extends Token<TKind> {
|
|
1034
|
+
}
|
|
1035
|
+
export type DotToken = PunctuationToken<SyntaxKind.DotToken>;
|
|
1036
|
+
export type AmpersandToken = PunctuationToken<SyntaxKind.AmpersandToken>;
|
|
1037
|
+
export type DotDotDotToken = PunctuationToken<SyntaxKind.DotDotDotToken>;
|
|
1038
|
+
export type QuestionToken = PunctuationToken<SyntaxKind.QuestionToken>;
|
|
1039
|
+
export type ExclamationToken = PunctuationToken<SyntaxKind.ExclamationToken>;
|
|
1040
|
+
export type DoubleExclamationToken = PunctuationToken<SyntaxKind.DoubleExclamationToken>;
|
|
1041
|
+
export type ColonToken = PunctuationToken<SyntaxKind.ColonToken>;
|
|
1042
|
+
export type EqualsToken = PunctuationToken<SyntaxKind.EqualsToken>;
|
|
1043
|
+
export type BarBarEqualsToken = PunctuationToken<SyntaxKind.BarBarEqualsToken>;
|
|
1044
|
+
export type AsteriskToken = PunctuationToken<SyntaxKind.AsteriskToken>;
|
|
1045
|
+
export type EqualsGreaterThanToken = PunctuationToken<SyntaxKind.EqualsGreaterThanToken>;
|
|
1046
|
+
export type MinusGreaterThanToken = PunctuationToken<SyntaxKind.MinusGreaterThanToken>;
|
|
1047
|
+
export type PlusToken = PunctuationToken<SyntaxKind.PlusToken>;
|
|
1048
|
+
export type MinusToken = PunctuationToken<SyntaxKind.MinusToken>;
|
|
1049
|
+
export type PropertyAccessToken = DotToken | MinusGreaterThanToken;
|
|
1050
|
+
export type JSDocImportCandidateNode = JSDocParameterTag | JSDocTypeTag | JSDocTypedefTag | JSDocVariableTag | JSDocPropertyTag | JSDocReturnTag;
|
|
1051
|
+
export type JSDocSyntaxKind = SyntaxKind.EndOfFileToken | SyntaxKind.WhitespaceTrivia | SyntaxKind.AtToken | SyntaxKind.NewLineTrivia | SyntaxKind.AsteriskToken | SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.LessThanToken | SyntaxKind.GreaterThanToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.OpenParenToken | SyntaxKind.CloseParenToken | SyntaxKind.EqualsToken | SyntaxKind.CommaToken | SyntaxKind.DotToken | SyntaxKind.Identifier | SyntaxKind.BacktickToken | SyntaxKind.HashToken | SyntaxKind.Unknown | KeywordSyntaxKind;
|
|
1052
|
+
export interface ConditionalExpression extends Expression {
|
|
1053
|
+
readonly kind: SyntaxKind.ConditionalExpression;
|
|
1054
|
+
readonly condition: Expression;
|
|
1055
|
+
readonly questionToken: QuestionToken;
|
|
1056
|
+
readonly whenTrue: Expression;
|
|
1057
|
+
readonly colonToken: ColonToken;
|
|
1058
|
+
readonly whenFalse: Expression;
|
|
1059
|
+
}
|
|
1060
|
+
export interface FlowContainer extends Node {
|
|
1061
|
+
_flowContainerBrand: any;
|
|
1062
|
+
}
|
|
1063
|
+
export type FlowType = Type | IncompleteType;
|
|
1064
|
+
export interface IncompleteType {
|
|
1065
|
+
flags: TypeFlags | 0;
|
|
1066
|
+
type: Type;
|
|
1067
|
+
}
|
|
1068
|
+
export interface LineAndCharacter {
|
|
1069
|
+
/** 0-based. */
|
|
1070
|
+
line: number;
|
|
1071
|
+
character: number;
|
|
1072
|
+
}
|
|
1073
|
+
/**
|
|
1074
|
+
* Subset of properties from SourceFile that are used in multiple utility functions
|
|
1075
|
+
*/
|
|
1076
|
+
export interface SourceFileLike {
|
|
1077
|
+
readonly text: string;
|
|
1078
|
+
readonly fileName: string;
|
|
1079
|
+
}
|
|
1080
|
+
export type SourceFileBaseSyntaxKind = SyntaxKind.SourceFile | SyntaxKind.IncludeDirective;
|
|
1081
|
+
export interface SourceFileBase {
|
|
1082
|
+
readonly kind: SourceFileBaseSyntaxKind;
|
|
1083
|
+
readonly text: string;
|
|
1084
|
+
readonly fileName: string;
|
|
1085
|
+
languageVersion: ScriptTarget;
|
|
1086
|
+
languageVariant: LanguageVariant;
|
|
1087
|
+
}
|
|
1088
|
+
export interface HasHeritageContainer {
|
|
1089
|
+
_hasHeritageBrand: any;
|
|
1090
|
+
heritageClauses?: NodeArray<InheritDeclaration>;
|
|
1091
|
+
}
|
|
1092
|
+
export interface SourceFile extends Declaration, LocalsContainer, HasHeritageContainer, SourceFileBase {
|
|
1093
|
+
readonly kind: SyntaxKind.SourceFile;
|
|
1094
|
+
readonly statements: NodeArray<Statement>;
|
|
1095
|
+
readonly endOfFileToken: Token<SyntaxKind.EndOfFileToken>;
|
|
1096
|
+
fileName: string;
|
|
1097
|
+
text: string;
|
|
1098
|
+
referencedFiles: readonly FileReference[];
|
|
1099
|
+
libReferenceDirectives: readonly FileReference[];
|
|
1100
|
+
isDeclarationFile: boolean;
|
|
1101
|
+
isDefaultLib: boolean;
|
|
1102
|
+
languageVersion: ScriptTarget;
|
|
1103
|
+
languageVariant: LanguageVariant;
|
|
1104
|
+
/**
|
|
1105
|
+
* When `module` is `Node16` or `NodeNext`, this field controls whether the
|
|
1106
|
+
* source file in question is an ESNext-output-format file, or a CommonJS-output-format
|
|
1107
|
+
* module. This is derived by the module resolver as it looks up the file, since
|
|
1108
|
+
* it is derived from either the file extension of the module, or the containing
|
|
1109
|
+
* `package.json` context, and affects both checking and emit.
|
|
1110
|
+
*
|
|
1111
|
+
* It is _public_ so that (pre)transformers can set this field,
|
|
1112
|
+
* since it switches the builtin `node` module transform. Generally speaking, if unset,
|
|
1113
|
+
* the field is treated as though it is `ModuleKind.CommonJS`.
|
|
1114
|
+
*
|
|
1115
|
+
* Note that this field is only set by the module resolution process when
|
|
1116
|
+
* `moduleResolution` is `Node16` or `NodeNext`, which is implied by the `module` setting
|
|
1117
|
+
* of `Node16` or `NodeNext`, respectively, but may be overriden (eg, by a `moduleResolution`
|
|
1118
|
+
* of `node`). If so, this field will be unset and source files will be considered to be
|
|
1119
|
+
* CommonJS-output-format by the node module transformer and type checker, regardless of extension or context.
|
|
1120
|
+
*/
|
|
1121
|
+
impliedNodeFormat?: ResolutionMode;
|
|
1122
|
+
/**
|
|
1123
|
+
* Array of text ranges that are inactive due to directives
|
|
1124
|
+
*/
|
|
1125
|
+
inactiveCodeRanges?: readonly TextRange[];
|
|
1126
|
+
/** Macros that were parsed in this source file (and any includes) */
|
|
1127
|
+
parsedMacros?: ReadonlyMap<string, string>;
|
|
1128
|
+
/** When a node is parsed as a result of a macro expansion, a link from the node
|
|
1129
|
+
* to the original macro definition is stored here. */
|
|
1130
|
+
nodeMacroMap?: ReadonlyMap<Node, string>;
|
|
1131
|
+
}
|
|
1132
|
+
export interface JsonSourceFile extends SourceFile {
|
|
1133
|
+
readonly statements: NodeArray<JsonObjectExpressionStatement>;
|
|
1134
|
+
}
|
|
1135
|
+
export type JsonObjectExpression = ObjectLiteralExpression | ArrayLiteralExpression | JsonMinusNumericLiteral | NumericLiteral | StringLiteral | BooleanLiteral | NullLiteral;
|
|
1136
|
+
export interface JsonMinusNumericLiteral extends PrefixUnaryExpression {
|
|
1137
|
+
readonly kind: SyntaxKind.PrefixUnaryExpression;
|
|
1138
|
+
readonly operator: SyntaxKind.MinusToken;
|
|
1139
|
+
readonly operand: NumericLiteral;
|
|
1140
|
+
}
|
|
1141
|
+
/**
|
|
1142
|
+
* JSON-only
|
|
1143
|
+
*/
|
|
1144
|
+
export interface NumericLiteral extends LiteralExpression, Declaration {
|
|
1145
|
+
readonly kind: SyntaxKind.NumericLiteral;
|
|
1146
|
+
}
|
|
1147
|
+
/**
|
|
1148
|
+
* JSON only
|
|
1149
|
+
*/
|
|
1150
|
+
export interface NullLiteral extends PrimaryExpression {
|
|
1151
|
+
readonly kind: SyntaxKind.NullKeyword;
|
|
1152
|
+
}
|
|
1153
|
+
export interface JsonObjectExpressionStatement extends ExpressionStatement {
|
|
1154
|
+
readonly expression: JsonObjectExpression;
|
|
1155
|
+
}
|
|
1156
|
+
export interface CheckLpcDirective extends TextRange {
|
|
1157
|
+
enabled: boolean;
|
|
1158
|
+
}
|
|
1159
|
+
export type CommentKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia;
|
|
1160
|
+
export interface CommentRange extends TextRange {
|
|
1161
|
+
hasTrailingNewLine?: boolean;
|
|
1162
|
+
kind: CommentKind;
|
|
1163
|
+
}
|
|
1164
|
+
export interface FileReference extends TextRange {
|
|
1165
|
+
fileName: string;
|
|
1166
|
+
preserve?: boolean;
|
|
1167
|
+
}
|
|
1168
|
+
export interface LiteralLikeNode extends Node {
|
|
1169
|
+
text: string;
|
|
1170
|
+
isUnterminated?: boolean;
|
|
1171
|
+
hasExtendedUnicodeEscape?: boolean;
|
|
1172
|
+
}
|
|
1173
|
+
export type ImportCandidateNode = CloneObjectExpression | PropertyAccessExpression | NewExpression | InheritDeclaration | IncludeDirective | CallExpression | JSDocParameterTag | JSDocTypeTag | JSDocTypedefTag | JSDocPropertyTag | JSDocVariableTag | JSDocReturnTag;
|
|
1174
|
+
export declare const enum TokenFlags {
|
|
1175
|
+
None = 0,// e.g. `\u{10ffff}`
|
|
1176
|
+
Scientific = 16,// e.g. `10e2`
|
|
1177
|
+
Octal = 32,// e.g. `0777`
|
|
1178
|
+
HexSpecifier = 64,// e.g. `0x00000000`
|
|
1179
|
+
BinarySpecifier = 128,// e.g. `0b0110010000000000`
|
|
1180
|
+
OctalSpecifier = 256
|
|
1181
|
+
}
|
|
1182
|
+
export declare const enum SymbolFlags {
|
|
1183
|
+
None = 0,
|
|
1184
|
+
FunctionScopedVariable = 1,// Variable (var) or parameter
|
|
1185
|
+
BlockScopedVariable = 2,// A block-scoped variable (let or const)
|
|
1186
|
+
Property = 4,// Property or enum member
|
|
1187
|
+
EnumMember = 8,// Enum member
|
|
1188
|
+
Function = 16,// Function
|
|
1189
|
+
Class = 32,// Class
|
|
1190
|
+
Interface = 64,// Interface
|
|
1191
|
+
ConstEnum = 128,// Const enum
|
|
1192
|
+
RegularEnum = 256,// Enum
|
|
1193
|
+
ValueModule = 512,// Instantiated module
|
|
1194
|
+
NamespaceModule = 1024,// Uninstantiated module
|
|
1195
|
+
TypeLiteral = 2048,// Type Literal or mapped type
|
|
1196
|
+
ObjectLiteral = 4096,// Object Literal
|
|
1197
|
+
Method = 8192,// Method
|
|
1198
|
+
Constructor = 16384,// Constructor
|
|
1199
|
+
GetAccessor = 32768,// Get accessor
|
|
1200
|
+
SetAccessor = 65536,// Set accessor
|
|
1201
|
+
Signature = 131072,// Call, construct, or index signature
|
|
1202
|
+
TypeParameter = 262144,// Type parameter
|
|
1203
|
+
TypeAlias = 524288,// Type alias
|
|
1204
|
+
ExportValue = 1048576,// Exported value marker (see comment in declareModuleMember in binder)
|
|
1205
|
+
Alias = 2097152,// An alias for another symbol (see comment in isAliasSymbolDeclaration in checker)
|
|
1206
|
+
Prototype = 4194304,// Prototype property (no source representation)
|
|
1207
|
+
FakeGlobal = 8388608,// A fake symbol created for global type purposes
|
|
1208
|
+
Optional = 16777216,// Optional property
|
|
1209
|
+
Transient = 33554432,// Transient symbol (created during type check)
|
|
1210
|
+
Assignment = 67108864,// Assignment treated as declaration (eg `this.prop = 1`)
|
|
1211
|
+
ModuleExports = 134217728,// Symbol for CommonJS `module` of `module.exports`
|
|
1212
|
+
Define = 268435456,// Define macro
|
|
1213
|
+
All = -1,
|
|
1214
|
+
Enum = 384,
|
|
1215
|
+
Variable = 3,
|
|
1216
|
+
Value = 111551,
|
|
1217
|
+
ValueOrDefine = 268547007,
|
|
1218
|
+
Type = 788968,
|
|
1219
|
+
Namespace = 1920,
|
|
1220
|
+
Module = 1536,
|
|
1221
|
+
Accessor = 98304,
|
|
1222
|
+
FunctionScopedVariableExcludes = 111550,
|
|
1223
|
+
BlockScopedVariableExcludes = 268547007,
|
|
1224
|
+
ParameterExcludes = 111551,
|
|
1225
|
+
PropertyExcludes = 0,
|
|
1226
|
+
EnumMemberExcludes = 900095,
|
|
1227
|
+
FunctionExcludes = 110991,
|
|
1228
|
+
DefineExcludes = 111039,
|
|
1229
|
+
ClassExcludes = 899503,// class-interface mergability done in checker.ts
|
|
1230
|
+
InterfaceExcludes = 788872,
|
|
1231
|
+
RegularEnumExcludes = 899327,// regular enums merge only with regular enums and modules
|
|
1232
|
+
ConstEnumExcludes = 899967,// const enums merge only with const enums
|
|
1233
|
+
ValueModuleExcludes = 110735,
|
|
1234
|
+
NamespaceModuleExcludes = 0,
|
|
1235
|
+
MethodExcludes = 103359,
|
|
1236
|
+
GetAccessorExcludes = 46015,
|
|
1237
|
+
SetAccessorExcludes = 78783,
|
|
1238
|
+
AccessorExcludes = 13247,
|
|
1239
|
+
TypeParameterExcludes = 526824,
|
|
1240
|
+
TypeAliasExcludes = 788968,
|
|
1241
|
+
AliasExcludes = 2097152,
|
|
1242
|
+
ModuleMember = 2623475,
|
|
1243
|
+
ExportHasLocal = 944,
|
|
1244
|
+
BlockScoped = 418,
|
|
1245
|
+
PropertyOrAccessor = 98308,
|
|
1246
|
+
ClassMember = 106500
|
|
1247
|
+
}
|
|
1248
|
+
export interface LiteralExpression extends LiteralLikeNode, PrimaryExpression {
|
|
1249
|
+
_literalExpressionBrand: any;
|
|
1250
|
+
}
|
|
1251
|
+
export interface IntLiteral extends LiteralExpression, Declaration {
|
|
1252
|
+
readonly kind: SyntaxKind.IntLiteral;
|
|
1253
|
+
}
|
|
1254
|
+
export interface FloatLiteral extends LiteralExpression, Declaration {
|
|
1255
|
+
readonly kind: SyntaxKind.FloatLiteral;
|
|
1256
|
+
}
|
|
1257
|
+
export type PropertyNameLiteral = Identifier | StringLiteral | IntLiteral;
|
|
1258
|
+
export interface StringLiteral extends LiteralExpression, Declaration {
|
|
1259
|
+
readonly kind: SyntaxKind.StringLiteral;
|
|
1260
|
+
}
|
|
1261
|
+
export interface BytesLiteral extends LiteralExpression, Declaration {
|
|
1262
|
+
readonly kind: SyntaxKind.BytesLiteral;
|
|
1263
|
+
}
|
|
1264
|
+
export type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia;
|
|
1265
|
+
export type StringLiteralLike = StringLiteral;
|
|
1266
|
+
export type LiteralToken = IntLiteral | FloatLiteral | StringLiteral | BytesLiteral;
|
|
1267
|
+
export type LiteralSyntaxKind = SyntaxKind.IntLiteral | SyntaxKind.FloatLiteral | SyntaxKind.BytesLiteral | SyntaxKind.StringLiteral;
|
|
1268
|
+
export interface TypeNode extends Node {
|
|
1269
|
+
_typeNodeBrand: any;
|
|
1270
|
+
}
|
|
1271
|
+
export interface UnionTypeNode extends TypeNode {
|
|
1272
|
+
readonly kind: SyntaxKind.UnionType;
|
|
1273
|
+
readonly types: NodeArray<TypeNode>;
|
|
1274
|
+
}
|
|
1275
|
+
export interface IntersectionTypeNode extends TypeNode {
|
|
1276
|
+
readonly kind: SyntaxKind.IntersectionType;
|
|
1277
|
+
readonly types: NodeArray<TypeNode>;
|
|
1278
|
+
}
|
|
1279
|
+
export interface ArrayTypeNode extends TypeNode {
|
|
1280
|
+
readonly kind: SyntaxKind.ArrayType;
|
|
1281
|
+
readonly elementType: TypeNode;
|
|
1282
|
+
}
|
|
1283
|
+
export interface JSDocContainer extends Node {
|
|
1284
|
+
_LpcjsDocContainerBrand: any;
|
|
1285
|
+
}
|
|
1286
|
+
export interface JSDocType extends TypeNode {
|
|
1287
|
+
_jsDocTypeBrand: any;
|
|
1288
|
+
}
|
|
1289
|
+
export type EntityName = Identifier | QualifiedName;
|
|
1290
|
+
export interface JSDocPropertyLikeTag extends JSDocTag, Declaration {
|
|
1291
|
+
readonly parent: JSDoc;
|
|
1292
|
+
readonly name: EntityName;
|
|
1293
|
+
readonly typeExpression?: JSDocTypeExpression;
|
|
1294
|
+
/** Whether the property name came before the type -- non-standard for JSDoc, but Typescript-like */
|
|
1295
|
+
readonly isNameFirst: boolean;
|
|
1296
|
+
readonly isBracketed: boolean;
|
|
1297
|
+
}
|
|
1298
|
+
export interface JSDocTypeExpression extends TypeNode {
|
|
1299
|
+
readonly kind: SyntaxKind.JSDocTypeExpression;
|
|
1300
|
+
readonly type: TypeNode;
|
|
1301
|
+
}
|
|
1302
|
+
export interface JSDocTypeLiteral extends JSDocType, Declaration {
|
|
1303
|
+
readonly kind: SyntaxKind.JSDocTypeLiteral;
|
|
1304
|
+
readonly jsDocPropertyTags?: readonly JSDocPropertyLikeTag[];
|
|
1305
|
+
/** If true, then this type literal represents an *array* of its type. */
|
|
1306
|
+
readonly isArrayType: boolean;
|
|
1307
|
+
}
|
|
1308
|
+
export interface JSDocTag extends Node {
|
|
1309
|
+
readonly parent: JSDoc | JSDocTypeLiteral;
|
|
1310
|
+
readonly tagName: Identifier;
|
|
1311
|
+
readonly comment?: string | NodeArray<JSDocComment>;
|
|
1312
|
+
}
|
|
1313
|
+
export interface JSDoc extends Node {
|
|
1314
|
+
readonly kind: SyntaxKind.JSDoc;
|
|
1315
|
+
readonly parent: HasJSDoc;
|
|
1316
|
+
readonly tags?: NodeArray<JSDocTag>;
|
|
1317
|
+
readonly comment?: string | NodeArray<JSDocComment>;
|
|
1318
|
+
}
|
|
1319
|
+
export interface JSDocTypedefTag extends JSDocTag, NamedDeclaration, LocalsContainer {
|
|
1320
|
+
readonly kind: SyntaxKind.JSDocTypedefTag;
|
|
1321
|
+
readonly parent: JSDoc;
|
|
1322
|
+
readonly fullName?: Identifier;
|
|
1323
|
+
readonly name?: Identifier;
|
|
1324
|
+
readonly typeExpression?: JSDocTypeExpression | JSDocTypeLiteral;
|
|
1325
|
+
}
|
|
1326
|
+
export interface JSDocMemberName extends Node {
|
|
1327
|
+
readonly kind: SyntaxKind.JSDocMemberName;
|
|
1328
|
+
readonly left: EntityName | JSDocMemberName;
|
|
1329
|
+
readonly right: Identifier;
|
|
1330
|
+
}
|
|
1331
|
+
export interface JSDocText extends Node {
|
|
1332
|
+
readonly kind: SyntaxKind.JSDocText;
|
|
1333
|
+
text: string;
|
|
1334
|
+
}
|
|
1335
|
+
export type JSDocComment = JSDocText | JSDocLink | JSDocLinkCode | JSDocLinkPlain;
|
|
1336
|
+
export interface Expression extends Node {
|
|
1337
|
+
_expressionBrand: any;
|
|
1338
|
+
}
|
|
1339
|
+
export interface OmittedExpression extends Expression {
|
|
1340
|
+
readonly kind: SyntaxKind.OmittedExpression;
|
|
1341
|
+
}
|
|
1342
|
+
export interface CastExpression extends Expression {
|
|
1343
|
+
readonly kind: SyntaxKind.CastExpression;
|
|
1344
|
+
readonly expression: Expression;
|
|
1345
|
+
readonly type: TypeNode;
|
|
1346
|
+
}
|
|
1347
|
+
export interface PartiallyEmittedExpression extends LeftHandSideExpression {
|
|
1348
|
+
readonly kind: SyntaxKind.PartiallyEmittedExpression;
|
|
1349
|
+
readonly expression: Expression;
|
|
1350
|
+
}
|
|
1351
|
+
export interface TypeAssertion extends UnaryExpression {
|
|
1352
|
+
readonly kind: SyntaxKind.TypeAssertionExpression;
|
|
1353
|
+
readonly type: TypeNode;
|
|
1354
|
+
readonly expression: UnaryExpression;
|
|
1355
|
+
}
|
|
1356
|
+
export interface UnaryExpression extends Expression {
|
|
1357
|
+
_unaryExpressionBrand: any;
|
|
1358
|
+
}
|
|
1359
|
+
export interface UpdateExpression extends UnaryExpression {
|
|
1360
|
+
_updateExpressionBrand: any;
|
|
1361
|
+
}
|
|
1362
|
+
export interface LeftHandSideExpression extends UpdateExpression {
|
|
1363
|
+
_leftHandSideExpressionBrand: any;
|
|
1364
|
+
}
|
|
1365
|
+
export interface MemberExpression extends LeftHandSideExpression {
|
|
1366
|
+
_memberExpressionBrand: any;
|
|
1367
|
+
}
|
|
1368
|
+
export interface PrimaryExpression extends MemberExpression {
|
|
1369
|
+
_primaryExpressionBrand: any;
|
|
1370
|
+
}
|
|
1371
|
+
export interface Declaration extends Node {
|
|
1372
|
+
_declarationBrand: any;
|
|
1373
|
+
symbol: Symbol;
|
|
1374
|
+
}
|
|
1375
|
+
export interface Identifier extends PrimaryExpression, Declaration, JSDocContainer, FlowContainer {
|
|
1376
|
+
readonly kind: SyntaxKind.Identifier;
|
|
1377
|
+
readonly text: string;
|
|
1378
|
+
}
|
|
1379
|
+
export interface LocalsContainer extends Node {
|
|
1380
|
+
_localsContainerBrand: any;
|
|
1381
|
+
}
|
|
1382
|
+
export interface Statement extends Node, JSDocContainer {
|
|
1383
|
+
_statementBrand: any;
|
|
1384
|
+
}
|
|
1385
|
+
export interface Block extends Statement, LocalsContainer {
|
|
1386
|
+
readonly kind: SyntaxKind.Block;
|
|
1387
|
+
readonly statements: NodeArray<Statement>;
|
|
1388
|
+
}
|
|
1389
|
+
export interface CatchStatement extends Statement, LocalsContainer {
|
|
1390
|
+
readonly kind: SyntaxKind.CatchStatement;
|
|
1391
|
+
readonly parent: Block;
|
|
1392
|
+
readonly expression?: Expression;
|
|
1393
|
+
readonly block: Block;
|
|
1394
|
+
}
|
|
1395
|
+
export interface CatchExpression extends PrimaryExpression {
|
|
1396
|
+
readonly kind: SyntaxKind.CatchExpression;
|
|
1397
|
+
readonly expression?: Expression;
|
|
1398
|
+
readonly modifier?: Identifier;
|
|
1399
|
+
readonly modifierExpression?: Expression;
|
|
1400
|
+
readonly block?: Block;
|
|
1401
|
+
}
|
|
1402
|
+
export interface NamedDeclaration extends Declaration {
|
|
1403
|
+
readonly name?: DeclarationName;
|
|
1404
|
+
}
|
|
1405
|
+
export type BindingName = Identifier | BindingPattern;
|
|
1406
|
+
export interface VariableDeclaration extends NamedDeclaration, JSDocContainer, PrimaryExpression {
|
|
1407
|
+
readonly kind: SyntaxKind.VariableDeclaration;
|
|
1408
|
+
readonly parent: VariableDeclarationList;
|
|
1409
|
+
readonly refToken?: RefToken;
|
|
1410
|
+
readonly name: BindingName;
|
|
1411
|
+
readonly type?: TypeNode;
|
|
1412
|
+
readonly equalsToken?: Token<SyntaxKind.EqualsToken>;
|
|
1413
|
+
readonly initializer?: Expression;
|
|
1414
|
+
}
|
|
1415
|
+
export interface VariableDeclarationList extends Node {
|
|
1416
|
+
readonly kind: SyntaxKind.VariableDeclarationList;
|
|
1417
|
+
readonly parent: VariableStatement | ForStatement | ForEachStatement;
|
|
1418
|
+
readonly declarations: NodeArray<VariableDeclaration>;
|
|
1419
|
+
}
|
|
1420
|
+
export interface IterationStatement extends Statement {
|
|
1421
|
+
readonly statement: Statement;
|
|
1422
|
+
}
|
|
1423
|
+
export type ForInitializer = VariableDeclarationList | Expression;
|
|
1424
|
+
export interface ForStatement extends IterationStatement, LocalsContainer, FlowContainer {
|
|
1425
|
+
readonly kind: SyntaxKind.ForStatement;
|
|
1426
|
+
readonly initializer?: ForInitializer;
|
|
1427
|
+
readonly condition?: Expression;
|
|
1428
|
+
readonly incrementor?: Expression;
|
|
1429
|
+
}
|
|
1430
|
+
export interface VariableStatement extends Statement, FlowContainer {
|
|
1431
|
+
readonly kind: SyntaxKind.VariableStatement;
|
|
1432
|
+
readonly modifiers?: NodeArray<Modifier>;
|
|
1433
|
+
readonly declarationList: VariableDeclarationList;
|
|
1434
|
+
readonly type?: TypeNode;
|
|
1435
|
+
}
|
|
1436
|
+
export interface BinaryExpression extends Expression, Declaration, JSDocContainer {
|
|
1437
|
+
readonly kind: SyntaxKind.BinaryExpression;
|
|
1438
|
+
readonly left: Expression;
|
|
1439
|
+
readonly operatorToken: BinaryOperatorToken;
|
|
1440
|
+
readonly right: Expression;
|
|
1441
|
+
}
|
|
1442
|
+
export interface ImpliedStringConcatExpression extends BinaryExpression {
|
|
1443
|
+
}
|
|
1444
|
+
export type FunctionBody = Block;
|
|
1445
|
+
export type ConciseBody = FunctionBody | Expression;
|
|
1446
|
+
export interface ParameterDeclaration extends NamedDeclaration, JSDocContainer {
|
|
1447
|
+
readonly kind: SyntaxKind.Parameter;
|
|
1448
|
+
readonly parent: SignatureDeclaration;
|
|
1449
|
+
readonly modifiers?: NodeArray<Modifier>;
|
|
1450
|
+
readonly dotDotDotToken?: DotDotDotToken;
|
|
1451
|
+
readonly name: BindingName;
|
|
1452
|
+
readonly ampToken?: AmpersandToken | RefToken;
|
|
1453
|
+
readonly type?: TypeNode;
|
|
1454
|
+
readonly initializer?: Expression;
|
|
1455
|
+
}
|
|
1456
|
+
export interface SignatureDeclarationBase extends NamedDeclaration, JSDocContainer {
|
|
1457
|
+
readonly kind: SignatureDeclaration["kind"];
|
|
1458
|
+
readonly name?: PropertyName;
|
|
1459
|
+
readonly typeParameters?: NodeArray<TypeParameterDeclaration> | undefined;
|
|
1460
|
+
readonly parameters: NodeArray<ParameterDeclaration>;
|
|
1461
|
+
readonly type?: TypeNode | undefined;
|
|
1462
|
+
}
|
|
1463
|
+
/**
|
|
1464
|
+
* Several node kinds share function-like features such as a signature,
|
|
1465
|
+
* a name, and a body. These nodes should extend FunctionLikeDeclarationBase.
|
|
1466
|
+
* Examples:
|
|
1467
|
+
* - FunctionDeclaration
|
|
1468
|
+
* - MethodDeclaration
|
|
1469
|
+
* - AccessorDeclaration
|
|
1470
|
+
*/
|
|
1471
|
+
export interface FunctionLikeDeclarationBase extends SignatureDeclarationBase {
|
|
1472
|
+
_functionLikeDeclarationBrand: any;
|
|
1473
|
+
readonly asteriskToken?: AsteriskToken | undefined;
|
|
1474
|
+
readonly questionToken?: QuestionToken | undefined;
|
|
1475
|
+
readonly exclamationToken?: ExclamationToken | undefined;
|
|
1476
|
+
readonly body?: Block | Expression | undefined;
|
|
1477
|
+
}
|
|
1478
|
+
export interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclarationBase, JSDocContainer, LocalsContainer, FlowContainer {
|
|
1479
|
+
readonly kind: SyntaxKind.FunctionExpression;
|
|
1480
|
+
readonly modifiers?: NodeArray<Modifier>;
|
|
1481
|
+
readonly name?: Identifier;
|
|
1482
|
+
readonly body: FunctionBody;
|
|
1483
|
+
}
|
|
1484
|
+
export type SignatureDeclaration = CallSignatureDeclaration | MethodSignature | IndexSignatureDeclaration | FunctionTypeNode | JSDocFunctionType | FunctionDeclaration | MethodDeclaration | InlineClosureExpression | FunctionExpression | ArrowFunction;
|
|
1485
|
+
export interface CallSignatureDeclaration extends SignatureDeclarationBase, TypeElement, LocalsContainer {
|
|
1486
|
+
readonly kind: SyntaxKind.CallSignature;
|
|
1487
|
+
}
|
|
1488
|
+
export type DeclarationWithTypeParameterChildren = SignatureDeclaration | ClassLikeDeclaration | StructDeclaration | InterfaceDeclaration | TypeAliasDeclaration | JSDocTemplateTag;
|
|
1489
|
+
export interface TypeParameterDeclaration extends NamedDeclaration, JSDocContainer {
|
|
1490
|
+
readonly kind: SyntaxKind.TypeParameter;
|
|
1491
|
+
readonly parent: DeclarationWithTypeParameterChildren | InferTypeNode;
|
|
1492
|
+
readonly modifiers?: NodeArray<Modifier>;
|
|
1493
|
+
readonly name: Identifier;
|
|
1494
|
+
/** Note: Consider calling `getEffectiveConstraintOfTypeParameter` */
|
|
1495
|
+
readonly constraint?: TypeNode;
|
|
1496
|
+
readonly default?: TypeNode;
|
|
1497
|
+
expression?: Expression;
|
|
1498
|
+
}
|
|
1499
|
+
export interface DeclarationStatement extends NamedDeclaration, Statement {
|
|
1500
|
+
readonly name?: Identifier | StringLiteral | IntLiteral;
|
|
1501
|
+
}
|
|
1502
|
+
export interface FunctionDeclaration extends FunctionLikeDeclarationBase, DeclarationStatement, LocalsContainer, FlowContainer {
|
|
1503
|
+
readonly kind: SyntaxKind.FunctionDeclaration;
|
|
1504
|
+
readonly modifiers?: NodeArray<Modifier>;
|
|
1505
|
+
readonly name?: Identifier;
|
|
1506
|
+
readonly body?: FunctionBody;
|
|
1507
|
+
}
|
|
1508
|
+
export interface CallExpression extends LeftHandSideExpression, Declaration {
|
|
1509
|
+
readonly kind: SyntaxKind.CallExpression;
|
|
1510
|
+
readonly expression: LeftHandSideExpression;
|
|
1511
|
+
readonly typeArguments?: NodeArray<TypeNode>;
|
|
1512
|
+
readonly arguments: NodeArray<Expression>;
|
|
1513
|
+
}
|
|
1514
|
+
export interface CloneObjectExpression extends PrimaryExpression, Declaration, LeftHandSideExpression {
|
|
1515
|
+
readonly kind: SyntaxKind.CloneObjectExpression;
|
|
1516
|
+
readonly expression: LeftHandSideExpression;
|
|
1517
|
+
readonly arguments?: NodeArray<Expression>;
|
|
1518
|
+
}
|
|
1519
|
+
export interface MappingLiteralExpression extends PrimaryExpression {
|
|
1520
|
+
readonly kind: SyntaxKind.MappingLiteralExpression;
|
|
1521
|
+
readonly elements: NodeArray<MappingEntryExpression | OmittedExpression>;
|
|
1522
|
+
readonly initializer?: Expression;
|
|
1523
|
+
}
|
|
1524
|
+
export interface MappingEntryExpression extends PrimaryExpression {
|
|
1525
|
+
readonly kind: SyntaxKind.MappingEntryExpression;
|
|
1526
|
+
readonly name: Expression;
|
|
1527
|
+
readonly elements: NodeArray<Expression>;
|
|
1528
|
+
}
|
|
1529
|
+
export interface InlineClosureExpression extends PrimaryExpression, FunctionLikeDeclarationBase, JSDocContainer, LocalsContainer, FlowContainer {
|
|
1530
|
+
readonly kind: SyntaxKind.InlineClosureExpression;
|
|
1531
|
+
readonly modifiers?: NodeArray<Modifier>;
|
|
1532
|
+
readonly body: ConciseBody;
|
|
1533
|
+
readonly name: never;
|
|
1534
|
+
readonly arguments?: NodeArray<Expression>;
|
|
1535
|
+
}
|
|
1536
|
+
export type LambdaKind = SyntaxKind.LambdaIdentifierExpression | SyntaxKind.LambdaOperatorExpression;
|
|
1537
|
+
export interface LambdaExpression extends PrimaryExpression {
|
|
1538
|
+
readonly kind: LambdaKind;
|
|
1539
|
+
}
|
|
1540
|
+
export interface LambdaIdentifierExpression extends LambdaExpression {
|
|
1541
|
+
readonly kind: SyntaxKind.LambdaIdentifierExpression;
|
|
1542
|
+
readonly name: Expression;
|
|
1543
|
+
}
|
|
1544
|
+
export interface LambdaOperatorExpression extends LambdaExpression {
|
|
1545
|
+
readonly kind: SyntaxKind.LambdaOperatorExpression;
|
|
1546
|
+
readonly operator: LambdaOperatorToken;
|
|
1547
|
+
}
|
|
1548
|
+
export interface ExpressionStatement extends Statement, FlowContainer {
|
|
1549
|
+
readonly kind: SyntaxKind.ExpressionStatement;
|
|
1550
|
+
readonly expression: Expression;
|
|
1551
|
+
}
|
|
1552
|
+
export interface ReturnStatement extends Statement, FlowContainer {
|
|
1553
|
+
readonly kind: SyntaxKind.ReturnStatement;
|
|
1554
|
+
readonly expression?: Expression;
|
|
1555
|
+
}
|
|
1556
|
+
export interface BreakStatement extends Statement, FlowContainer {
|
|
1557
|
+
readonly kind: SyntaxKind.BreakStatement;
|
|
1558
|
+
readonly label?: Identifier;
|
|
1559
|
+
}
|
|
1560
|
+
export interface ContinueStatement extends Statement, FlowContainer {
|
|
1561
|
+
readonly kind: SyntaxKind.ContinueStatement;
|
|
1562
|
+
readonly label?: Identifier;
|
|
1563
|
+
}
|
|
1564
|
+
export type BreakOrContinueStatement = BreakStatement | ContinueStatement;
|
|
1565
|
+
export interface InheritDeclaration extends Statement {
|
|
1566
|
+
readonly kind: SyntaxKind.InheritDeclaration;
|
|
1567
|
+
readonly parent: SourceFile;
|
|
1568
|
+
readonly modifiers?: NodeArray<Modifier>;
|
|
1569
|
+
readonly inheritClause: InheritClauseNodeType;
|
|
1570
|
+
}
|
|
1571
|
+
export type InheritClauseNodeType = StringLiteral | Expression;
|
|
1572
|
+
/**
|
|
1573
|
+
* This is a special type of binary expression where both sides are definitely string literals
|
|
1574
|
+
*/
|
|
1575
|
+
export interface StringConcatExpression extends BinaryExpression {
|
|
1576
|
+
readonly left: StringLiteral;
|
|
1577
|
+
readonly operatorToken: PlusToken;
|
|
1578
|
+
readonly right: StringLiteral;
|
|
1579
|
+
}
|
|
1580
|
+
export interface IfStatement extends Statement, FlowContainer {
|
|
1581
|
+
readonly kind: SyntaxKind.IfStatement;
|
|
1582
|
+
readonly expression: Expression;
|
|
1583
|
+
readonly thenStatement: Statement;
|
|
1584
|
+
readonly elseStatement?: Statement;
|
|
1585
|
+
}
|
|
1586
|
+
export interface EmptyStatement extends Statement {
|
|
1587
|
+
readonly kind: SyntaxKind.EmptyStatement;
|
|
1588
|
+
}
|
|
1589
|
+
export interface SwitchStatement extends Statement, FlowContainer {
|
|
1590
|
+
readonly kind: SyntaxKind.SwitchStatement;
|
|
1591
|
+
readonly expression: Expression;
|
|
1592
|
+
readonly preBlock?: NodeArray<Statement>;
|
|
1593
|
+
readonly caseBlock: CaseBlock;
|
|
1594
|
+
possiblyExhaustive?: boolean;
|
|
1595
|
+
}
|
|
1596
|
+
export interface CaseBlock extends Node, LocalsContainer {
|
|
1597
|
+
readonly kind: SyntaxKind.CaseBlock;
|
|
1598
|
+
readonly parent: SwitchStatement;
|
|
1599
|
+
readonly clauses: NodeArray<CaseOrDefaultClause>;
|
|
1600
|
+
}
|
|
1601
|
+
export interface CaseClause extends Node, JSDocContainer {
|
|
1602
|
+
readonly kind: SyntaxKind.CaseClause;
|
|
1603
|
+
readonly parent: CaseBlock;
|
|
1604
|
+
readonly expression: Expression;
|
|
1605
|
+
readonly statements: NodeArray<Statement>;
|
|
1606
|
+
}
|
|
1607
|
+
export interface DefaultClause extends Node {
|
|
1608
|
+
readonly kind: SyntaxKind.DefaultClause;
|
|
1609
|
+
readonly parent: CaseBlock;
|
|
1610
|
+
readonly statements: NodeArray<Statement>;
|
|
1611
|
+
}
|
|
1612
|
+
export type CaseOrDefaultClause = CaseClause | DefaultClause;
|
|
1613
|
+
export interface PropertyAccessExpression extends MemberExpression, NamedDeclaration, JSDocContainer, FlowContainer {
|
|
1614
|
+
readonly kind: SyntaxKind.PropertyAccessExpression;
|
|
1615
|
+
readonly expression: LeftHandSideExpression;
|
|
1616
|
+
readonly name: MemberName;
|
|
1617
|
+
readonly propertyAccessToken: PropertyAccessToken;
|
|
1618
|
+
}
|
|
1619
|
+
export interface SuperAccessExpression extends MemberExpression, NamedDeclaration, JSDocContainer, FlowContainer {
|
|
1620
|
+
readonly kind: SyntaxKind.SuperAccessExpression;
|
|
1621
|
+
readonly namespace: Identifier | StringLiteral;
|
|
1622
|
+
readonly name: MemberName;
|
|
1623
|
+
}
|
|
1624
|
+
export interface SuperCall extends CallExpression {
|
|
1625
|
+
readonly expression: SuperAccessExpression;
|
|
1626
|
+
}
|
|
1627
|
+
/** Brand for a PropertyAccessExpression which, like a QualifiedName, consists of a sequence of identifiers separated by dots. */
|
|
1628
|
+
export interface PropertyAccessEntityNameExpression extends PropertyAccessExpression {
|
|
1629
|
+
_propertyAccessExpressionLikeQualifiedNameBrand?: any;
|
|
1630
|
+
readonly expression: EntityNameExpression;
|
|
1631
|
+
readonly name: Identifier;
|
|
1632
|
+
}
|
|
1633
|
+
export type EntityNameExpression = Identifier | PropertyAccessEntityNameExpression;
|
|
1634
|
+
export type EntityNameOrEntityNameExpression = EntityName | EntityNameExpression;
|
|
1635
|
+
export interface ForStatement extends IterationStatement, LocalsContainer, FlowContainer {
|
|
1636
|
+
readonly kind: SyntaxKind.ForStatement;
|
|
1637
|
+
readonly initializer?: ForInitializer;
|
|
1638
|
+
readonly condition?: Expression;
|
|
1639
|
+
readonly incrementor?: Expression;
|
|
1640
|
+
}
|
|
1641
|
+
export interface ForEachStatement extends IterationStatement, LocalsContainer, FlowContainer {
|
|
1642
|
+
readonly kind: SyntaxKind.ForEachStatement;
|
|
1643
|
+
readonly initializer: ForInitializer;
|
|
1644
|
+
readonly expression: Expression;
|
|
1645
|
+
}
|
|
1646
|
+
export interface DoOrWhileStatementBase extends IterationStatement, LocalsContainer, FlowContainer {
|
|
1647
|
+
readonly expression: Expression;
|
|
1648
|
+
}
|
|
1649
|
+
export interface DoWhileStatement extends DoOrWhileStatementBase {
|
|
1650
|
+
readonly kind: SyntaxKind.DoWhileStatement;
|
|
1651
|
+
}
|
|
1652
|
+
export interface WhileStatement extends DoOrWhileStatementBase {
|
|
1653
|
+
readonly kind: SyntaxKind.WhileStatement;
|
|
1654
|
+
}
|
|
1655
|
+
export type PostfixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken;
|
|
1656
|
+
export interface PostfixUnaryExpression extends UpdateExpression {
|
|
1657
|
+
readonly kind: SyntaxKind.PostfixUnaryExpression;
|
|
1658
|
+
readonly operand: LeftHandSideExpression;
|
|
1659
|
+
readonly operator: PostfixUnaryOperator;
|
|
1660
|
+
}
|
|
1661
|
+
export interface FreshableType extends Type {
|
|
1662
|
+
freshType: FreshableType;
|
|
1663
|
+
regularType: FreshableType;
|
|
1664
|
+
}
|
|
1665
|
+
export interface LiteralType extends FreshableType {
|
|
1666
|
+
value: string | number;
|
|
1667
|
+
}
|
|
1668
|
+
export declare const enum ObjectFlags {
|
|
1669
|
+
None = 0,
|
|
1670
|
+
Class = 1,// Class
|
|
1671
|
+
Interface = 2,// Interface
|
|
1672
|
+
Reference = 4,// Generic type reference
|
|
1673
|
+
Tuple = 8,// Synthesized generic tuple type
|
|
1674
|
+
Anonymous = 16,// Anonymous
|
|
1675
|
+
Mapped = 32,// Mapped
|
|
1676
|
+
Instantiated = 64,// Instantiated anonymous or mapped type
|
|
1677
|
+
ObjectLiteral = 128,// Originates in an object literal
|
|
1678
|
+
EvolvingArray = 256,// Evolving array type
|
|
1679
|
+
ObjectLiteralPatternWithComputedProperties = 512,// Object literal pattern with computed properties
|
|
1680
|
+
ReverseMapped = 1024,// Object contains a property from a reverse-mapped type
|
|
1681
|
+
MappingLiteral = 2048,// Originates in a mapping literal
|
|
1682
|
+
JSLiteral = 4096,// Object type declared in JS - disables errors on read/write of nonexisting members
|
|
1683
|
+
FreshLiteral = 8192,// Fresh object literal
|
|
1684
|
+
ArrayLiteral = 16384,// Type could contain a type variable
|
|
1685
|
+
ClassOrInterface = 3,
|
|
1686
|
+
ContainsSpread = 2097152,// Object literal contains spread operation
|
|
1687
|
+
ObjectRestType = 4194304,// Originates in object rest declaration
|
|
1688
|
+
InstantiationExpressionType = 8388608,// Originates in instantiation expression
|
|
1689
|
+
SingleSignatureType = 134217728
|
|
1690
|
+
}
|
|
1691
|
+
export interface JSDocParameterTag extends JSDocPropertyLikeTag {
|
|
1692
|
+
readonly kind: SyntaxKind.JSDocParameterTag;
|
|
1693
|
+
}
|
|
1694
|
+
export interface JSDocSignature extends JSDocType, Declaration, JSDocContainer, LocalsContainer {
|
|
1695
|
+
readonly kind: SyntaxKind.JSDocSignature;
|
|
1696
|
+
readonly parameters: readonly JSDocParameterTag[];
|
|
1697
|
+
readonly type: JSDocReturnTag | undefined;
|
|
1698
|
+
}
|
|
1699
|
+
export interface JSDocReturnTag extends JSDocTag {
|
|
1700
|
+
readonly kind: SyntaxKind.JSDocReturnTag;
|
|
1701
|
+
readonly typeExpression?: JSDocTypeExpression;
|
|
1702
|
+
}
|
|
1703
|
+
export interface IndexType extends InstantiableType {
|
|
1704
|
+
type: InstantiableType | UnionType;
|
|
1705
|
+
}
|
|
1706
|
+
export interface InstantiableType extends Type {
|
|
1707
|
+
}
|
|
1708
|
+
export interface TypeParameter extends InstantiableType {
|
|
1709
|
+
}
|
|
1710
|
+
export interface Signature {
|
|
1711
|
+
declaration?: SignatureDeclaration | JSDocSignature;
|
|
1712
|
+
typeParameters?: readonly TypeParameter[];
|
|
1713
|
+
parameters: readonly Symbol[];
|
|
1714
|
+
thisParameter?: Symbol;
|
|
1715
|
+
}
|
|
1716
|
+
export interface UnionOrIntersectionType extends Type {
|
|
1717
|
+
types: Type[];
|
|
1718
|
+
}
|
|
1719
|
+
export interface UnionType extends UnionOrIntersectionType {
|
|
1720
|
+
}
|
|
1721
|
+
export interface ObjectType extends Type {
|
|
1722
|
+
objectFlags: ObjectFlags;
|
|
1723
|
+
}
|
|
1724
|
+
export interface StructDeclaration extends DeclarationStatement, JSDocContainer, LocalsContainer {
|
|
1725
|
+
readonly kind: SyntaxKind.StructDeclaration;
|
|
1726
|
+
readonly name: Identifier;
|
|
1727
|
+
readonly typeParameters: NodeArray<TypeParameterDeclaration>;
|
|
1728
|
+
readonly modifiers?: NodeArray<Modifier>;
|
|
1729
|
+
readonly heritageName?: Identifier;
|
|
1730
|
+
readonly type: TypeNode;
|
|
1731
|
+
}
|
|
1732
|
+
export declare const enum InternalSymbolName {
|
|
1733
|
+
EfunSuperPrefix = "efun",
|
|
1734
|
+
EfunNamespace = "efun::",
|
|
1735
|
+
Call = "__call",// Call signatures
|
|
1736
|
+
Constructor = "__constructor",// Constructor implementations
|
|
1737
|
+
New = "__new",// Constructor signatures
|
|
1738
|
+
Index = "__index",// Index signatures
|
|
1739
|
+
ExportStar = "__export",// Module export * declarations
|
|
1740
|
+
Global = "__global",// Global self-reference
|
|
1741
|
+
Missing = "__missing",// Indicates missing symbol
|
|
1742
|
+
Type = "__type",// Anonymous type literal symbol
|
|
1743
|
+
Object = "__object",// Anonymous object literal declaration
|
|
1744
|
+
Class = "__class",// Unnamed class expression
|
|
1745
|
+
Function = "__function",// Unnamed function expression
|
|
1746
|
+
Computed = "__computed",// Computed property name declaration with dynamic name
|
|
1747
|
+
Resolving = "__resolving__",// Indicator symbol used to mark partially resolved type aliases
|
|
1748
|
+
ExportEquals = "export=",// Export assignment symbol
|
|
1749
|
+
Default = "default",// Default export symbol (technically not wholly internal, but included here for usability)
|
|
1750
|
+
This = "this",
|
|
1751
|
+
InstantiationExpression = "__instantiationExpression",// Instantiation expressions
|
|
1752
|
+
ImportAttributes = "__importAttributes",
|
|
1753
|
+
VarDocTags = "__varDocTags"
|
|
1754
|
+
}
|
|
1755
|
+
export type PrefixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.TildeToken | SyntaxKind.ExclamationToken | SyntaxKind.LessThanToken | SyntaxKind.DoubleExclamationToken;
|
|
1756
|
+
export interface PrefixUnaryExpression extends UpdateExpression {
|
|
1757
|
+
readonly kind: SyntaxKind.PrefixUnaryExpression;
|
|
1758
|
+
readonly operator: PrefixUnaryOperator;
|
|
1759
|
+
readonly operand: UnaryExpression;
|
|
1760
|
+
}
|
|
1761
|
+
export type AssignmentOperatorToken = Token<AssignmentOperator>;
|
|
1762
|
+
export interface AssignmentExpression<TOperator extends AssignmentOperatorToken> extends BinaryExpression {
|
|
1763
|
+
readonly left: LeftHandSideExpression;
|
|
1764
|
+
readonly operatorToken: TOperator;
|
|
1765
|
+
}
|
|
1766
|
+
export interface ParenthesizedExpression extends PrimaryExpression, JSDocContainer {
|
|
1767
|
+
readonly kind: SyntaxKind.ParenthesizedExpression;
|
|
1768
|
+
readonly expression: Expression;
|
|
1769
|
+
}
|
|
1770
|
+
export type AssertionExpression = TypeAssertion | CastExpression;
|
|
1771
|
+
export interface ArrayLiteralExpression extends PrimaryExpression {
|
|
1772
|
+
readonly kind: SyntaxKind.ArrayLiteralExpression;
|
|
1773
|
+
readonly elements: NodeArray<Expression>;
|
|
1774
|
+
}
|
|
1775
|
+
export interface SpreadElement extends Expression {
|
|
1776
|
+
readonly kind: SyntaxKind.SpreadElement;
|
|
1777
|
+
readonly parent: ArrayLiteralExpression | CallExpression | NewExpression;
|
|
1778
|
+
readonly expression: Expression;
|
|
1779
|
+
}
|
|
1780
|
+
export interface ByRefElement extends Expression {
|
|
1781
|
+
readonly kind: SyntaxKind.ByRefElement;
|
|
1782
|
+
readonly parent: CallExpression | NewExpression;
|
|
1783
|
+
readonly expression: Expression;
|
|
1784
|
+
readonly refToken: RefToken | AmpersandToken;
|
|
1785
|
+
}
|
|
1786
|
+
export interface ObjectLiteralElement extends NamedDeclaration {
|
|
1787
|
+
_objectLiteralBrand: any;
|
|
1788
|
+
readonly name?: PropertyName;
|
|
1789
|
+
}
|
|
1790
|
+
export interface PropertyAssignment extends ObjectLiteralElement, JSDocContainer {
|
|
1791
|
+
readonly kind: SyntaxKind.PropertyAssignment;
|
|
1792
|
+
readonly parent: ObjectLiteralExpression;
|
|
1793
|
+
readonly name: PropertyName;
|
|
1794
|
+
readonly initializer: Expression;
|
|
1795
|
+
}
|
|
1796
|
+
export interface ShorthandPropertyAssignment extends ObjectLiteralElement, JSDocContainer {
|
|
1797
|
+
readonly kind: SyntaxKind.ShorthandPropertyAssignment;
|
|
1798
|
+
readonly parent: ObjectLiteralExpression;
|
|
1799
|
+
readonly name: Identifier;
|
|
1800
|
+
readonly equalsToken?: EqualsToken;
|
|
1801
|
+
readonly objectAssignmentInitializer?: Expression;
|
|
1802
|
+
}
|
|
1803
|
+
/** Unlike ObjectLiteralElement, excludes JSXAttribute and JSXSpreadAttribute. */
|
|
1804
|
+
export type ObjectLiteralElementLike = PropertyAssignment | ShorthandPropertyAssignment | MethodDeclaration;
|
|
1805
|
+
/**
|
|
1806
|
+
* This interface is a base interface for ObjectLiteralExpression and JSXAttributes to extend from. JSXAttributes is similar to
|
|
1807
|
+
* ObjectLiteralExpression in that it contains array of properties; however, JSXAttributes' properties can only be
|
|
1808
|
+
* JSXAttribute or JSXSpreadAttribute. ObjectLiteralExpression, on the other hand, can only have properties of type
|
|
1809
|
+
* ObjectLiteralElement (e.g. PropertyAssignment, ShorthandPropertyAssignment etc.)
|
|
1810
|
+
*/
|
|
1811
|
+
export interface ObjectLiteralExpressionBase<T extends ObjectLiteralElement> extends PrimaryExpression, Declaration {
|
|
1812
|
+
readonly properties: NodeArray<T>;
|
|
1813
|
+
}
|
|
1814
|
+
export interface ObjectLiteralExpression extends ObjectLiteralExpressionBase<ObjectLiteralElementLike>, JSDocContainer {
|
|
1815
|
+
readonly kind: SyntaxKind.ObjectLiteralExpression;
|
|
1816
|
+
}
|
|
1817
|
+
export type AccessExpression = PropertyAccessExpression | ElementAccessExpression;
|
|
1818
|
+
export interface ElementAccessChain extends ElementAccessExpression {
|
|
1819
|
+
_optionalChainBrand: any;
|
|
1820
|
+
}
|
|
1821
|
+
export interface ElementAccessExpression extends MemberExpression, Declaration, JSDocContainer, FlowContainer {
|
|
1822
|
+
readonly kind: SyntaxKind.ElementAccessExpression;
|
|
1823
|
+
readonly expression: LeftHandSideExpression;
|
|
1824
|
+
readonly argumentExpression: Expression;
|
|
1825
|
+
}
|
|
1826
|
+
export interface RangeExpression extends MemberExpression, Declaration, JSDocContainer, FlowContainer {
|
|
1827
|
+
readonly kind: SyntaxKind.RangeExpression;
|
|
1828
|
+
readonly left: Expression;
|
|
1829
|
+
readonly right: Expression;
|
|
1830
|
+
}
|
|
1831
|
+
export interface CallChain extends CallExpression {
|
|
1832
|
+
_optionalChainBrand: any;
|
|
1833
|
+
}
|
|
1834
|
+
export declare class OperationCanceledException {
|
|
1835
|
+
}
|
|
1836
|
+
export interface CancellationToken {
|
|
1837
|
+
isCancellationRequested(): boolean;
|
|
1838
|
+
/** @throws OperationCanceledException if isCancellationRequested is true */
|
|
1839
|
+
throwIfCancellationRequested(): void;
|
|
1840
|
+
}
|
|
1841
|
+
export interface NewStructExpression extends PrimaryExpression, Declaration {
|
|
1842
|
+
readonly kind: SyntaxKind.NewStructExpression;
|
|
1843
|
+
readonly type: StructTypeNode;
|
|
1844
|
+
readonly arguments: NodeArray<Expression | ObjectLiteralElementLike>;
|
|
1845
|
+
}
|
|
1846
|
+
export interface EvaluateExpression extends PrimaryExpression {
|
|
1847
|
+
readonly kind: SyntaxKind.EvaluateExpression;
|
|
1848
|
+
readonly expression: Expression;
|
|
1849
|
+
readonly arguments: NodeArray<Expression>;
|
|
1850
|
+
}
|
|
1851
|
+
export interface NewExpression extends PrimaryExpression, Declaration {
|
|
1852
|
+
readonly kind: SyntaxKind.NewExpression;
|
|
1853
|
+
readonly expression?: LeftHandSideExpression | TypeNode | undefined;
|
|
1854
|
+
readonly typeArguments?: NodeArray<TypeNode>;
|
|
1855
|
+
readonly arguments?: NodeArray<Expression>;
|
|
1856
|
+
}
|
|
1857
|
+
export type NewExpressionArgument = Expression | ObjectLiteralElement;
|
|
1858
|
+
export type CallLikeExpression = CallExpression | NewExpression | CloneObjectExpression | InlineClosureExpression;
|
|
1859
|
+
export interface IntrinsicType extends Type {
|
|
1860
|
+
intrinsicName: string;
|
|
1861
|
+
debugIntrinsicName: string | undefined;
|
|
1862
|
+
objectFlags: ObjectFlags;
|
|
1863
|
+
}
|
|
1864
|
+
export type StructuredType = ObjectType | UnionType;
|
|
1865
|
+
export interface ResolvedType extends ObjectType, UnionOrIntersectionType {
|
|
1866
|
+
members: SymbolTable;
|
|
1867
|
+
properties: Symbol[];
|
|
1868
|
+
callSignatures: readonly Signature[];
|
|
1869
|
+
constructSignatures: readonly Signature[];
|
|
1870
|
+
indexInfos: readonly IndexInfo[];
|
|
1871
|
+
}
|
|
1872
|
+
export interface IndexInfo {
|
|
1873
|
+
keyType: Type;
|
|
1874
|
+
type: Type;
|
|
1875
|
+
isReadonly: boolean;
|
|
1876
|
+
declaration?: IndexSignatureDeclaration;
|
|
1877
|
+
}
|
|
1878
|
+
export interface ClassElement extends NamedDeclaration {
|
|
1879
|
+
_classElementBrand: any;
|
|
1880
|
+
readonly name?: PropertyName;
|
|
1881
|
+
}
|
|
1882
|
+
export interface TypeElement extends NamedDeclaration {
|
|
1883
|
+
_typeElementBrand: any;
|
|
1884
|
+
readonly name?: PropertyName;
|
|
1885
|
+
}
|
|
1886
|
+
export interface TypeLiteralNode extends TypeNode, Declaration {
|
|
1887
|
+
readonly kind: SyntaxKind.TypeLiteral;
|
|
1888
|
+
readonly members: NodeArray<TypeElement>;
|
|
1889
|
+
}
|
|
1890
|
+
export type ObjectTypeDeclaration = TypeLiteralNode;
|
|
1891
|
+
export interface IndexSignatureDeclaration extends SignatureDeclarationBase, ClassElement, TypeElement, LocalsContainer {
|
|
1892
|
+
readonly kind: SyntaxKind.IndexSignature;
|
|
1893
|
+
readonly parent: ObjectTypeDeclaration;
|
|
1894
|
+
readonly modifiers?: NodeArray<Modifier>;
|
|
1895
|
+
readonly type: TypeNode;
|
|
1896
|
+
}
|
|
1897
|
+
export interface EvaluatorResult<T extends string | number | undefined = string | number | undefined> {
|
|
1898
|
+
value: T;
|
|
1899
|
+
isSyntacticallyString: boolean;
|
|
1900
|
+
resolvedOtherFiles: boolean;
|
|
1901
|
+
hasExternalReferences: boolean;
|
|
1902
|
+
}
|
|
1903
|
+
export interface JSDocTemplateTag extends JSDocTag {
|
|
1904
|
+
readonly kind: SyntaxKind.JSDocTemplateTag;
|
|
1905
|
+
readonly constraint: JSDocTypeExpression | undefined;
|
|
1906
|
+
readonly typeParameters: NodeArray<TypeParameterDeclaration>;
|
|
1907
|
+
}
|
|
1908
|
+
export interface JSDocThisTag extends JSDocTag {
|
|
1909
|
+
readonly kind: SyntaxKind.JSDocThisTag;
|
|
1910
|
+
readonly typeExpression: JSDocTypeExpression;
|
|
1911
|
+
}
|
|
1912
|
+
export interface JSDocVariadicType extends JSDocType {
|
|
1913
|
+
readonly kind: SyntaxKind.JSDocVariadicType;
|
|
1914
|
+
readonly type: TypeNode;
|
|
1915
|
+
}
|
|
1916
|
+
export interface JSDocDeprecatedTag extends JSDocTag {
|
|
1917
|
+
kind: SyntaxKind.JSDocDeprecatedTag;
|
|
1918
|
+
}
|
|
1919
|
+
export interface PropertyDeclaration extends ClassElement, JSDocContainer {
|
|
1920
|
+
readonly kind: SyntaxKind.PropertyDeclaration;
|
|
1921
|
+
readonly parent: StructDeclaration;
|
|
1922
|
+
readonly modifiers?: NodeArray<Modifier>;
|
|
1923
|
+
readonly name: PropertyName;
|
|
1924
|
+
readonly type?: TypeNode;
|
|
1925
|
+
readonly initializer?: Expression;
|
|
1926
|
+
}
|
|
1927
|
+
export interface BindingElement extends NamedDeclaration, FlowContainer {
|
|
1928
|
+
readonly kind: SyntaxKind.BindingElement;
|
|
1929
|
+
readonly parent: BindingPattern;
|
|
1930
|
+
readonly propertyName?: PropertyName;
|
|
1931
|
+
readonly dotDotDotToken?: DotDotDotToken;
|
|
1932
|
+
readonly name: BindingName;
|
|
1933
|
+
readonly initializer?: Expression;
|
|
1934
|
+
}
|
|
1935
|
+
export type BooleanLiteral = TrueLiteral | FalseLiteral;
|
|
1936
|
+
export interface LiteralTypeNode extends TypeNode {
|
|
1937
|
+
readonly kind: SyntaxKind.LiteralType;
|
|
1938
|
+
readonly literal: LiteralExpression | PrefixUnaryExpression | BooleanLiteral | ImpliedStringConcatExpression;
|
|
1939
|
+
}
|
|
1940
|
+
export interface StructTypeNode extends TypeNode {
|
|
1941
|
+
readonly kind: SyntaxKind.StructType;
|
|
1942
|
+
readonly typeName: EntityName;
|
|
1943
|
+
}
|
|
1944
|
+
export declare const enum SymbolFormatFlags {
|
|
1945
|
+
None = 0,
|
|
1946
|
+
WriteTypeParametersOrArguments = 1,
|
|
1947
|
+
UseOnlyExternalAliasing = 2,
|
|
1948
|
+
AllowAnyNodeKind = 4,
|
|
1949
|
+
UseAliasDefinedOutsideCurrentScope = 8
|
|
1950
|
+
}
|
|
1951
|
+
export interface ArrayBindingPattern extends Node {
|
|
1952
|
+
readonly kind: SyntaxKind.ArrayBindingPattern;
|
|
1953
|
+
readonly parent: VariableDeclaration | ParameterDeclaration | BindingElement;
|
|
1954
|
+
readonly elements: NodeArray<ArrayBindingElement>;
|
|
1955
|
+
}
|
|
1956
|
+
export type BindingPattern = ArrayBindingPattern;
|
|
1957
|
+
export type ArrayBindingElement = BindingElement | OmittedExpression;
|
|
1958
|
+
export interface IndexedAccessTypeNode extends TypeNode {
|
|
1959
|
+
readonly kind: SyntaxKind.IndexedAccessType;
|
|
1960
|
+
readonly objectType: TypeNode;
|
|
1961
|
+
readonly indexType: TypeNode;
|
|
1962
|
+
}
|
|
1963
|
+
export declare const enum Extension {
|
|
1964
|
+
C = ".c",
|
|
1965
|
+
Lpc = ".lpc",
|
|
1966
|
+
H = ".h",
|
|
1967
|
+
Json = ".json"
|
|
1968
|
+
}
|
|
1969
|
+
export interface SyntaxList extends Node {
|
|
1970
|
+
kind: SyntaxKind.SyntaxList;
|
|
1971
|
+
}
|
|
1972
|
+
export declare const enum LanguageVariant {
|
|
1973
|
+
LDMud = 0,
|
|
1974
|
+
FluffOS = 1,
|
|
1975
|
+
Standard = 2
|
|
1976
|
+
}
|
|
1977
|
+
export declare const DriverTypeMap: string[];
|
|
1978
|
+
export declare const enum JSDocParsingMode {
|
|
1979
|
+
/**
|
|
1980
|
+
* Always parse JSDoc comments and include them in the AST.
|
|
1981
|
+
*
|
|
1982
|
+
* This is the default if no mode is provided.
|
|
1983
|
+
*/
|
|
1984
|
+
ParseAll = 0,
|
|
1985
|
+
/**
|
|
1986
|
+
* Never parse JSDoc comments, mo matter the file type.
|
|
1987
|
+
*/
|
|
1988
|
+
ParseNone = 1,
|
|
1989
|
+
/**
|
|
1990
|
+
* Parse only JSDoc comments which are needed to provide correct type errors.
|
|
1991
|
+
*
|
|
1992
|
+
* This will always parse JSDoc in non-TS files, but only parse JSDoc comments
|
|
1993
|
+
* containing `@see` and `@link` in TS files.
|
|
1994
|
+
*/
|
|
1995
|
+
ParseForTypeErrors = 2,
|
|
1996
|
+
/**
|
|
1997
|
+
* Parse only JSDoc comments which are needed to provide correct type info.
|
|
1998
|
+
*
|
|
1999
|
+
* This will always parse JSDoc in non-TS files, but never in TS files.
|
|
2000
|
+
*
|
|
2001
|
+
* Note: Do not use this mode if you require accurate type errors; use {@link ParseForTypeErrors} instead.
|
|
2002
|
+
*/
|
|
2003
|
+
ParseForTypeInfo = 3
|
|
2004
|
+
}
|
|
2005
|
+
export interface TextSpan {
|
|
2006
|
+
start: number;
|
|
2007
|
+
length: number;
|
|
2008
|
+
}
|
|
2009
|
+
export interface TextChangeRange {
|
|
2010
|
+
span: TextSpan;
|
|
2011
|
+
newLength: number;
|
|
2012
|
+
}
|
|
2013
|
+
export declare const enum IndexKind {
|
|
2014
|
+
String = 0,
|
|
2015
|
+
Number = 1
|
|
2016
|
+
}
|
|
2017
|
+
export interface StringLiteralType extends LiteralType {
|
|
2018
|
+
value: string;
|
|
2019
|
+
}
|
|
2020
|
+
export interface BytesLiteralType extends LiteralType {
|
|
2021
|
+
value: string;
|
|
2022
|
+
}
|
|
2023
|
+
export interface IntLiteralType extends LiteralType {
|
|
2024
|
+
__intLiteralBrand: any;
|
|
2025
|
+
value: number;
|
|
2026
|
+
}
|
|
2027
|
+
export interface FloatLiteralType extends LiteralType {
|
|
2028
|
+
__floaLiteralBrand: any;
|
|
2029
|
+
value: number;
|
|
2030
|
+
}
|
|
2031
|
+
export type TypeVariable = TypeParameter;
|
|
2032
|
+
export type BaseType = ObjectType | TypeVariable;
|
|
2033
|
+
export interface ScriptReferenceHost {
|
|
2034
|
+
getCompilerOptions(): CompilerOptions;
|
|
2035
|
+
getSourceFile(fileName: string): SourceFile | undefined;
|
|
2036
|
+
getSourceFileByPath(path: Path): SourceFile | undefined;
|
|
2037
|
+
getCurrentDirectory(): string;
|
|
2038
|
+
}
|
|
2039
|
+
export interface Program extends ScriptReferenceHost {
|
|
2040
|
+
getCurrentDirectory(): string;
|
|
2041
|
+
/**
|
|
2042
|
+
* Get a list of root file names that were passed to a 'createProgram'
|
|
2043
|
+
*/
|
|
2044
|
+
getRootFileNames(): readonly string[];
|
|
2045
|
+
/**
|
|
2046
|
+
* Get a list of files in the program
|
|
2047
|
+
*/
|
|
2048
|
+
getSourceFiles(): readonly SourceFile[];
|
|
2049
|
+
getGlobalDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[];
|
|
2050
|
+
getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly DiagnosticWithLocation[];
|
|
2051
|
+
/** The first time this is called, it will return global diagnostics (no location). */
|
|
2052
|
+
getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[];
|
|
2053
|
+
getDeclarationDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly DiagnosticWithLocation[];
|
|
2054
|
+
getConfigFileParsingDiagnostics(): readonly Diagnostic[];
|
|
2055
|
+
getConfigDefines(): ReadonlyMap<string, string>;
|
|
2056
|
+
getIdentifierCount(): number;
|
|
2057
|
+
getSymbolCount(): number;
|
|
2058
|
+
getTypeCount(): number;
|
|
2059
|
+
getInstantiationCount(): number;
|
|
2060
|
+
getRelationCacheSizes(): {
|
|
2061
|
+
assignable: number;
|
|
2062
|
+
identity: number;
|
|
2063
|
+
subtype: number;
|
|
2064
|
+
strictSubtype: number;
|
|
2065
|
+
};
|
|
2066
|
+
isSourceFileDefaultLibrary(file: SourceFile): boolean;
|
|
2067
|
+
getProjectReferences(): readonly ProjectReference[] | undefined;
|
|
2068
|
+
getResolvedProjectReferences(): readonly (ResolvedProjectReference | undefined)[] | undefined;
|
|
2069
|
+
}
|
|
2070
|
+
export interface ModuleResolutionHost {
|
|
2071
|
+
fileExists(fileName: string): boolean;
|
|
2072
|
+
readFile(fileName: string): string | undefined;
|
|
2073
|
+
trace?(s: string): void;
|
|
2074
|
+
directoryExists?(directoryName: string): boolean;
|
|
2075
|
+
/**
|
|
2076
|
+
* Resolve a symbolic link.
|
|
2077
|
+
* @see https://nodejs.org/api/fs.html#fs_fs_realpathsync_path_options
|
|
2078
|
+
*/
|
|
2079
|
+
realpath?(path: string): string;
|
|
2080
|
+
getCurrentDirectory?(): string;
|
|
2081
|
+
getDirectories?(path: string): string[];
|
|
2082
|
+
useCaseSensitiveFileNames?: boolean | (() => boolean) | undefined;
|
|
2083
|
+
}
|
|
2084
|
+
export interface WriteFileCallbackData {
|
|
2085
|
+
}
|
|
2086
|
+
export type WriteFileCallback = (fileName: string, text: string, writeByteOrderMark: boolean, onError?: (message: string) => void, sourceFiles?: readonly SourceFile[], data?: WriteFileCallbackData) => void;
|
|
2087
|
+
export interface CompilerHost extends ModuleResolutionHost {
|
|
2088
|
+
getSourceFile(fileName: string, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined;
|
|
2089
|
+
getSourceFileByPath?(fileName: string, path: Path, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined;
|
|
2090
|
+
getSourceTextFromSnapshot(fileName: string): string | undefined;
|
|
2091
|
+
getCancellationToken?(): CancellationToken;
|
|
2092
|
+
getDefaultLibFileName(options: CompilerOptions): string;
|
|
2093
|
+
getDefaultLibLocation?(): string;
|
|
2094
|
+
writeFile: WriteFileCallback;
|
|
2095
|
+
getCurrentDirectory(): string;
|
|
2096
|
+
getCanonicalFileName(fileName: string): string;
|
|
2097
|
+
useCaseSensitiveFileNames(): boolean;
|
|
2098
|
+
getNewLine(): string;
|
|
2099
|
+
readDirectory?(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): string[];
|
|
2100
|
+
/** @deprecated supply resolveModuleNameLiterals instead for resolution that can handle newer resolution modes like nodenext */
|
|
2101
|
+
resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModule | undefined)[];
|
|
2102
|
+
/**
|
|
2103
|
+
* Returns the module resolution cache used by a provided `resolveModuleNames` implementation so that any non-name module resolution operations (eg, package.json lookup) can reuse it
|
|
2104
|
+
*/
|
|
2105
|
+
getModuleResolutionCache?(): ModuleResolutionCache | undefined;
|
|
2106
|
+
/**
|
|
2107
|
+
*
|
|
2108
|
+
* @param moduleLiterals
|
|
2109
|
+
* @param containingFile
|
|
2110
|
+
* @param redirectedReference
|
|
2111
|
+
* @param options
|
|
2112
|
+
* @param containingSourceFile
|
|
2113
|
+
* @param reusedNames
|
|
2114
|
+
*/
|
|
2115
|
+
resolveModuleNameLiterals?(moduleLiterals: readonly StringLiteral[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile, reusedNames: readonly StringLiteral[] | undefined): readonly ResolvedModuleWithFailedLookupLocations[];
|
|
2116
|
+
getEnvironmentVariable?(name: string): string | undefined;
|
|
2117
|
+
/** If provided along with custom resolveModuleNames or resolveTypeReferenceDirectives, used to determine if unchanged file path needs to re-resolve modules/type reference directives */
|
|
2118
|
+
hasInvalidatedResolutions?(filePath: Path): boolean;
|
|
2119
|
+
getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined;
|
|
2120
|
+
jsDocParsingMode?: JSDocParsingMode;
|
|
2121
|
+
}
|
|
2122
|
+
export interface CreateProgramOptions {
|
|
2123
|
+
rootNames: readonly string[];
|
|
2124
|
+
options: CompilerOptions;
|
|
2125
|
+
projectReferences?: readonly ProjectReference[];
|
|
2126
|
+
host?: CompilerHost;
|
|
2127
|
+
oldProgram?: Program;
|
|
2128
|
+
configFileParsingDiagnostics?: readonly Diagnostic[];
|
|
2129
|
+
}
|
|
2130
|
+
export interface GetEffectiveTypeRootsHost {
|
|
2131
|
+
getCurrentDirectory?(): string;
|
|
2132
|
+
}
|
|
2133
|
+
/**
|
|
2134
|
+
* Used by services to specify the minimum host area required to set up source files under any compilation settings
|
|
2135
|
+
*/
|
|
2136
|
+
export interface MinimalResolutionCacheHost extends ModuleResolutionHost {
|
|
2137
|
+
getCompilationSettings(): CompilerOptions;
|
|
2138
|
+
getCompilerHost?(): CompilerHost | undefined;
|
|
2139
|
+
}
|
|
2140
|
+
export declare const enum NewLineKind {
|
|
2141
|
+
CarriageReturnLineFeed = 0,
|
|
2142
|
+
LineFeed = 1
|
|
2143
|
+
}
|
|
2144
|
+
export interface PrinterOptions {
|
|
2145
|
+
removeComments?: boolean;
|
|
2146
|
+
newLine?: NewLineKind;
|
|
2147
|
+
omitTrailingSemicolon?: boolean;
|
|
2148
|
+
noEmitHelpers?: boolean;
|
|
2149
|
+
}
|
|
2150
|
+
export interface EmitResult {
|
|
2151
|
+
emitSkipped: boolean;
|
|
2152
|
+
/** Contains declaration emit diagnostics */
|
|
2153
|
+
diagnostics: readonly Diagnostic[];
|
|
2154
|
+
emittedFiles?: string[];
|
|
2155
|
+
}
|
|
2156
|
+
export declare enum WatchFileKind {
|
|
2157
|
+
FixedPollingInterval = 0,
|
|
2158
|
+
PriorityPollingInterval = 1,
|
|
2159
|
+
DynamicPriorityPolling = 2,
|
|
2160
|
+
FixedChunkSizePolling = 3,
|
|
2161
|
+
UseFsEvents = 4,
|
|
2162
|
+
UseFsEventsOnParentDirectory = 5
|
|
2163
|
+
}
|
|
2164
|
+
export declare enum WatchDirectoryKind {
|
|
2165
|
+
UseFsEvents = 0,
|
|
2166
|
+
FixedPollingInterval = 1,
|
|
2167
|
+
DynamicPriorityPolling = 2,
|
|
2168
|
+
FixedChunkSizePolling = 3
|
|
2169
|
+
}
|
|
2170
|
+
export declare enum PollingWatchKind {
|
|
2171
|
+
FixedInterval = 0,
|
|
2172
|
+
PriorityInterval = 1,
|
|
2173
|
+
DynamicPriority = 2,
|
|
2174
|
+
FixedChunkSize = 3
|
|
2175
|
+
}
|
|
2176
|
+
export interface WatchOptions {
|
|
2177
|
+
watchFile?: WatchFileKind;
|
|
2178
|
+
watchDirectory?: WatchDirectoryKind;
|
|
2179
|
+
fallbackPolling?: PollingWatchKind;
|
|
2180
|
+
synchronousWatchDirectory?: boolean;
|
|
2181
|
+
excludeDirectories?: string[];
|
|
2182
|
+
excludeFiles?: string[];
|
|
2183
|
+
[option: string]: CompilerOptionsValue | undefined;
|
|
2184
|
+
}
|
|
2185
|
+
export declare const enum WatchDirectoryFlags {
|
|
2186
|
+
None = 0,
|
|
2187
|
+
Recursive = 1
|
|
2188
|
+
}
|
|
2189
|
+
/**
|
|
2190
|
+
* Unique identifier with a package name and version.
|
|
2191
|
+
* If changing this, remember to change `packageIdIsEqual`.
|
|
2192
|
+
*/
|
|
2193
|
+
export interface PackageId {
|
|
2194
|
+
/**
|
|
2195
|
+
* Name of the package.
|
|
2196
|
+
* Should not include `@types`.
|
|
2197
|
+
* If accessing a non-index file, this should include its name e.g. "foo/bar".
|
|
2198
|
+
*/
|
|
2199
|
+
name: string;
|
|
2200
|
+
/**
|
|
2201
|
+
* Name of a submodule within this package.
|
|
2202
|
+
* May be "".
|
|
2203
|
+
*/
|
|
2204
|
+
subModuleName: string;
|
|
2205
|
+
/** Version of the package, e.g. "1.2.3" */
|
|
2206
|
+
version: string;
|
|
2207
|
+
}
|
|
2208
|
+
export declare const enum ScriptKind {
|
|
2209
|
+
Unknown = 0,
|
|
2210
|
+
LPC = 1,
|
|
2211
|
+
External = 5,
|
|
2212
|
+
JSON = 6,
|
|
2213
|
+
/**
|
|
2214
|
+
* Used on extensions that doesn't define the ScriptKind but the content defines it.
|
|
2215
|
+
* Deferred extensions are going to be included in all project contexts.
|
|
2216
|
+
*/
|
|
2217
|
+
Deferred = 7
|
|
2218
|
+
}
|
|
2219
|
+
export declare const enum ScriptTarget {
|
|
2220
|
+
LPC = 1,
|
|
2221
|
+
JavaScript = 2,
|
|
2222
|
+
JSON = 3,
|
|
2223
|
+
Latest = 1
|
|
2224
|
+
}
|
|
2225
|
+
export declare enum ModuleKind {
|
|
2226
|
+
None = 0,
|
|
2227
|
+
LPC = 1
|
|
2228
|
+
}
|
|
2229
|
+
export declare enum ModuleResolutionKind {
|
|
2230
|
+
Classic = 1
|
|
2231
|
+
}
|
|
2232
|
+
export type ResolutionMode = ModuleKind.LPC | undefined;
|
|
2233
|
+
export declare const enum NodeBuilderFlags {
|
|
2234
|
+
None = 0,
|
|
2235
|
+
NoTruncation = 1,// Don't truncate result
|
|
2236
|
+
WriteArrayAsGenericType = 2,// Write Array<T> instead T[]
|
|
2237
|
+
GenerateNamesForShadowedTypeParams = 4,// When a type parameter T is shadowing another T, generate a name for it so it can still be referenced
|
|
2238
|
+
UseStructuralFallback = 8,// When an alias cannot be named by its symbol, rather than report an error, fallback to a structural printout if possible
|
|
2239
|
+
ForbidIndexedAccessSymbolReferences = 16,// Forbid references like `I["a"]["b"]` - print `typeof I.a<x>.b<y>` instead
|
|
2240
|
+
WriteTypeArgumentsOfSignature = 32,// Write the type arguments instead of type parameters of the signature
|
|
2241
|
+
UseFullyQualifiedType = 64,// Write out the fully qualified type name (eg. Module.Type, instead of Type)
|
|
2242
|
+
UseOnlyExternalAliasing = 128,// Only use external aliases for a symbol
|
|
2243
|
+
SuppressAnyReturnType = 256,// If the return type is any-like and can be elided, don't offer a return type.
|
|
2244
|
+
WriteTypeParametersInQualifiedName = 512,
|
|
2245
|
+
MultilineObjectLiterals = 1024,// Always write object literals across multiple lines
|
|
2246
|
+
WriteClassExpressionAsTypeLiteral = 2048,// Write class {} as { new(): {} } - used for mixin declaration emit
|
|
2247
|
+
UseTypeOfFunction = 4096,// Build using typeof instead of function type literal
|
|
2248
|
+
OmitParameterModifiers = 8192,// Omit modifiers on parameters
|
|
2249
|
+
UseAliasDefinedOutsideCurrentScope = 16384,// Allow non-visible aliases
|
|
2250
|
+
UseSingleQuotesForStringLiteralType = 268435456,// Use single quotes for string literal type
|
|
2251
|
+
NoTypeReduction = 536870912,// Don't call getReducedType
|
|
2252
|
+
OmitThisParameter = 33554432,
|
|
2253
|
+
AllowThisInObjectLiteral = 32768,
|
|
2254
|
+
AllowQualifiedNameInPlaceOfIdentifier = 65536,
|
|
2255
|
+
AllowAnonymousIdentifier = 131072,
|
|
2256
|
+
AllowEmptyUnionOrIntersection = 262144,
|
|
2257
|
+
AllowEmptyTuple = 524288,
|
|
2258
|
+
AllowUniqueESSymbolType = 1048576,
|
|
2259
|
+
AllowEmptyIndexInfoType = 2097152,
|
|
2260
|
+
AllowNodeModulesRelativePaths = 67108864,
|
|
2261
|
+
IgnoreErrors = 70221824,
|
|
2262
|
+
InObjectTypeLiteral = 4194304,
|
|
2263
|
+
InTypeAlias = 8388608,// Writing type in type alias declaration
|
|
2264
|
+
InInitialEntityName = 16777216
|
|
2265
|
+
}
|
|
2266
|
+
export interface ComputedPropertyName extends Node {
|
|
2267
|
+
readonly kind: SyntaxKind.ComputedPropertyName;
|
|
2268
|
+
readonly parent: Declaration;
|
|
2269
|
+
readonly expression: Expression;
|
|
2270
|
+
}
|
|
2271
|
+
export type ModuleExportName = Identifier | StringLiteral;
|
|
2272
|
+
export interface QualifiedName extends Node, FlowContainer {
|
|
2273
|
+
readonly kind: SyntaxKind.QualifiedName;
|
|
2274
|
+
readonly left: EntityName;
|
|
2275
|
+
readonly right: Identifier;
|
|
2276
|
+
}
|
|
2277
|
+
export interface MappedTypeNode extends TypeNode, Declaration, LocalsContainer {
|
|
2278
|
+
readonly kind: SyntaxKind.MappedType;
|
|
2279
|
+
readonly readonlyToken?: PlusToken | MinusToken;
|
|
2280
|
+
readonly typeParameter: TypeParameterDeclaration;
|
|
2281
|
+
readonly nameType?: TypeNode;
|
|
2282
|
+
readonly type?: TypeNode;
|
|
2283
|
+
/** Used only to produce grammar errors */
|
|
2284
|
+
readonly members?: NodeArray<TypeElement>;
|
|
2285
|
+
}
|
|
2286
|
+
export declare const enum EmitHint {
|
|
2287
|
+
SourceFile = 0,// Emitting a SourceFile
|
|
2288
|
+
Expression = 1,// Emitting an Expression
|
|
2289
|
+
IdentifierName = 2,// Emitting an IdentifierName
|
|
2290
|
+
MappedTypeParameter = 3,// Emitting a TypeParameterDeclaration inside of a MappedTypeNode
|
|
2291
|
+
Unspecified = 4,// Emitting an otherwise unspecified node
|
|
2292
|
+
EmbeddedStatement = 5,// Emitting an embedded statement
|
|
2293
|
+
JsxAttributeValue = 6,// Emitting a JSX attribute value
|
|
2294
|
+
ImportTypeNodeAttributes = 7
|
|
2295
|
+
}
|
|
2296
|
+
export declare const enum ListFormat {
|
|
2297
|
+
None = 0,
|
|
2298
|
+
SingleLine = 0,// Prints the list on a single line (default).
|
|
2299
|
+
MultiLine = 1,// Prints the list on multiple lines.
|
|
2300
|
+
PreserveLines = 2,// Prints the list using line preservation if possible.
|
|
2301
|
+
LinesMask = 3,
|
|
2302
|
+
NotDelimited = 0,// There is no delimiter between list items (default).
|
|
2303
|
+
BarDelimited = 4,// Each list item is space-and-bar (" |") delimited.
|
|
2304
|
+
AmpersandDelimited = 8,// Each list item is space-and-ampersand (" &") delimited.
|
|
2305
|
+
CommaDelimited = 16,// Each list item is comma (",") delimited.
|
|
2306
|
+
AsteriskDelimited = 32,// Each list item is asterisk ("\n *") delimited, used with JSDoc.
|
|
2307
|
+
DelimitersMask = 60,
|
|
2308
|
+
AllowTrailingComma = 64,// Write a trailing comma (",") if present.
|
|
2309
|
+
Indented = 128,// The list should be indented.
|
|
2310
|
+
SpaceBetweenBraces = 256,// Inserts a space after the opening brace and before the closing brace.
|
|
2311
|
+
SpaceBetweenSiblings = 512,// Inserts a space between each sibling node.
|
|
2312
|
+
Braces = 1024,// The list is surrounded by "{" and "}".
|
|
2313
|
+
Parenthesis = 2048,// The list is surrounded by "(" and ")".
|
|
2314
|
+
AngleBrackets = 4096,// The list is surrounded by "<" and ">".
|
|
2315
|
+
SquareBrackets = 8192,// The list is surrounded by "[" and "]".
|
|
2316
|
+
ArrayBrackets = 4194304,// The list is surrounded by "({" and "})".
|
|
2317
|
+
BracketsMask = 4209664,
|
|
2318
|
+
OptionalIfUndefined = 16384,// Do not emit brackets if the list is undefined.
|
|
2319
|
+
OptionalIfEmpty = 32768,// Do not emit brackets if the list is empty.
|
|
2320
|
+
Optional = 49152,
|
|
2321
|
+
PreferNewLine = 65536,// Prefer adding a LineTerminator between synthesized nodes.
|
|
2322
|
+
NoTrailingNewLine = 131072,// Do not emit a trailing NewLine for a MultiLine list.
|
|
2323
|
+
NoInterveningComments = 262144,// Do not emit comments between each node
|
|
2324
|
+
NoSpaceIfEmpty = 524288,// If the literal is empty, do not add spaces between braces.
|
|
2325
|
+
SingleElement = 1048576,
|
|
2326
|
+
SpaceAfterList = 2097152,// Add space after list
|
|
2327
|
+
Modifiers = 2359808,
|
|
2328
|
+
HeritageClauses = 512,
|
|
2329
|
+
SingleLineTypeLiteralMembers = 768,
|
|
2330
|
+
MultiLineTypeLiteralMembers = 32897,
|
|
2331
|
+
SingleLineTupleTypeElements = 528,
|
|
2332
|
+
MultiLineTupleTypeElements = 657,
|
|
2333
|
+
UnionTypeConstituents = 516,
|
|
2334
|
+
IntersectionTypeConstituents = 520,
|
|
2335
|
+
ObjectBindingPatternElements = 525136,
|
|
2336
|
+
ArrayBindingPatternElements = 524880,
|
|
2337
|
+
ObjectLiteralExpressionProperties = 526226,
|
|
2338
|
+
ImportAttributes = 526226,
|
|
2339
|
+
/** @deprecated */ ImportClauseEntries = 526226,
|
|
2340
|
+
ArrayLiteralExpressionElements = 4195026,
|
|
2341
|
+
JsArrayLiteralExpressionElements = 8914,
|
|
2342
|
+
CommaListElements = 528,
|
|
2343
|
+
CallExpressionArguments = 2576,
|
|
2344
|
+
NewExpressionArguments = 18960,
|
|
2345
|
+
TemplateExpressionSpans = 262144,
|
|
2346
|
+
SingleLineBlockStatements = 768,
|
|
2347
|
+
MultiLineBlockStatements = 129,
|
|
2348
|
+
VariableDeclarationList = 528,
|
|
2349
|
+
SingleLineFunctionBodyStatements = 768,
|
|
2350
|
+
MultiLineFunctionBodyStatements = 1,
|
|
2351
|
+
ClassHeritageClauses = 0,
|
|
2352
|
+
ClassMembers = 129,
|
|
2353
|
+
InterfaceMembers = 129,
|
|
2354
|
+
EnumMembers = 145,
|
|
2355
|
+
CaseBlockClauses = 129,
|
|
2356
|
+
NamedImportsOrExportsElements = 525136,
|
|
2357
|
+
JsxElementOrFragmentChildren = 262144,
|
|
2358
|
+
JsxElementAttributes = 262656,
|
|
2359
|
+
CaseOrDefaultClauseStatements = 163969,
|
|
2360
|
+
HeritageClauseTypes = 528,
|
|
2361
|
+
SourceFileStatements = 131073,
|
|
2362
|
+
Decorators = 2146305,
|
|
2363
|
+
TypeArguments = 53776,
|
|
2364
|
+
TypeParameters = 53776,
|
|
2365
|
+
Parameters = 2576,
|
|
2366
|
+
IndexSignatureParameters = 8848,
|
|
2367
|
+
JSDocComment = 33
|
|
2368
|
+
}
|
|
2369
|
+
export interface Bundle extends Node {
|
|
2370
|
+
readonly kind: SyntaxKind.Bundle;
|
|
2371
|
+
readonly sourceFiles: readonly SourceFile[];
|
|
2372
|
+
}
|
|
2373
|
+
export interface Printer {
|
|
2374
|
+
/**
|
|
2375
|
+
* Print a node and its subtree as-is, without any emit transformations.
|
|
2376
|
+
* @param hint A value indicating the purpose of a node. This is primarily used to
|
|
2377
|
+
* distinguish between an `Identifier` used in an expression position, versus an
|
|
2378
|
+
* `Identifier` used as an `IdentifierName` as part of a declaration. For most nodes you
|
|
2379
|
+
* should just pass `Unspecified`.
|
|
2380
|
+
* @param node The node to print. The node and its subtree are printed as-is, without any
|
|
2381
|
+
* emit transformations.
|
|
2382
|
+
* @param sourceFile A source file that provides context for the node. The source text of
|
|
2383
|
+
* the file is used to emit the original source content for literals and identifiers, while
|
|
2384
|
+
* the identifiers of the source file are used when generating unique names to avoid
|
|
2385
|
+
* collisions.
|
|
2386
|
+
*/
|
|
2387
|
+
printNode(hint: EmitHint, node: Node, sourceFile: SourceFile): string;
|
|
2388
|
+
/**
|
|
2389
|
+
* Prints a list of nodes using the given format flags
|
|
2390
|
+
*/
|
|
2391
|
+
printList<T extends Node>(format: ListFormat, list: NodeArray<T>, sourceFile: SourceFile): string;
|
|
2392
|
+
/**
|
|
2393
|
+
* Prints a source file as-is, without any emit transformations.
|
|
2394
|
+
*/
|
|
2395
|
+
printFile(sourceFile: SourceFile): string;
|
|
2396
|
+
/**
|
|
2397
|
+
* Prints a bundle of source files as-is, without any emit transformations.
|
|
2398
|
+
*/
|
|
2399
|
+
printBundle(bundle: Bundle): string;
|
|
2400
|
+
}
|
|
2401
|
+
export interface PrintHandlers {
|
|
2402
|
+
/**
|
|
2403
|
+
* A hook used by the Printer when generating unique names to avoid collisions with
|
|
2404
|
+
* globally defined names that exist outside of the current source file.
|
|
2405
|
+
*/
|
|
2406
|
+
hasGlobalName?(name: string): boolean;
|
|
2407
|
+
/**
|
|
2408
|
+
* A hook used by the Printer to provide notifications prior to emitting a node. A
|
|
2409
|
+
* compatible implementation **must** invoke `emitCallback` with the provided `hint` and
|
|
2410
|
+
* `node` values.
|
|
2411
|
+
* @param hint A hint indicating the intended purpose of the node.
|
|
2412
|
+
* @param node The node to emit.
|
|
2413
|
+
* @param emitCallback A callback that, when invoked, will emit the node.
|
|
2414
|
+
* @example
|
|
2415
|
+
* ```ts
|
|
2416
|
+
* var printer = createPrinter(printerOptions, {
|
|
2417
|
+
* onEmitNode(hint, node, emitCallback) {
|
|
2418
|
+
* // set up or track state prior to emitting the node...
|
|
2419
|
+
* emitCallback(hint, node);
|
|
2420
|
+
* // restore state after emitting the node...
|
|
2421
|
+
* }
|
|
2422
|
+
* });
|
|
2423
|
+
* ```
|
|
2424
|
+
*/
|
|
2425
|
+
onEmitNode?(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void;
|
|
2426
|
+
/**
|
|
2427
|
+
* A hook used to check if an emit notification is required for a node.
|
|
2428
|
+
* @param node The node to emit.
|
|
2429
|
+
*/
|
|
2430
|
+
isEmitNotificationEnabled?(node: Node): boolean;
|
|
2431
|
+
/**
|
|
2432
|
+
* A hook used by the Printer to perform just-in-time substitution of a node. This is
|
|
2433
|
+
* primarily used by node transformations that need to substitute one node for another,
|
|
2434
|
+
* such as replacing `myExportedVar` with `exports.myExportedVar`.
|
|
2435
|
+
* @param hint A hint indicating the intended purpose of the node.
|
|
2436
|
+
* @param node The node to emit.
|
|
2437
|
+
* @example
|
|
2438
|
+
* ```ts
|
|
2439
|
+
* var printer = createPrinter(printerOptions, {
|
|
2440
|
+
* substituteNode(hint, node) {
|
|
2441
|
+
* // perform substitution if necessary...
|
|
2442
|
+
* return node;
|
|
2443
|
+
* }
|
|
2444
|
+
* });
|
|
2445
|
+
* ```
|
|
2446
|
+
*/
|
|
2447
|
+
substituteNode?(hint: EmitHint, node: Node): Node;
|
|
2448
|
+
}
|
|
2449
|
+
export interface SourceMapSource {
|
|
2450
|
+
fileName: string;
|
|
2451
|
+
text: string;
|
|
2452
|
+
skipTrivia?: (pos: number) => number;
|
|
2453
|
+
}
|
|
2454
|
+
/**
|
|
2455
|
+
* A list of comma-separated expressions. This node is only created by transformations.
|
|
2456
|
+
*/
|
|
2457
|
+
export interface CommaListExpression extends Expression {
|
|
2458
|
+
readonly kind: SyntaxKind.CommaListExpression;
|
|
2459
|
+
readonly elements: NodeArray<Expression>;
|
|
2460
|
+
}
|
|
2461
|
+
export interface ParenthesizedTypeNode extends TypeNode {
|
|
2462
|
+
readonly kind: SyntaxKind.ParenthesizedType;
|
|
2463
|
+
readonly type: TypeNode;
|
|
2464
|
+
}
|
|
2465
|
+
export type VariableLikeDeclaration = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyDeclaration | PropertyAssignment | ShorthandPropertyAssignment | JSDocPropertyTag | JSDocParameterTag;
|
|
2466
|
+
/** Class and interface types (ObjectFlags.Class and ObjectFlags.Interface). */
|
|
2467
|
+
export interface InterfaceType extends ObjectType {
|
|
2468
|
+
typeParameters: TypeParameter[] | undefined;
|
|
2469
|
+
outerTypeParameters: TypeParameter[] | undefined;
|
|
2470
|
+
localTypeParameters: TypeParameter[] | undefined;
|
|
2471
|
+
thisType: TypeParameter | undefined;
|
|
2472
|
+
}
|
|
2473
|
+
export interface HeritageClause extends Node {
|
|
2474
|
+
readonly kind: SyntaxKind.HeritageClause;
|
|
2475
|
+
readonly parent: StructDeclaration | ClassLikeDeclaration;
|
|
2476
|
+
readonly types: NodeArray<Expression>;
|
|
2477
|
+
}
|
|
2478
|
+
export interface GenericType extends InterfaceType, TypeReference {
|
|
2479
|
+
}
|
|
2480
|
+
/**
|
|
2481
|
+
* Type references (ObjectFlags.Reference). When a class or interface has type parameters or
|
|
2482
|
+
* a "this" type, references to the class or interface are made using type references. The
|
|
2483
|
+
* typeArguments property specifies the types to substitute for the type parameters of the
|
|
2484
|
+
* class or interface and optionally includes an extra element that specifies the type to
|
|
2485
|
+
* substitute for "this" in the resulting instantiation. When no extra argument is present,
|
|
2486
|
+
* the type reference itself is substituted for "this". The typeArguments property is undefined
|
|
2487
|
+
* if the class or interface has no type parameters and the reference isn't specifying an
|
|
2488
|
+
* explicit "this" argument.
|
|
2489
|
+
*/
|
|
2490
|
+
export interface TypeReference extends ObjectType {
|
|
2491
|
+
target: GenericType;
|
|
2492
|
+
node?: TypeReferenceNode | ArrayTypeNode | TupleTypeNode;
|
|
2493
|
+
}
|
|
2494
|
+
export type TypeReferenceType = TypeReferenceNode | StructTypeNode | ExpressionWithTypeArguments;
|
|
2495
|
+
export interface FunctionOrConstructorTypeNodeBase extends TypeNode, SignatureDeclarationBase {
|
|
2496
|
+
readonly kind: SyntaxKind.FunctionType;
|
|
2497
|
+
readonly type: TypeNode;
|
|
2498
|
+
}
|
|
2499
|
+
export interface FunctionTypeNode extends FunctionOrConstructorTypeNodeBase, LocalsContainer {
|
|
2500
|
+
readonly kind: SyntaxKind.FunctionType;
|
|
2501
|
+
}
|
|
2502
|
+
export interface NodeWithTypeArguments extends TypeNode {
|
|
2503
|
+
readonly typeArguments?: NodeArray<TypeNode>;
|
|
2504
|
+
}
|
|
2505
|
+
export interface TypeReferenceNode extends NodeWithTypeArguments {
|
|
2506
|
+
readonly kind: SyntaxKind.TypeReference;
|
|
2507
|
+
readonly typeName: EntityName;
|
|
2508
|
+
}
|
|
2509
|
+
export declare const enum InferencePriority {
|
|
2510
|
+
None = 0,
|
|
2511
|
+
NakedTypeVariable = 1,// Naked type variable in union or intersection type
|
|
2512
|
+
SpeculativeTuple = 2,// Speculative tuple inference
|
|
2513
|
+
SubstituteSource = 4,// Source of inference originated within a substitution type's substitute
|
|
2514
|
+
HomomorphicMappedType = 8,// Reverse inference for homomorphic mapped type
|
|
2515
|
+
PartialHomomorphicMappedType = 16,// Partial reverse inference for homomorphic mapped type
|
|
2516
|
+
MappedTypeConstraint = 32,// Reverse inference for mapped type
|
|
2517
|
+
ContravariantConditional = 64,// Conditional type in contravariant position
|
|
2518
|
+
ReturnType = 128,// Inference made from return type of generic function
|
|
2519
|
+
LiteralKeyof = 256,// Inference made from a string literal to a keyof T
|
|
2520
|
+
NoConstraints = 512,// Don't infer from constraints of instantiable types
|
|
2521
|
+
AlwaysStrict = 1024,// Always use strict rules for contravariant inferences
|
|
2522
|
+
MaxValue = 2048,// Seed for inference priority tracking
|
|
2523
|
+
PriorityImpliesCombination = 416,// These priorities imply that the resulting type should be a combination of all candidates
|
|
2524
|
+
Circularity = -1
|
|
2525
|
+
}
|
|
2526
|
+
export interface InferTypeNode extends TypeNode {
|
|
2527
|
+
readonly kind: SyntaxKind.InferType;
|
|
2528
|
+
readonly typeParameter: TypeParameterDeclaration;
|
|
2529
|
+
}
|
|
2530
|
+
export interface DeferredTypeReference extends TypeReference {
|
|
2531
|
+
}
|
|
2532
|
+
export interface SubstitutionType extends InstantiableType {
|
|
2533
|
+
objectFlags: ObjectFlags;
|
|
2534
|
+
baseType: Type;
|
|
2535
|
+
constraint: Type;
|
|
2536
|
+
}
|
|
2537
|
+
export interface StringMappingType extends InstantiableType {
|
|
2538
|
+
symbol: Symbol;
|
|
2539
|
+
type: Type;
|
|
2540
|
+
}
|
|
2541
|
+
export interface SynthesizedComment extends CommentRange {
|
|
2542
|
+
text: string;
|
|
2543
|
+
pos: -1;
|
|
2544
|
+
end: -1;
|
|
2545
|
+
hasLeadingNewline?: boolean;
|
|
2546
|
+
}
|
|
2547
|
+
export type VisitResult<T extends Node | undefined> = T | readonly Node[];
|
|
2548
|
+
/**
|
|
2549
|
+
* A function that accepts and possibly transforms a node.
|
|
2550
|
+
*/
|
|
2551
|
+
export type Visitor<TIn extends Node = Node, TOut extends Node | undefined = TIn | undefined> = (node: TIn) => VisitResult<TOut>;
|
|
2552
|
+
export interface CoreTransformationContext {
|
|
2553
|
+
readonly factory: NodeFactory;
|
|
2554
|
+
/** Gets the compiler options supplied to the transformer. */
|
|
2555
|
+
getCompilerOptions(): CompilerOptions;
|
|
2556
|
+
/** Starts a new lexical environment. */
|
|
2557
|
+
startLexicalEnvironment(): void;
|
|
2558
|
+
/** Suspends the current lexical environment, usually after visiting a parameter list. */
|
|
2559
|
+
suspendLexicalEnvironment(): void;
|
|
2560
|
+
/** Resumes a suspended lexical environment, usually before visiting a function body. */
|
|
2561
|
+
resumeLexicalEnvironment(): void;
|
|
2562
|
+
/** Ends a lexical environment, returning any declarations. */
|
|
2563
|
+
endLexicalEnvironment(): Statement[] | undefined;
|
|
2564
|
+
/** Hoists a function declaration to the containing scope. */
|
|
2565
|
+
hoistFunctionDeclaration(node: FunctionDeclaration): void;
|
|
2566
|
+
/** Hoists a variable declaration to the containing scope. */
|
|
2567
|
+
hoistVariableDeclaration(node: Identifier): void;
|
|
2568
|
+
}
|
|
2569
|
+
export type EmitHelperUniqueNameCallback = (name: string) => string;
|
|
2570
|
+
export interface EmitHelperBase {
|
|
2571
|
+
readonly name: string;
|
|
2572
|
+
readonly scoped: boolean;
|
|
2573
|
+
readonly text: string | ((node: EmitHelperUniqueNameCallback) => string);
|
|
2574
|
+
readonly priority?: number;
|
|
2575
|
+
readonly dependencies?: EmitHelper[];
|
|
2576
|
+
}
|
|
2577
|
+
export interface ScopedEmitHelper extends EmitHelperBase {
|
|
2578
|
+
readonly scoped: true;
|
|
2579
|
+
}
|
|
2580
|
+
export interface UnscopedEmitHelper extends EmitHelperBase {
|
|
2581
|
+
readonly scoped: false;
|
|
2582
|
+
readonly text: string;
|
|
2583
|
+
}
|
|
2584
|
+
export type EmitHelper = ScopedEmitHelper | UnscopedEmitHelper;
|
|
2585
|
+
export interface TransformationContext extends CoreTransformationContext {
|
|
2586
|
+
/** Gets and resets the requested non-scoped emit helpers. */
|
|
2587
|
+
readEmitHelpers(): EmitHelper[] | undefined;
|
|
2588
|
+
/** Enables expression substitutions in the pretty printer for the provided SyntaxKind. */
|
|
2589
|
+
enableSubstitution(kind: SyntaxKind): void;
|
|
2590
|
+
/** Determines whether expression substitutions are enabled for the provided node. */
|
|
2591
|
+
isSubstitutionEnabled(node: Node): boolean;
|
|
2592
|
+
/**
|
|
2593
|
+
* Hook used by transformers to substitute expressions just before they
|
|
2594
|
+
* are emitted by the pretty printer.
|
|
2595
|
+
*
|
|
2596
|
+
* NOTE: Transformation hooks should only be modified during `Transformer` initialization,
|
|
2597
|
+
* before returning the `NodeTransformer` callback.
|
|
2598
|
+
*/
|
|
2599
|
+
onSubstituteNode: (hint: EmitHint, node: Node) => Node;
|
|
2600
|
+
/**
|
|
2601
|
+
* Enables before/after emit notifications in the pretty printer for the provided
|
|
2602
|
+
* SyntaxKind.
|
|
2603
|
+
*/
|
|
2604
|
+
enableEmitNotification(kind: SyntaxKind): void;
|
|
2605
|
+
/**
|
|
2606
|
+
* Determines whether before/after emit notifications should be raised in the pretty
|
|
2607
|
+
* printer when it emits a node.
|
|
2608
|
+
*/
|
|
2609
|
+
isEmitNotificationEnabled(node: Node): boolean;
|
|
2610
|
+
/**
|
|
2611
|
+
* Hook used to allow transformers to capture state before or after
|
|
2612
|
+
* the printer emits a node.
|
|
2613
|
+
*
|
|
2614
|
+
* NOTE: Transformation hooks should only be modified during `Transformer` initialization,
|
|
2615
|
+
* before returning the `NodeTransformer` callback.
|
|
2616
|
+
*/
|
|
2617
|
+
onEmitNode: (hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void) => void;
|
|
2618
|
+
}
|
|
2619
|
+
/**
|
|
2620
|
+
* A function that walks a node array using the given visitor, returning an array whose contents satisfy the test.
|
|
2621
|
+
*
|
|
2622
|
+
* - If the input node array is undefined, the output is undefined.
|
|
2623
|
+
* - If the visitor can return undefined, the node it visits in the array will be reused.
|
|
2624
|
+
* - If the output node array is not undefined, then its contents will satisfy the test.
|
|
2625
|
+
* - In order to obtain a return type that is more specific than `NodeArray<Node>`, a test
|
|
2626
|
+
* function _must_ be provided, and that function must be a type predicate.
|
|
2627
|
+
*
|
|
2628
|
+
* For the canonical implementation of this type, @see {visitNodes}.
|
|
2629
|
+
*/
|
|
2630
|
+
export interface NodesVisitor {
|
|
2631
|
+
<TIn extends Node, TInArray extends NodeArray<TIn> | undefined, TOut extends Node>(nodes: TInArray, visitor: Visitor<TIn, Node | undefined>, test: (node: Node) => node is TOut, start?: number, count?: number): NodeArray<TOut> | (TInArray & undefined);
|
|
2632
|
+
<TIn extends Node, TInArray extends NodeArray<TIn> | undefined>(nodes: TInArray, visitor: Visitor<TIn, Node | undefined>, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<Node> | (TInArray & undefined);
|
|
2633
|
+
}
|
|
2634
|
+
export declare const enum GeneratedIdentifierFlags {
|
|
2635
|
+
None = 0,// Mask to extract the kind of identifier from its flags.
|
|
2636
|
+
ReservedInNestedScopes = 8,// Reserve the generated name in nested scopes
|
|
2637
|
+
Optimistic = 16,// First instance won't use '_#' if there's no conflict
|
|
2638
|
+
FileLevel = 32,// Use only the file identifiers list and not generated names to search for conflicts
|
|
2639
|
+
AllowNameSubstitution = 64
|
|
2640
|
+
}
|
|
2641
|
+
export interface EvolvingArrayType extends ObjectType {
|
|
2642
|
+
elementType: Type;
|
|
2643
|
+
finalArrayType?: Type;
|
|
2644
|
+
}
|
|
2645
|
+
export interface InterfaceTypeWithDeclaredMembers extends InterfaceType {
|
|
2646
|
+
declaredProperties: Symbol[];
|
|
2647
|
+
declaredCallSignatures: Signature[];
|
|
2648
|
+
declaredConstructSignatures: Signature[];
|
|
2649
|
+
declaredIndexInfos: IndexInfo[];
|
|
2650
|
+
}
|
|
2651
|
+
export interface IntersectionType extends UnionOrIntersectionType {
|
|
2652
|
+
}
|
|
2653
|
+
export interface ParseConfigHost extends ModuleResolutionHost {
|
|
2654
|
+
useCaseSensitiveFileNames: boolean;
|
|
2655
|
+
readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): readonly string[];
|
|
2656
|
+
/**
|
|
2657
|
+
* Gets a value indicating whether the specified path exists and is a file.
|
|
2658
|
+
* @param path The path to test.
|
|
2659
|
+
*/
|
|
2660
|
+
fileExists(path: string): boolean;
|
|
2661
|
+
readFile(path: string): string | undefined;
|
|
2662
|
+
trace?(s: string): void;
|
|
2663
|
+
}
|
|
2664
|
+
export interface FileExtensionInfo {
|
|
2665
|
+
extension: string;
|
|
2666
|
+
isMixedContent: boolean;
|
|
2667
|
+
scriptKind?: ScriptKind;
|
|
2668
|
+
}
|
|
2669
|
+
export type LpcLoadImportResult = {
|
|
2670
|
+
filename: string;
|
|
2671
|
+
source?: string;
|
|
2672
|
+
error?: string;
|
|
2673
|
+
};
|
|
2674
|
+
export interface LpcFileHandler extends IFileHandler {
|
|
2675
|
+
loadIncludeFile(sourceFilename: string, filename: string, localFirst: boolean, additionalSearchDirs?: string[]): LpcLoadImportResult;
|
|
2676
|
+
loadInclude(sourceFilename: string, filename: string): LoadImportResult;
|
|
2677
|
+
}
|
|
2678
|
+
export interface TransformationResult<T extends Node> {
|
|
2679
|
+
/** Gets the transformed source files. */
|
|
2680
|
+
transformed: T[];
|
|
2681
|
+
/** Gets diagnostics for the transformation. */
|
|
2682
|
+
diagnostics?: DiagnosticWithLocation[];
|
|
2683
|
+
/**
|
|
2684
|
+
* Gets a substitute for a node, if one is available; otherwise, returns the original node.
|
|
2685
|
+
*
|
|
2686
|
+
* @param hint A hint as to the intended usage of the node.
|
|
2687
|
+
* @param node The node to substitute.
|
|
2688
|
+
*/
|
|
2689
|
+
substituteNode(hint: EmitHint, node: Node): Node;
|
|
2690
|
+
/**
|
|
2691
|
+
* Emits a node with possible notification.
|
|
2692
|
+
*
|
|
2693
|
+
* @param hint A hint as to the intended usage of the node.
|
|
2694
|
+
* @param node The node to emit.
|
|
2695
|
+
* @param emitCallback A callback used to emit the node.
|
|
2696
|
+
*/
|
|
2697
|
+
emitNodeWithNotification(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void;
|
|
2698
|
+
/**
|
|
2699
|
+
* Indicates if a given node needs an emit notification
|
|
2700
|
+
*
|
|
2701
|
+
* @param node The node to emit.
|
|
2702
|
+
*/
|
|
2703
|
+
isEmitNotificationEnabled?(node: Node): boolean;
|
|
2704
|
+
/**
|
|
2705
|
+
* Clean up EmitNode entries on any parse-tree nodes.
|
|
2706
|
+
*/
|
|
2707
|
+
dispose(): void;
|
|
2708
|
+
}
|
|
2709
|
+
/**
|
|
2710
|
+
* A function that is used to initialize and return a `Transformer` callback, which in turn
|
|
2711
|
+
* will be used to transform one or more nodes.
|
|
2712
|
+
*/
|
|
2713
|
+
export type TransformerFactory<T extends Node> = (context: TransformationContext) => Transformer<T>;
|
|
2714
|
+
/**
|
|
2715
|
+
* A function that transforms a node.
|
|
2716
|
+
*/
|
|
2717
|
+
export type Transformer<T extends Node> = (node: T) => T;
|
|
2718
|
+
export interface PropertyAccessChain extends PropertyAccessExpression {
|
|
2719
|
+
_optionalChainBrand: any;
|
|
2720
|
+
readonly name: MemberName;
|
|
2721
|
+
}
|
|
2722
|
+
export type OptionalChain = PropertyAccessChain | ElementAccessChain | CallChain;
|
|
2723
|
+
export interface ExportDeclaration extends DeclarationStatement, JSDocContainer {
|
|
2724
|
+
readonly kind: SyntaxKind.ExportDeclaration;
|
|
2725
|
+
readonly parent: SourceFile;
|
|
2726
|
+
readonly modifiers?: NodeArray<Modifier>;
|
|
2727
|
+
readonly isTypeOnly: boolean;
|
|
2728
|
+
/** If this is not a StringLiteral it will be a grammar error. */
|
|
2729
|
+
readonly moduleSpecifier?: Expression;
|
|
2730
|
+
readonly attributes?: ImportAttributes;
|
|
2731
|
+
}
|
|
2732
|
+
export interface CommentDirective {
|
|
2733
|
+
range: TextRange;
|
|
2734
|
+
type: CommentDirectiveType;
|
|
2735
|
+
}
|
|
2736
|
+
export interface LabeledStatement extends Statement, FlowContainer {
|
|
2737
|
+
readonly kind: SyntaxKind.LabeledStatement;
|
|
2738
|
+
readonly label: Identifier;
|
|
2739
|
+
readonly statement: Statement;
|
|
2740
|
+
}
|
|
2741
|
+
export interface PropertySignature extends TypeElement, JSDocContainer {
|
|
2742
|
+
readonly kind: SyntaxKind.PropertySignature;
|
|
2743
|
+
readonly parent: TypeLiteralNode;
|
|
2744
|
+
readonly modifiers?: NodeArray<Modifier>;
|
|
2745
|
+
readonly name: PropertyName;
|
|
2746
|
+
readonly type?: TypeNode;
|
|
2747
|
+
}
|
|
2748
|
+
/**
|
|
2749
|
+
* A function that walks a node using the given visitor, lifting node arrays into single nodes,
|
|
2750
|
+
* returning an node which satisfies the test.
|
|
2751
|
+
*
|
|
2752
|
+
* - If the input node is undefined, then the output is undefined.
|
|
2753
|
+
* - If the visitor returns undefined, then the output is undefined.
|
|
2754
|
+
* - If the output node is not undefined, then it will satisfy the test function.
|
|
2755
|
+
* - In order to obtain a return type that is more specific than `Node`, a test
|
|
2756
|
+
* function _must_ be provided, and that function must be a type predicate.
|
|
2757
|
+
*
|
|
2758
|
+
* For the canonical implementation of this type, @see {visitNode}.
|
|
2759
|
+
*/
|
|
2760
|
+
export interface NodeVisitor {
|
|
2761
|
+
<TIn extends Node | undefined, TVisited extends Node | undefined, TOut extends Node>(node: TIn, visitor: Visitor<NonNullable<TIn>, TVisited>, test: (node: Node) => node is TOut, lift?: (node: readonly Node[]) => Node): TOut | (TIn & undefined) | (TVisited & undefined);
|
|
2762
|
+
<TIn extends Node | undefined, TVisited extends Node | undefined>(node: TIn, visitor: Visitor<NonNullable<TIn>, TVisited>, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => Node): Node | (TIn & undefined) | (TVisited & undefined);
|
|
2763
|
+
}
|
|
2764
|
+
export interface UserPreferences {
|
|
2765
|
+
readonly disableSuggestions?: boolean;
|
|
2766
|
+
readonly quotePreference?: "auto" | "double" | "single";
|
|
2767
|
+
/**
|
|
2768
|
+
* If enabled, TypeScript will search through all external modules' exports and add them to the completions list.
|
|
2769
|
+
* This affects lone identifier completions but not completions on the right hand side of `obj.`.
|
|
2770
|
+
*/
|
|
2771
|
+
readonly includeCompletionsForModuleExports?: boolean;
|
|
2772
|
+
/**
|
|
2773
|
+
* Enables auto-import-style completions on partially-typed import statements. E.g., allows
|
|
2774
|
+
* `import write|` to be completed to `import { writeFile } from "fs"`.
|
|
2775
|
+
*/
|
|
2776
|
+
readonly includeCompletionsForImportStatements?: boolean;
|
|
2777
|
+
/**
|
|
2778
|
+
* Allows completions to be formatted with snippet text, indicated by `CompletionItem["isSnippet"]`.
|
|
2779
|
+
*/
|
|
2780
|
+
readonly includeCompletionsWithSnippetText?: boolean;
|
|
2781
|
+
/**
|
|
2782
|
+
* Unless this option is `false`, or `includeCompletionsWithInsertText` is not enabled,
|
|
2783
|
+
* member completion lists triggered with `.` will include entries on potentially-null and potentially-undefined
|
|
2784
|
+
* values, with insertion text to replace preceding `.` tokens with `?.`.
|
|
2785
|
+
*/
|
|
2786
|
+
readonly includeAutomaticOptionalChainCompletions?: boolean;
|
|
2787
|
+
/**
|
|
2788
|
+
* If enabled, the completion list will include completions with invalid identifier names.
|
|
2789
|
+
* For those entries, The `insertText` and `replacementSpan` properties will be set to change from `.x` property access to `["x"]`.
|
|
2790
|
+
*/
|
|
2791
|
+
readonly includeCompletionsWithInsertText?: boolean;
|
|
2792
|
+
/**
|
|
2793
|
+
* If enabled, completions for class members (e.g. methods and properties) will include
|
|
2794
|
+
* a whole declaration for the member.
|
|
2795
|
+
* E.g., `class A { f| }` could be completed to `class A { foo(): number {} }`, instead of
|
|
2796
|
+
* `class A { foo }`.
|
|
2797
|
+
*/
|
|
2798
|
+
readonly includeCompletionsWithClassMemberSnippets?: boolean;
|
|
2799
|
+
/**
|
|
2800
|
+
* If enabled, object literal methods will have a method declaration completion entry in addition
|
|
2801
|
+
* to the regular completion entry containing just the method name.
|
|
2802
|
+
* E.g., `const objectLiteral: T = { f| }` could be completed to `const objectLiteral: T = { foo(): void {} }`,
|
|
2803
|
+
* in addition to `const objectLiteral: T = { foo }`.
|
|
2804
|
+
*/
|
|
2805
|
+
readonly includeCompletionsWithObjectLiteralMethodSnippets?: boolean;
|
|
2806
|
+
/**
|
|
2807
|
+
* Indicates whether {@link CompletionEntry.labelDetails completion entry label details} are supported.
|
|
2808
|
+
* If not, contents of `labelDetails` may be included in the {@link CompletionEntry.name} property.
|
|
2809
|
+
*/
|
|
2810
|
+
readonly useLabelDetailsInCompletionEntries?: boolean;
|
|
2811
|
+
readonly allowIncompleteCompletions?: boolean;
|
|
2812
|
+
readonly importModuleSpecifierPreference?: "shortest" | "project-relative" | "relative" | "non-relative";
|
|
2813
|
+
/** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */
|
|
2814
|
+
readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js";
|
|
2815
|
+
readonly allowTextChangesInNewFiles?: boolean;
|
|
2816
|
+
readonly providePrefixAndSuffixTextForRename?: boolean;
|
|
2817
|
+
readonly includePackageJsonAutoImports?: "auto" | "on" | "off";
|
|
2818
|
+
readonly provideRefactorNotApplicableReason?: boolean;
|
|
2819
|
+
readonly jsxAttributeCompletionStyle?: "auto" | "braces" | "none";
|
|
2820
|
+
readonly includeInlayParameterNameHints?: "none" | "literals" | "all";
|
|
2821
|
+
readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean;
|
|
2822
|
+
readonly includeInlayFunctionParameterTypeHints?: boolean;
|
|
2823
|
+
readonly includeInlayVariableTypeHints?: boolean;
|
|
2824
|
+
readonly includeInlayVariableTypeHintsWhenTypeMatchesName?: boolean;
|
|
2825
|
+
readonly includeInlayPropertyDeclarationTypeHints?: boolean;
|
|
2826
|
+
readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
|
|
2827
|
+
readonly includeInlayEnumMemberValueHints?: boolean;
|
|
2828
|
+
readonly interactiveInlayHints?: boolean;
|
|
2829
|
+
readonly allowRenameOfImportPath?: boolean;
|
|
2830
|
+
readonly autoImportFileExcludePatterns?: string[];
|
|
2831
|
+
readonly preferTypeOnlyAutoImports?: boolean;
|
|
2832
|
+
/**
|
|
2833
|
+
* Indicates whether imports should be organized in a case-insensitive manner.
|
|
2834
|
+
*/
|
|
2835
|
+
readonly organizeImportsIgnoreCase?: "auto" | boolean;
|
|
2836
|
+
/**
|
|
2837
|
+
* Indicates whether imports should be organized via an "ordinal" (binary) comparison using the numeric value
|
|
2838
|
+
* of their code points, or via "unicode" collation (via the
|
|
2839
|
+
* [Unicode Collation Algorithm](https://unicode.org/reports/tr10/#Scope)) using rules associated with the locale
|
|
2840
|
+
* specified in {@link organizeImportsCollationLocale}.
|
|
2841
|
+
*
|
|
2842
|
+
* Default: `"ordinal"`.
|
|
2843
|
+
*/
|
|
2844
|
+
readonly organizeImportsCollation?: "ordinal" | "unicode";
|
|
2845
|
+
/**
|
|
2846
|
+
* Indicates the locale to use for "unicode" collation. If not specified, the locale `"en"` is used as an invariant
|
|
2847
|
+
* for the sake of consistent sorting. Use `"auto"` to use the detected UI locale.
|
|
2848
|
+
*
|
|
2849
|
+
* This preference is ignored if {@link organizeImportsCollation} is not `"unicode"`.
|
|
2850
|
+
*
|
|
2851
|
+
* Default: `"en"`
|
|
2852
|
+
*/
|
|
2853
|
+
readonly organizeImportsLocale?: string;
|
|
2854
|
+
/**
|
|
2855
|
+
* Indicates whether numeric collation should be used for digit sequences in strings. When `true`, will collate
|
|
2856
|
+
* strings such that `a1z < a2z < a100z`. When `false`, will collate strings such that `a1z < a100z < a2z`.
|
|
2857
|
+
*
|
|
2858
|
+
* This preference is ignored if {@link organizeImportsCollation} is not `"unicode"`.
|
|
2859
|
+
*
|
|
2860
|
+
* Default: `false`
|
|
2861
|
+
*/
|
|
2862
|
+
readonly organizeImportsNumericCollation?: boolean;
|
|
2863
|
+
/**
|
|
2864
|
+
* Indicates whether accents and other diacritic marks are considered unequal for the purpose of collation. When
|
|
2865
|
+
* `true`, characters with accents and other diacritics will be collated in the order defined by the locale specified
|
|
2866
|
+
* in {@link organizeImportsCollationLocale}.
|
|
2867
|
+
*
|
|
2868
|
+
* This preference is ignored if {@link organizeImportsCollation} is not `"unicode"`.
|
|
2869
|
+
*
|
|
2870
|
+
* Default: `true`
|
|
2871
|
+
*/
|
|
2872
|
+
readonly organizeImportsAccentCollation?: boolean;
|
|
2873
|
+
/**
|
|
2874
|
+
* Indicates whether upper case or lower case should sort first. When `false`, the default order for the locale
|
|
2875
|
+
* specified in {@link organizeImportsCollationLocale} is used.
|
|
2876
|
+
*
|
|
2877
|
+
* This preference is ignored if {@link organizeImportsCollation} is not `"unicode"`. This preference is also
|
|
2878
|
+
* ignored if we are using case-insensitive sorting, which occurs when {@link organizeImportsIgnoreCase} is `true`,
|
|
2879
|
+
* or if {@link organizeImportsIgnoreCase} is `"auto"` and the auto-detected case sensitivity is determined to be
|
|
2880
|
+
* case-insensitive.
|
|
2881
|
+
*
|
|
2882
|
+
* Default: `false`
|
|
2883
|
+
*/
|
|
2884
|
+
readonly organizeImportsCaseFirst?: "upper" | "lower" | false;
|
|
2885
|
+
/**
|
|
2886
|
+
* Indicates where named type-only imports should sort. "inline" sorts named imports without regard to if the import is
|
|
2887
|
+
* type-only.
|
|
2888
|
+
*
|
|
2889
|
+
* Default: `last`
|
|
2890
|
+
*/
|
|
2891
|
+
readonly organizeImportsTypeOrder?: OrganizeImportsTypeOrder;
|
|
2892
|
+
/**
|
|
2893
|
+
* Indicates whether to exclude standard library and node_modules file symbols from navTo results.
|
|
2894
|
+
*/
|
|
2895
|
+
readonly excludeLibrarySymbolsInNavTo?: boolean;
|
|
2896
|
+
readonly lazyConfiguredProjectsFromExternalProject?: boolean;
|
|
2897
|
+
readonly displayPartsForJSDoc?: boolean;
|
|
2898
|
+
readonly generateReturnInDocTemplate?: boolean;
|
|
2899
|
+
readonly disableLineTextInReferences?: boolean;
|
|
2900
|
+
}
|
|
2901
|
+
export type OrganizeImportsTypeOrder = "last" | "inline" | "first";
|
|
2902
|
+
export interface JSDocLink extends Node {
|
|
2903
|
+
readonly kind: SyntaxKind.JSDocLink;
|
|
2904
|
+
readonly name?: EntityName | JSDocMemberName;
|
|
2905
|
+
text: string;
|
|
2906
|
+
}
|
|
2907
|
+
export interface JSDocLinkCode extends Node {
|
|
2908
|
+
readonly kind: SyntaxKind.JSDocLinkCode;
|
|
2909
|
+
readonly name?: EntityName | JSDocMemberName;
|
|
2910
|
+
text: string;
|
|
2911
|
+
}
|
|
2912
|
+
export interface JSDocLinkPlain extends Node {
|
|
2913
|
+
readonly kind: SyntaxKind.JSDocLinkPlain;
|
|
2914
|
+
readonly name?: EntityName | JSDocMemberName;
|
|
2915
|
+
text: string;
|
|
2916
|
+
}
|
|
2917
|
+
export interface JSDocOverloadTag extends JSDocTag {
|
|
2918
|
+
readonly kind: SyntaxKind.JSDocOverloadTag;
|
|
2919
|
+
readonly parent: JSDoc;
|
|
2920
|
+
readonly typeExpression: JSDocSignature;
|
|
2921
|
+
}
|
|
2922
|
+
/**
|
|
2923
|
+
* Note that `@extends` is a synonym of `@augments`.
|
|
2924
|
+
* Both tags are represented by this interface.
|
|
2925
|
+
*/
|
|
2926
|
+
export interface JSDocAugmentsTag extends JSDocTag {
|
|
2927
|
+
readonly kind: SyntaxKind.JSDocAugmentsTag;
|
|
2928
|
+
readonly class: Expression & {
|
|
2929
|
+
readonly expression: Identifier | PropertyAccessEntityNameExpression;
|
|
2930
|
+
};
|
|
2931
|
+
}
|
|
2932
|
+
export interface JSDocImplementsTag extends JSDocTag {
|
|
2933
|
+
readonly kind: SyntaxKind.JSDocImplementsTag;
|
|
2934
|
+
readonly class: Expression & {
|
|
2935
|
+
readonly expression: Identifier | PropertyAccessEntityNameExpression;
|
|
2936
|
+
};
|
|
2937
|
+
}
|
|
2938
|
+
export interface JSDocCallbackTag extends JSDocTag, NamedDeclaration, LocalsContainer {
|
|
2939
|
+
readonly kind: SyntaxKind.JSDocCallbackTag;
|
|
2940
|
+
readonly parent: JSDoc;
|
|
2941
|
+
readonly fullName?: Identifier;
|
|
2942
|
+
readonly name?: Identifier;
|
|
2943
|
+
readonly typeExpression: JSDocSignature;
|
|
2944
|
+
}
|
|
2945
|
+
export interface JSDocPropertyTag extends JSDocPropertyLikeTag {
|
|
2946
|
+
readonly kind: SyntaxKind.JSDocPropertyTag;
|
|
2947
|
+
}
|
|
2948
|
+
export interface JSDocVariableTag extends JSDocPropertyLikeTag {
|
|
2949
|
+
readonly kind: SyntaxKind.JSDocVariableTag;
|
|
2950
|
+
}
|
|
2951
|
+
export interface JSDocSatisfiesTag extends JSDocTag {
|
|
2952
|
+
readonly kind: SyntaxKind.JSDocSatisfiesTag;
|
|
2953
|
+
readonly typeExpression: JSDocTypeExpression;
|
|
2954
|
+
}
|
|
2955
|
+
export interface JSDocNameReference extends Node {
|
|
2956
|
+
readonly kind: SyntaxKind.JSDocNameReference;
|
|
2957
|
+
readonly name: EntityName | JSDocMemberName;
|
|
2958
|
+
}
|
|
2959
|
+
export interface JSDocSeeTag extends JSDocTag {
|
|
2960
|
+
readonly kind: SyntaxKind.JSDocSeeTag;
|
|
2961
|
+
readonly name?: JSDocNameReference;
|
|
2962
|
+
}
|
|
2963
|
+
export interface JSDocAuthorTag extends JSDocTag {
|
|
2964
|
+
readonly kind: SyntaxKind.JSDocAuthorTag;
|
|
2965
|
+
}
|
|
2966
|
+
export interface JSDocThrowsTag extends JSDocTag {
|
|
2967
|
+
readonly kind: SyntaxKind.JSDocThrowsTag;
|
|
2968
|
+
readonly typeExpression?: JSDocTypeExpression;
|
|
2969
|
+
}
|
|
2970
|
+
export interface JSDocTypeTag extends JSDocTag {
|
|
2971
|
+
readonly kind: SyntaxKind.JSDocTypeTag;
|
|
2972
|
+
readonly typeExpression: JSDocTypeExpression;
|
|
2973
|
+
}
|
|
2974
|
+
export interface MethodDeclaration extends FunctionLikeDeclarationBase, ClassElement, ObjectLiteralElement, JSDocContainer, LocalsContainer, FlowContainer {
|
|
2975
|
+
readonly kind: SyntaxKind.MethodDeclaration;
|
|
2976
|
+
readonly parent: ObjectLiteralExpression;
|
|
2977
|
+
readonly modifiers?: NodeArray<Modifier> | undefined;
|
|
2978
|
+
readonly name: PropertyName;
|
|
2979
|
+
readonly body?: FunctionBody | undefined;
|
|
2980
|
+
}
|
|
2981
|
+
export interface MethodSignature extends SignatureDeclarationBase, TypeElement, LocalsContainer {
|
|
2982
|
+
readonly kind: SyntaxKind.MethodSignature;
|
|
2983
|
+
readonly parent: TypeLiteralNode | InterfaceDeclaration;
|
|
2984
|
+
readonly modifiers?: NodeArray<Modifier>;
|
|
2985
|
+
readonly name: PropertyName;
|
|
2986
|
+
}
|
|
2987
|
+
export interface ArrowFunction extends Expression, FunctionLikeDeclarationBase, JSDocContainer, LocalsContainer, FlowContainer {
|
|
2988
|
+
readonly kind: SyntaxKind.ArrowFunction;
|
|
2989
|
+
readonly modifiers?: NodeArray<Modifier>;
|
|
2990
|
+
readonly equalsGreaterThanToken: EqualsGreaterThanToken;
|
|
2991
|
+
readonly body: ConciseBody;
|
|
2992
|
+
readonly name: never;
|
|
2993
|
+
}
|
|
2994
|
+
export interface ClassExpression extends ClassLikeDeclarationBase, PrimaryExpression {
|
|
2995
|
+
readonly kind: SyntaxKind.ClassExpression;
|
|
2996
|
+
readonly modifiers?: NodeArray<Modifier>;
|
|
2997
|
+
}
|
|
2998
|
+
export interface PreprocessorDirective extends Statement {
|
|
2999
|
+
kind: DirectiveSyntaxKind;
|
|
3000
|
+
}
|
|
3001
|
+
export interface PragmaDirective extends PreprocessorDirective {
|
|
3002
|
+
kind: SyntaxKind.PragmaDirective;
|
|
3003
|
+
expression: NodeArray<Identifier>;
|
|
3004
|
+
}
|
|
3005
|
+
export interface IncludeDirective extends PreprocessorDirective, SourceFileBase {
|
|
3006
|
+
kind: SyntaxKind.IncludeDirective;
|
|
3007
|
+
content: NodeArray<StringLiteral>;
|
|
3008
|
+
readonly fileName: string;
|
|
3009
|
+
readonly localFirst: boolean;
|
|
3010
|
+
readonly statements: NodeArray<Statement>;
|
|
3011
|
+
readonly endOfFileToken: Token<SyntaxKind.EndOfFileToken>;
|
|
3012
|
+
readonly text: string;
|
|
3013
|
+
inactiveCodeRanges?: readonly TextRange[];
|
|
3014
|
+
}
|
|
3015
|
+
export interface DefineDirective extends PreprocessorDirective, Declaration {
|
|
3016
|
+
kind: SyntaxKind.DefineDirective;
|
|
3017
|
+
name: Identifier;
|
|
3018
|
+
arguments?: NodeArray<ParameterDeclaration>;
|
|
3019
|
+
range: TextRange;
|
|
3020
|
+
}
|
|
3021
|
+
export interface MacroParameter extends ReadonlyTextRange, MacroIncludedFileRange {
|
|
3022
|
+
disabled?: boolean;
|
|
3023
|
+
/** get the sourcetext that contains the arg value range */
|
|
3024
|
+
text: string;
|
|
3025
|
+
}
|
|
3026
|
+
export interface PositionState {
|
|
3027
|
+
pos: number;
|
|
3028
|
+
tokenStart: number;
|
|
3029
|
+
fileName: string;
|
|
3030
|
+
macro: Macro;
|
|
3031
|
+
include: IncludeDirective;
|
|
3032
|
+
stateId: number;
|
|
3033
|
+
}
|
|
3034
|
+
export interface Macro extends MacroIncludedFileRange {
|
|
3035
|
+
directive: DefineDirective;
|
|
3036
|
+
name: string;
|
|
3037
|
+
includeDirPos?: number;
|
|
3038
|
+
includeDirEnd?: number;
|
|
3039
|
+
includeFilename?: string;
|
|
3040
|
+
disabled?: boolean;
|
|
3041
|
+
/** get the sourcetext that contains the macro definition range */
|
|
3042
|
+
getText(): string;
|
|
3043
|
+
range: TextRange;
|
|
3044
|
+
arguments?: NodeArray<ParameterDeclaration>;
|
|
3045
|
+
argsIn?: MapLike<MacroParameter>;
|
|
3046
|
+
pos?: PositionState;
|
|
3047
|
+
end?: number;
|
|
3048
|
+
}
|
|
3049
|
+
export interface UndefDirective extends PreprocessorDirective {
|
|
3050
|
+
kind: SyntaxKind.UndefDirective;
|
|
3051
|
+
name: Identifier;
|
|
3052
|
+
}
|
|
3053
|
+
export interface ClassLikeDeclarationBase extends NamedDeclaration, JSDocContainer {
|
|
3054
|
+
readonly kind: SyntaxKind.ClassDeclaration | SyntaxKind.ClassExpression;
|
|
3055
|
+
readonly name?: Identifier;
|
|
3056
|
+
readonly typeParameters?: NodeArray<TypeParameterDeclaration>;
|
|
3057
|
+
readonly members: NodeArray<ClassElement>;
|
|
3058
|
+
}
|
|
3059
|
+
export interface ClassDeclaration extends ClassLikeDeclarationBase, DeclarationStatement {
|
|
3060
|
+
readonly kind: SyntaxKind.ClassDeclaration;
|
|
3061
|
+
readonly modifiers?: NodeArray<Modifier>;
|
|
3062
|
+
/** May be undefined in `export default class { ... }`. */
|
|
3063
|
+
readonly name?: Identifier;
|
|
3064
|
+
}
|
|
3065
|
+
export type ClassLikeDeclaration = ClassDeclaration | ClassExpression;
|
|
3066
|
+
export interface MissingDeclaration extends DeclarationStatement, PrimaryExpression {
|
|
3067
|
+
readonly kind: SyntaxKind.MissingDeclaration;
|
|
3068
|
+
readonly name?: Identifier;
|
|
3069
|
+
}
|
|
3070
|
+
export interface TypeAliasDeclaration extends DeclarationStatement, JSDocContainer, LocalsContainer {
|
|
3071
|
+
readonly kind: SyntaxKind.TypeAliasDeclaration;
|
|
3072
|
+
readonly modifiers?: NodeArray<ModifierLike>;
|
|
3073
|
+
readonly name: Identifier;
|
|
3074
|
+
readonly typeParameters?: NodeArray<TypeParameterDeclaration>;
|
|
3075
|
+
readonly type: TypeNode;
|
|
3076
|
+
}
|
|
3077
|
+
export interface SyntheticExpression extends Expression {
|
|
3078
|
+
readonly kind: SyntaxKind.SyntheticExpression;
|
|
3079
|
+
readonly isSpread: boolean;
|
|
3080
|
+
readonly type: Type;
|
|
3081
|
+
readonly tupleNameSource?: ParameterDeclaration | NamedTupleMember;
|
|
3082
|
+
}
|
|
3083
|
+
export interface IndexedAccessType extends InstantiableType {
|
|
3084
|
+
objectType: Type;
|
|
3085
|
+
indexType: Type;
|
|
3086
|
+
constraint?: Type;
|
|
3087
|
+
simplifiedForReading?: Type;
|
|
3088
|
+
simplifiedForWriting?: Type;
|
|
3089
|
+
}
|
|
3090
|
+
export type UnionOrIntersectionTypeNode = UnionTypeNode;
|
|
3091
|
+
export declare const enum TypePredicateKind {
|
|
3092
|
+
This = 0,
|
|
3093
|
+
Identifier = 1,
|
|
3094
|
+
AssertsThis = 2,
|
|
3095
|
+
AssertsIdentifier = 3
|
|
3096
|
+
}
|
|
3097
|
+
export interface TypePredicateBase {
|
|
3098
|
+
kind: TypePredicateKind;
|
|
3099
|
+
type: Type | undefined;
|
|
3100
|
+
}
|
|
3101
|
+
export interface IdentifierTypePredicate extends TypePredicateBase {
|
|
3102
|
+
kind: TypePredicateKind.Identifier;
|
|
3103
|
+
parameterName: string;
|
|
3104
|
+
parameterIndex: number;
|
|
3105
|
+
type: Type;
|
|
3106
|
+
}
|
|
3107
|
+
export interface AssertsThisTypePredicate extends TypePredicateBase {
|
|
3108
|
+
kind: TypePredicateKind.AssertsThis;
|
|
3109
|
+
parameterName: undefined;
|
|
3110
|
+
parameterIndex: undefined;
|
|
3111
|
+
type: Type | undefined;
|
|
3112
|
+
}
|
|
3113
|
+
export interface AssertsIdentifierTypePredicate extends TypePredicateBase {
|
|
3114
|
+
kind: TypePredicateKind.AssertsIdentifier;
|
|
3115
|
+
parameterName: string;
|
|
3116
|
+
parameterIndex: number;
|
|
3117
|
+
type: Type | undefined;
|
|
3118
|
+
}
|
|
3119
|
+
export type TypePredicate = IdentifierTypePredicate | AssertsThisTypePredicate | AssertsIdentifierTypePredicate;
|
|
3120
|
+
export interface ExpressionWithTypeArguments extends MemberExpression, NodeWithTypeArguments {
|
|
3121
|
+
readonly kind: SyntaxKind.ExpressionWithTypeArguments;
|
|
3122
|
+
readonly expression: LeftHandSideExpression;
|
|
3123
|
+
}
|
|
3124
|
+
export interface IFileHandler {
|
|
3125
|
+
loadInclude(sourceFilename: string, filename: string): LoadImportResult;
|
|
3126
|
+
}
|
|
3127
|
+
export interface LoadImportResult {
|
|
3128
|
+
uri: string;
|
|
3129
|
+
source: string;
|
|
3130
|
+
error?: string;
|
|
3131
|
+
}
|
|
3132
|
+
export interface JSDocClassTag extends JSDocTag {
|
|
3133
|
+
readonly kind: SyntaxKind.JSDocClassTag;
|
|
3134
|
+
}
|
|
3135
|
+
export interface JSDocPublicTag extends JSDocTag {
|
|
3136
|
+
readonly kind: SyntaxKind.JSDocPublicTag;
|
|
3137
|
+
}
|
|
3138
|
+
export interface JSDocPrivateTag extends JSDocTag {
|
|
3139
|
+
readonly kind: SyntaxKind.JSDocPrivateTag;
|
|
3140
|
+
}
|
|
3141
|
+
export interface JSDocProtectedTag extends JSDocTag {
|
|
3142
|
+
readonly kind: SyntaxKind.JSDocProtectedTag;
|
|
3143
|
+
}
|
|
3144
|
+
export interface JSDocOverrideTag extends JSDocTag {
|
|
3145
|
+
readonly kind: SyntaxKind.JSDocOverrideTag;
|
|
3146
|
+
}
|
|
3147
|
+
export interface JSDocUnknownTag extends JSDocTag {
|
|
3148
|
+
readonly kind: SyntaxKind.JSDocTag;
|
|
3149
|
+
}
|
|
3150
|
+
export type JSDocNamespaceBody = Identifier;
|
|
3151
|
+
export interface SyntacticTypeNodeBuilderContext {
|
|
3152
|
+
tracker: Required<Pick<SymbolTracker, "reportInferenceFallback">>;
|
|
3153
|
+
enclosingDeclaration: Node | undefined;
|
|
3154
|
+
}
|
|
3155
|
+
export interface LpcConfigSourceFile extends JsonSourceFile {
|
|
3156
|
+
extendedSourceFiles?: string[];
|
|
3157
|
+
}
|
|
3158
|
+
export interface ParsedLpcConfig {
|
|
3159
|
+
raw: any;
|
|
3160
|
+
options?: CompilerOptions;
|
|
3161
|
+
watchOptions?: WatchOptions;
|
|
3162
|
+
typeAcquisition?: TypeAcquisition;
|
|
3163
|
+
/**
|
|
3164
|
+
* Note that the case of the config path has not yet been normalized, as no files have been imported into the project yet
|
|
3165
|
+
*/
|
|
3166
|
+
extendedConfigPath?: string | string[];
|
|
3167
|
+
}
|
|
3168
|
+
/**
|
|
3169
|
+
* Branded string for keeping track of when we've turned an ambiguous path
|
|
3170
|
+
* specified like "./blah" to an absolute path to an actual
|
|
3171
|
+
* tsconfig file, e.g. "/root/blah/tsconfig.json"
|
|
3172
|
+
*/
|
|
3173
|
+
export type ResolvedConfigFileName = string & {
|
|
3174
|
+
_isResolvedConfigFileName: never;
|
|
3175
|
+
};
|
|
3176
|
+
export interface ConditionalTypeNode extends TypeNode, LocalsContainer {
|
|
3177
|
+
readonly kind: SyntaxKind.ConditionalType;
|
|
3178
|
+
readonly checkType: TypeNode;
|
|
3179
|
+
readonly extendsType: TypeNode;
|
|
3180
|
+
readonly trueType: TypeNode;
|
|
3181
|
+
readonly falseType: TypeNode;
|
|
3182
|
+
}
|
|
3183
|
+
export interface ThisTypeNode extends TypeNode {
|
|
3184
|
+
readonly kind: SyntaxKind.ThisType;
|
|
3185
|
+
}
|
|
3186
|
+
export interface JSDocAllType extends JSDocType {
|
|
3187
|
+
readonly kind: SyntaxKind.JSDocAllType;
|
|
3188
|
+
}
|
|
3189
|
+
export interface JSDocUnknownType extends JSDocType {
|
|
3190
|
+
readonly kind: SyntaxKind.JSDocUnknownType;
|
|
3191
|
+
}
|
|
3192
|
+
export interface JSDocOptionalType extends JSDocType {
|
|
3193
|
+
readonly kind: SyntaxKind.JSDocOptionalType;
|
|
3194
|
+
readonly type: TypeNode;
|
|
3195
|
+
}
|
|
3196
|
+
export interface JSDocFunctionType extends JSDocType, SignatureDeclarationBase, LocalsContainer {
|
|
3197
|
+
readonly kind: SyntaxKind.JSDocFunctionType;
|
|
3198
|
+
}
|
|
3199
|
+
export interface TypePredicateNode extends TypeNode {
|
|
3200
|
+
readonly kind: SyntaxKind.TypePredicate;
|
|
3201
|
+
readonly parent: SignatureDeclaration | JSDocTypeExpression;
|
|
3202
|
+
readonly parameterName: Identifier | ThisTypeNode;
|
|
3203
|
+
readonly type?: TypeNode;
|
|
3204
|
+
}
|
|
3205
|
+
export interface NamedTupleMember extends TypeNode, Declaration, JSDocContainer {
|
|
3206
|
+
readonly kind: SyntaxKind.NamedTupleMember;
|
|
3207
|
+
readonly dotDotDotToken?: Token<SyntaxKind.DotDotDotToken>;
|
|
3208
|
+
readonly name: Identifier;
|
|
3209
|
+
readonly questionToken?: Token<SyntaxKind.QuestionToken>;
|
|
3210
|
+
readonly type: TypeNode;
|
|
3211
|
+
}
|
|
3212
|
+
export interface TupleType extends GenericType {
|
|
3213
|
+
elementFlags: readonly ElementFlags[];
|
|
3214
|
+
/** Number of required or variadic elements */
|
|
3215
|
+
minLength: number;
|
|
3216
|
+
/** Number of initial required or optional elements */
|
|
3217
|
+
fixedLength: number;
|
|
3218
|
+
/** True if tuple has any rest or variadic elements */
|
|
3219
|
+
hasRestElement: boolean;
|
|
3220
|
+
combinedFlags: ElementFlags;
|
|
3221
|
+
readonly: boolean;
|
|
3222
|
+
labeledElementDeclarations?: readonly (NamedTupleMember | ParameterDeclaration | undefined)[];
|
|
3223
|
+
}
|
|
3224
|
+
export interface TupleTypeReference extends TypeReference {
|
|
3225
|
+
target: TupleType;
|
|
3226
|
+
}
|
|
3227
|
+
export type ThisObjectPragmas = {
|
|
3228
|
+
arguments: {
|
|
3229
|
+
name: string;
|
|
3230
|
+
};
|
|
3231
|
+
range: CommentRange;
|
|
3232
|
+
};
|
|
3233
|
+
export type BlockLike = SourceFile | Block | CaseOrDefaultClause;
|
|
3234
|
+
export type DeclarationWithTypeParameters = DeclarationWithTypeParameterChildren | JSDocTypedefTag | JSDocCallbackTag | JSDocSignature;
|
|
3235
|
+
export interface ConditionalRoot {
|
|
3236
|
+
node: ConditionalTypeNode;
|
|
3237
|
+
checkType: Type;
|
|
3238
|
+
extendsType: Type;
|
|
3239
|
+
isDistributive: boolean;
|
|
3240
|
+
inferTypeParameters?: TypeParameter[];
|
|
3241
|
+
outerTypeParameters?: TypeParameter[];
|
|
3242
|
+
instantiations?: Map<string, Type>;
|
|
3243
|
+
aliasSymbol?: Symbol;
|
|
3244
|
+
aliasTypeArguments?: Type[];
|
|
3245
|
+
}
|
|
3246
|
+
export interface ConditionalType extends InstantiableType {
|
|
3247
|
+
root: ConditionalRoot;
|
|
3248
|
+
checkType: Type;
|
|
3249
|
+
extendsType: Type;
|
|
3250
|
+
resolvedTrueType?: Type;
|
|
3251
|
+
resolvedFalseType?: Type;
|
|
3252
|
+
}
|
|
3253
|
+
export interface TupleTypeNode extends TypeNode {
|
|
3254
|
+
readonly kind: SyntaxKind.TupleType;
|
|
3255
|
+
readonly elements: NodeArray<TypeNode | NamedTupleMember>;
|
|
3256
|
+
}
|
|
3257
|
+
export interface InterfaceDeclaration extends DeclarationStatement, JSDocContainer {
|
|
3258
|
+
readonly kind: SyntaxKind.InterfaceDeclaration;
|
|
3259
|
+
readonly modifiers?: NodeArray<ModifierLike>;
|
|
3260
|
+
readonly name: Identifier;
|
|
3261
|
+
readonly typeParameters?: NodeArray<TypeParameterDeclaration>;
|
|
3262
|
+
readonly heritageClauses?: NodeArray<HeritageClause>;
|
|
3263
|
+
readonly members: NodeArray<TypeElement>;
|
|
3264
|
+
}
|
|
3265
|
+
export interface JSDocNullableType extends JSDocType {
|
|
3266
|
+
readonly kind: SyntaxKind.JSDocNullableType;
|
|
3267
|
+
readonly type: TypeNode;
|
|
3268
|
+
readonly postfix: boolean;
|
|
3269
|
+
}
|
|
3270
|
+
export interface JSDocNonNullableType extends JSDocType {
|
|
3271
|
+
readonly kind: SyntaxKind.JSDocNonNullableType;
|
|
3272
|
+
readonly type: TypeNode;
|
|
3273
|
+
readonly postfix: boolean;
|
|
3274
|
+
}
|
|
3275
|
+
export type JSDocTypeReferencingNode = JSDocVariadicType | JSDocOptionalType | JSDocNullableType | JSDocNonNullableType;
|
|
3276
|
+
/** Return code used by getEmitOutput function to indicate status of the function */
|
|
3277
|
+
export declare enum ExitStatus {
|
|
3278
|
+
Success = 0,
|
|
3279
|
+
DiagnosticsPresent_OutputsSkipped = 1,
|
|
3280
|
+
DiagnosticsPresent_OutputsGenerated = 2,
|
|
3281
|
+
InvalidProject_OutputsSkipped = 3,
|
|
3282
|
+
ProjectReferenceCycle_OutputsSkipped = 4
|
|
3283
|
+
}
|
|
3284
|
+
//# sourceMappingURL=types.d.ts.map
|