tsc-ts 0.0.10 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/tsc-ts.js +70 -1
- package/dist/api/compiler/ast-utilities.d.ts +19 -1
- package/dist/api/compiler/ast-utilities.js +180 -95
- package/dist/api/compiler/ast.d.ts +20 -15
- package/dist/api/compiler/ast.js +1023 -995
- package/dist/api/compiler/astnav.js +15 -15
- package/dist/api/compiler/binder-utilities.js +186 -186
- package/dist/api/compiler/binder.js +290 -263
- package/dist/api/compiler/character-codes.js +2 -2
- package/dist/api/compiler/checker-calls.js +173 -123
- package/dist/api/compiler/checker-classes.d.ts +14 -3
- package/dist/api/compiler/checker-classes.js +134 -90
- package/dist/api/compiler/checker-contextual.js +64 -61
- package/dist/api/compiler/checker-declaration-order.js +79 -79
- package/dist/api/compiler/checker-declarations.d.ts +1 -0
- package/dist/api/compiler/checker-declarations.js +160 -136
- package/dist/api/compiler/checker-declared-types.js +67 -65
- package/dist/api/compiler/checker-decorators.js +77 -77
- package/dist/api/compiler/checker-deprecation.d.ts +8 -3
- package/dist/api/compiler/checker-deprecation.js +76 -55
- package/dist/api/compiler/checker-destructuring.js +47 -45
- package/dist/api/compiler/checker-elaboration.js +24 -24
- package/dist/api/compiler/checker-emit-helpers.js +4 -4
- package/dist/api/compiler/checker-emit-resolver.d.ts +4 -2
- package/dist/api/compiler/checker-emit-resolver.js +25 -13
- package/dist/api/compiler/checker-evaluator.js +9 -9
- package/dist/api/compiler/checker-expressions.js +244 -211
- package/dist/api/compiler/checker-functions.js +113 -107
- package/dist/api/compiler/checker-generated-code.d.ts +0 -11
- package/dist/api/compiler/checker-generated-code.js +28 -52
- package/dist/api/compiler/checker-grammar.d.ts +1 -0
- package/dist/api/compiler/checker-grammar.js +469 -438
- package/dist/api/compiler/checker-heritage.js +91 -93
- package/dist/api/compiler/checker-inference.d.ts +77 -5
- package/dist/api/compiler/checker-inference.js +487 -113
- package/dist/api/compiler/checker-iteration.d.ts +0 -10
- package/dist/api/compiler/checker-iteration.js +35 -52
- package/dist/api/compiler/checker-javascript.js +14 -14
- package/dist/api/compiler/checker-jsdoc.d.ts +8 -10
- package/dist/api/compiler/checker-jsdoc.js +67 -58
- package/dist/api/compiler/checker-jsx.js +105 -88
- package/dist/api/compiler/checker-members.d.ts +9 -2
- package/dist/api/compiler/checker-members.js +210 -74
- package/dist/api/compiler/checker-modules.d.ts +15 -6
- package/dist/api/compiler/checker-modules.js +469 -309
- package/dist/api/compiler/checker-narrowing.js +273 -189
- package/dist/api/compiler/checker-object-literals.js +25 -22
- package/dist/api/compiler/checker-operators.js +126 -118
- package/dist/api/compiler/checker-overloads.js +27 -27
- package/dist/api/compiler/checker-property-access.js +59 -55
- package/dist/api/compiler/checker-services.d.ts +1 -0
- package/dist/api/compiler/checker-services.js +222 -210
- package/dist/api/compiler/checker-signatures.js +65 -49
- package/dist/api/compiler/checker-source-file.d.ts +5 -0
- package/dist/api/compiler/checker-source-file.js +154 -130
- package/dist/api/compiler/checker-statements.js +33 -32
- package/dist/api/compiler/checker-super.js +50 -50
- package/dist/api/compiler/checker-symbol-types.js +109 -93
- package/dist/api/compiler/checker-symbols.d.ts +13 -1
- package/dist/api/compiler/checker-symbols.js +264 -149
- package/dist/api/compiler/checker-type-factory.d.ts +5 -0
- package/dist/api/compiler/checker-type-factory.js +137 -34
- package/dist/api/compiler/checker-type-nodes.d.ts +1 -0
- package/dist/api/compiler/checker-type-nodes.js +179 -141
- package/dist/api/compiler/checker-type-operators.d.ts +2 -0
- package/dist/api/compiler/checker-type-operators.js +110 -63
- package/dist/api/compiler/checker-types.d.ts +80 -3
- package/dist/api/compiler/checker-types.js +121 -2
- package/dist/api/compiler/checker-unused.js +114 -118
- package/dist/api/compiler/checker-utilities.js +11 -11
- package/dist/api/compiler/checker.d.ts +93 -31
- package/dist/api/compiler/checker.js +143 -35
- package/dist/api/compiler/command-line.d.ts +1 -3
- package/dist/api/compiler/command-line.js +47 -44
- package/dist/api/compiler/compile-program.d.ts +19 -4
- package/dist/api/compiler/compile-program.js +45 -26
- package/dist/api/compiler/diagnostic-messages.d.ts +1849 -1774
- package/dist/api/compiler/diagnostic-messages.js +128 -122
- package/dist/api/compiler/diagnostics.js +7 -7
- package/dist/api/compiler/emitter.d.ts +7 -1
- package/dist/api/compiler/emitter.js +53 -11
- package/dist/api/compiler/file-include.d.ts +2 -1
- package/dist/api/compiler/file-include.js +11 -7
- package/dist/api/compiler/file-loader.d.ts +10 -0
- package/dist/api/compiler/file-loader.js +138 -41
- package/dist/api/compiler/instantiation.d.ts +7 -0
- package/dist/api/compiler/instantiation.js +101 -49
- package/dist/api/compiler/jsdoc.js +23 -23
- package/dist/api/compiler/link-tables.d.ts +48 -18
- package/dist/api/compiler/link-tables.js +80 -37
- package/dist/api/compiler/locales/cs-CZ.d.ts +1 -1
- package/dist/api/compiler/locales/cs-CZ.js +1 -1
- package/dist/api/compiler/locales/de-DE.d.ts +1 -1
- package/dist/api/compiler/locales/de-DE.js +1 -1
- package/dist/api/compiler/locales/es-ES.d.ts +1 -1
- package/dist/api/compiler/locales/es-ES.js +1 -1
- package/dist/api/compiler/locales/fr-FR.d.ts +1 -1
- package/dist/api/compiler/locales/fr-FR.js +1 -1
- package/dist/api/compiler/locales/it-IT.d.ts +1 -1
- package/dist/api/compiler/locales/it-IT.js +1 -1
- package/dist/api/compiler/locales/ja-JP.d.ts +1 -1
- package/dist/api/compiler/locales/ja-JP.js +1 -1
- package/dist/api/compiler/locales/ko-KR.d.ts +1 -1
- package/dist/api/compiler/locales/ko-KR.js +1 -1
- package/dist/api/compiler/locales/pl-PL.d.ts +1 -1
- package/dist/api/compiler/locales/pl-PL.js +1 -1
- package/dist/api/compiler/locales/pt-BR.d.ts +1 -1
- package/dist/api/compiler/locales/pt-BR.js +1 -1
- package/dist/api/compiler/locales/ru-RU.d.ts +1 -1
- package/dist/api/compiler/locales/ru-RU.js +1 -1
- package/dist/api/compiler/locales/tr-TR.d.ts +1 -1
- package/dist/api/compiler/locales/tr-TR.js +1 -1
- package/dist/api/compiler/locales/zh-CN.d.ts +1 -1
- package/dist/api/compiler/locales/zh-CN.js +1 -1
- package/dist/api/compiler/locales/zh-TW.d.ts +1 -1
- package/dist/api/compiler/locales/zh-TW.js +1 -1
- package/dist/api/compiler/module-resolution-types.js +6 -6
- package/dist/api/compiler/module-resolution.d.ts +10 -1
- package/dist/api/compiler/module-resolution.js +115 -84
- package/dist/api/compiler/module-specifiers.d.ts +15 -0
- package/dist/api/compiler/module-specifiers.js +24 -18
- package/dist/api/compiler/name-resolver.js +74 -65
- package/dist/api/compiler/node-builder-names.d.ts +11 -3
- package/dist/api/compiler/node-builder-names.js +210 -90
- package/dist/api/compiler/node-builder-pseudo.js +29 -31
- package/dist/api/compiler/node-builder-reuse.js +23 -22
- package/dist/api/compiler/node-builder.d.ts +18 -1
- package/dist/api/compiler/node-builder.js +191 -102
- package/dist/api/compiler/option-declarations.d.ts +2 -6
- package/dist/api/compiler/option-declarations.js +315 -375
- package/dist/api/compiler/options.d.ts +15 -33
- package/dist/api/compiler/options.js +21 -54
- package/dist/api/compiler/output-paths.d.ts +4 -1
- package/dist/api/compiler/output-paths.js +6 -11
- package/dist/api/compiler/package-json.d.ts +3 -3
- package/dist/api/compiler/package-json.js +11 -10
- package/dist/api/compiler/parser.d.ts +40 -19
- package/dist/api/compiler/parser.js +308 -216
- package/dist/api/compiler/path.d.ts +9 -0
- package/dist/api/compiler/path.js +20 -3
- package/dist/api/compiler/printer/emit-context.d.ts +3 -1
- package/dist/api/compiler/printer/emit-context.js +16 -1
- package/dist/api/compiler/printer/factory-base.d.ts +2 -2
- package/dist/api/compiler/printer/factory-base.js +7 -3
- package/dist/api/compiler/printer/factory.js +3 -1
- package/dist/api/compiler/printer/helpers.js +10 -1
- package/dist/api/compiler/printer/name-generator.d.ts +1 -1
- package/dist/api/compiler/printer/name-generator.js +35 -16
- package/dist/api/compiler/printer/printer.d.ts +1 -0
- package/dist/api/compiler/printer/printer.js +303 -281
- package/dist/api/compiler/printer/utilities.js +149 -147
- package/dist/api/compiler/program-checker.d.ts +8 -2
- package/dist/api/compiler/program-checker.js +84 -34
- package/dist/api/compiler/program-utilities.d.ts +3 -1
- package/dist/api/compiler/program-utilities.js +28 -15
- package/dist/api/compiler/program.d.ts +2 -0
- package/dist/api/compiler/program.js +69 -57
- package/dist/api/compiler/pseudo-bigint.d.ts +2 -0
- package/dist/api/compiler/pseudo-bigint.js +18 -0
- package/dist/api/compiler/regexp-checker.d.ts +1 -1
- package/dist/api/compiler/regexp-checker.js +93 -76
- package/dist/api/compiler/relations.d.ts +27 -4
- package/dist/api/compiler/relations.js +337 -180
- package/dist/api/compiler/reparser.js +60 -56
- package/dist/api/compiler/scanner.d.ts +19 -2
- package/dist/api/compiler/scanner.js +123 -108
- package/dist/api/compiler/shared-results.d.ts +463 -0
- package/dist/api/compiler/shared-results.js +2128 -0
- package/dist/api/compiler/sourcemap.js +2 -2
- package/dist/api/compiler/symbol-accessibility.js +87 -74
- package/dist/api/compiler/symbol.d.ts +22 -13
- package/dist/api/compiler/symbol.js +15 -1
- package/dist/api/compiler/syntax-kind.d.ts +198 -197
- package/dist/api/compiler/transformers/alias-references.js +247 -139
- package/dist/api/compiler/transformers/async-utilities.js +25 -25
- package/dist/api/compiler/transformers/async.d.ts +0 -1
- package/dist/api/compiler/transformers/async.js +64 -77
- package/dist/api/compiler/transformers/class-fields.d.ts +1 -0
- package/dist/api/compiler/transformers/class-fields.js +81 -78
- package/dist/api/compiler/transformers/commonjs-module.js +18 -15
- package/dist/api/compiler/transformers/const-enum-inliner.js +1 -1
- package/dist/api/compiler/transformers/declarations-diagnostics.js +247 -244
- package/dist/api/compiler/transformers/declarations-pseudo.js +100 -100
- package/dist/api/compiler/transformers/declarations-resolver.d.ts +0 -3
- package/dist/api/compiler/transformers/declarations-syntactic.d.ts +1 -2
- package/dist/api/compiler/transformers/declarations-syntactic.js +134 -156
- package/dist/api/compiler/transformers/declarations-tracker.js +18 -18
- package/dist/api/compiler/transformers/declarations.d.ts +4 -1
- package/dist/api/compiler/transformers/declarations.js +305 -238
- package/dist/api/compiler/transformers/decorator-metadata.d.ts +1 -1
- package/dist/api/compiler/transformers/decorator-metadata.js +53 -45
- package/dist/api/compiler/transformers/decorator-utilities.js +24 -24
- package/dist/api/compiler/transformers/destructuring.js +19 -18
- package/dist/api/compiler/transformers/emit-resolver.js +1 -1
- package/dist/api/compiler/transformers/es-decorators.js +55 -55
- package/dist/api/compiler/transformers/external-module-info.js +3 -3
- package/dist/api/compiler/transformers/for-await.js +25 -25
- package/dist/api/compiler/transformers/import-elision.js +14 -14
- package/dist/api/compiler/transformers/jsx.js +12 -12
- package/dist/api/compiler/transformers/legacy-decorators.js +17 -17
- package/dist/api/compiler/transformers/module.js +8 -8
- package/dist/api/compiler/transformers/named-evaluation.js +4 -4
- package/dist/api/compiler/transformers/object-rest-spread.js +20 -20
- package/dist/api/compiler/transformers/optional-chain.js +10 -10
- package/dist/api/compiler/transformers/reference-resolver.d.ts +12 -1
- package/dist/api/compiler/transformers/reference-resolver.js +131 -69
- package/dist/api/compiler/transformers/runtime-syntax.js +35 -31
- package/dist/api/compiler/transformers/subtree-facts.js +47 -47
- package/dist/api/compiler/transformers/syntax-facts.js +56 -58
- package/dist/api/compiler/transformers/type-eraser.js +73 -66
- package/dist/api/compiler/transformers/type-serialization.js +24 -24
- package/dist/api/compiler/transformers/using.js +12 -12
- package/dist/api/compiler/transformers/utilities.js +77 -77
- package/dist/api/compiler/transformers/visitor-base.js +172 -172
- package/dist/api/compiler/transformers/visitor-hooks.js +6 -2
- package/dist/api/compiler/tsconfig.d.ts +10 -2
- package/dist/api/compiler/tsconfig.js +136 -48
- package/dist/api/compiler/type-printer.js +40 -3
- package/dist/api/compiler/types.d.ts +2 -1
- package/dist/api/library/ast.generated.d.ts +42 -39
- package/dist/api/library/ast.generated.js +1 -1
- package/dist/api/library/compiler-options.generated.d.ts +111 -100
- package/dist/api/library/compiler-options.generated.js +1 -1
- package/dist/api/library/disk.js +12 -1
- package/dist/api/library/enums.generated.d.ts +206 -206
- package/dist/api/library/enums.generated.js +206 -206
- package/dist/api/library/nodes.js +26 -26
- package/package.json +9 -9
- package/src/compiler/ast-utilities.ts +99 -7
- package/src/compiler/ast.ts +55 -26
- package/src/compiler/binder.ts +39 -4
- package/src/compiler/character-codes.ts +2 -2
- package/src/compiler/checker-calls.ts +76 -8
- package/src/compiler/checker-classes.ts +78 -24
- package/src/compiler/checker-contextual.ts +6 -1
- package/src/compiler/checker-declarations.ts +31 -4
- package/src/compiler/checker-declared-types.ts +8 -5
- package/src/compiler/checker-decorators.ts +1 -1
- package/src/compiler/checker-deprecation.ts +29 -8
- package/src/compiler/checker-destructuring.ts +10 -3
- package/src/compiler/checker-emit-helpers.ts +1 -0
- package/src/compiler/checker-emit-resolver.ts +16 -6
- package/src/compiler/checker-expressions.ts +79 -46
- package/src/compiler/checker-functions.ts +21 -6
- package/src/compiler/checker-generated-code.ts +2 -22
- package/src/compiler/checker-grammar.ts +133 -60
- package/src/compiler/checker-heritage.ts +22 -21
- package/src/compiler/checker-inference.ts +514 -87
- package/src/compiler/checker-iteration.ts +18 -31
- package/src/compiler/checker-javascript.ts +1 -1
- package/src/compiler/checker-jsdoc.ts +50 -27
- package/src/compiler/checker-jsx.ts +26 -4
- package/src/compiler/checker-members.ts +197 -55
- package/src/compiler/checker-modules.ts +332 -65
- package/src/compiler/checker-narrowing.ts +98 -19
- package/src/compiler/checker-object-literals.ts +3 -0
- package/src/compiler/checker-operators.ts +11 -4
- package/src/compiler/checker-property-access.ts +7 -2
- package/src/compiler/checker-services.ts +39 -12
- package/src/compiler/checker-signatures.ts +15 -1
- package/src/compiler/checker-source-file.ts +39 -13
- package/src/compiler/checker-statements.ts +3 -2
- package/src/compiler/checker-symbol-types.ts +29 -6
- package/src/compiler/checker-symbols.ts +158 -15
- package/src/compiler/checker-type-factory.ts +120 -21
- package/src/compiler/checker-type-nodes.ts +46 -3
- package/src/compiler/checker-type-operators.ts +83 -26
- package/src/compiler/checker-types.ts +147 -4
- package/src/compiler/checker-unused.ts +9 -14
- package/src/compiler/checker.ts +168 -41
- package/src/compiler/command-line.ts +28 -28
- package/src/compiler/compile-program.ts +51 -25
- package/src/compiler/decoder.ts +13 -4
- package/src/compiler/diagnostic-messages.ts +1973 -1892
- package/src/compiler/emitter.ts +57 -8
- package/src/compiler/encoder.ts +23 -8
- package/src/compiler/file-include.ts +9 -3
- package/src/compiler/file-loader.ts +139 -32
- package/src/compiler/help.ts +10 -14
- package/src/compiler/incremental.ts +86 -18
- package/src/compiler/init.ts +2 -7
- package/src/compiler/instantiation.ts +77 -22
- package/src/compiler/jsdoc.ts +3 -1
- package/src/compiler/link-tables.ts +82 -37
- package/src/compiler/locales/cs-CZ.ts +1 -1
- package/src/compiler/locales/de-DE.ts +1 -1
- package/src/compiler/locales/es-ES.ts +1 -1
- package/src/compiler/locales/fr-FR.ts +1 -1
- package/src/compiler/locales/it-IT.ts +1 -1
- package/src/compiler/locales/ja-JP.ts +1 -1
- package/src/compiler/locales/ko-KR.ts +1 -1
- package/src/compiler/locales/pl-PL.ts +1 -1
- package/src/compiler/locales/pt-BR.ts +1 -1
- package/src/compiler/locales/ru-RU.ts +1 -1
- package/src/compiler/locales/tr-TR.ts +1 -1
- package/src/compiler/locales/zh-CN.ts +1 -1
- package/src/compiler/locales/zh-TW.ts +1 -1
- package/src/compiler/module-resolution.ts +44 -8
- package/src/compiler/module-specifiers.ts +62 -20
- package/src/compiler/name-resolver.ts +9 -1
- package/src/compiler/node-builder-names.ts +236 -54
- package/src/compiler/node-builder-pseudo.ts +4 -7
- package/src/compiler/node-builder-reuse.ts +5 -4
- package/src/compiler/node-builder.ts +130 -31
- package/src/compiler/option-declarations.ts +33 -103
- package/src/compiler/options.ts +23 -62
- package/src/compiler/output-paths.ts +5 -18
- package/src/compiler/package-entrypoints.ts +345 -0
- package/src/compiler/package-json.ts +4 -4
- package/src/compiler/parallel-check.ts +197 -8
- package/src/compiler/parallel-emit.ts +1 -1
- package/src/compiler/parser.ts +156 -39
- package/src/compiler/path.ts +22 -2
- package/src/compiler/printer/emit-context.ts +16 -0
- package/src/compiler/printer/factory-base.ts +10 -3
- package/src/compiler/printer/factory.ts +4 -1
- package/src/compiler/printer/helpers.ts +10 -1
- package/src/compiler/printer/name-generator.ts +24 -2
- package/src/compiler/printer/printer.ts +35 -14
- package/src/compiler/printer/utilities.ts +8 -2
- package/src/compiler/program-checker.ts +53 -5
- package/src/compiler/program-utilities.ts +23 -10
- package/src/compiler/program.ts +13 -1
- package/src/compiler/pseudo-bigint.ts +17 -0
- package/src/compiler/regexp-checker.ts +63 -30
- package/src/compiler/relations.ts +233 -77
- package/src/compiler/reparser.ts +7 -2
- package/src/compiler/scanner.ts +109 -79
- package/src/compiler/shared-results.ts +2414 -0
- package/src/compiler/show-config.ts +18 -1
- package/src/compiler/sourcemap.ts +2 -2
- package/src/compiler/symbol-accessibility.ts +26 -3
- package/src/compiler/symbol.ts +31 -14
- package/src/compiler/syntax-kind.ts +188 -187
- package/src/compiler/thread-entry.ts +19 -2
- package/src/compiler/transformers/alias-references.ts +123 -4
- package/src/compiler/transformers/async.ts +2 -17
- package/src/compiler/transformers/class-fields.ts +13 -12
- package/src/compiler/transformers/commonjs-module.ts +11 -7
- package/src/compiler/transformers/declarations-diagnostics.ts +5 -3
- package/src/compiler/transformers/declarations-pseudo.ts +2 -4
- package/src/compiler/transformers/declarations-resolver.ts +0 -3
- package/src/compiler/transformers/declarations-syntactic.ts +1 -21
- package/src/compiler/transformers/declarations.ts +134 -48
- package/src/compiler/transformers/decorator-metadata.ts +9 -1
- package/src/compiler/transformers/destructuring.ts +4 -3
- package/src/compiler/transformers/external-module-info.ts +1 -1
- package/src/compiler/transformers/jsx.ts +2 -1
- package/src/compiler/transformers/reference-resolver.ts +83 -19
- package/src/compiler/transformers/runtime-syntax.ts +6 -1
- package/src/compiler/transformers/syntax-facts.ts +2 -7
- package/src/compiler/transformers/type-eraser.ts +10 -1
- package/src/compiler/transformers/type-serialization.ts +3 -2
- package/src/compiler/transformers/visitor-base.ts +2 -1
- package/src/compiler/transformers/visitor-hooks.ts +9 -4
- package/src/compiler/tsc-build.ts +3 -0
- package/src/compiler/tsc-cli.ts +2 -0
- package/src/compiler/tsc-compile.ts +7 -2
- package/src/compiler/tsc-watch.ts +74 -45
- package/src/compiler/tsconfig.ts +176 -19
- package/src/compiler/type-printer.ts +36 -2
- package/src/compiler/types.ts +2 -1
- package/src/library/ast.generated.ts +57 -41
- package/src/library/compiler-options.generated.ts +117 -103
- package/src/library/disk.ts +10 -1
- package/src/library/enums.generated.ts +196 -196
|
@@ -18,10 +18,11 @@ export declare enum ScriptTarget {
|
|
|
18
18
|
ES2023 = 10,
|
|
19
19
|
ES2024 = 11,
|
|
20
20
|
ES2025 = 12,
|
|
21
|
+
ES2026 = 13,
|
|
21
22
|
ESNext = 99,
|
|
22
23
|
JSON = 100,
|
|
23
24
|
Latest = 99,
|
|
24
|
-
LatestStandard =
|
|
25
|
+
LatestStandard = 13
|
|
25
26
|
}
|
|
26
27
|
export declare enum ModuleKind {
|
|
27
28
|
/** Not an option value: a resolution mode or implied format without a specific module kind. */
|
|
@@ -44,6 +45,10 @@ export declare enum ModuleKind {
|
|
|
44
45
|
/** Emit imports and exports as written. */
|
|
45
46
|
Preserve = 200
|
|
46
47
|
}
|
|
48
|
+
/** Whether `import defer` and `import.defer()` are allowed under a module kind. */
|
|
49
|
+
export declare function supportsDeferredImports(moduleKind: ModuleKind): boolean;
|
|
50
|
+
/** Whether `import source` and `import.source()` are allowed under a module kind. */
|
|
51
|
+
export declare function supportsSourcePhaseImports(moduleKind: ModuleKind): boolean;
|
|
47
52
|
export declare enum ModuleResolutionKind {
|
|
48
53
|
/** @deprecated Accepted for parsing and validation only. */
|
|
49
54
|
Classic = 1,
|
|
@@ -60,8 +65,8 @@ export declare enum ModuleDetectionKind {
|
|
|
60
65
|
}
|
|
61
66
|
export declare enum JsxEmit {
|
|
62
67
|
Preserve = 1,
|
|
63
|
-
|
|
64
|
-
|
|
68
|
+
React = 2,
|
|
69
|
+
ReactNative = 3,
|
|
65
70
|
ReactJSX = 4,
|
|
66
71
|
ReactJSXDev = 5
|
|
67
72
|
}
|
|
@@ -69,26 +74,6 @@ export declare enum NewLineKind {
|
|
|
69
74
|
CRLF = 1,
|
|
70
75
|
LF = 2
|
|
71
76
|
}
|
|
72
|
-
export declare enum WatchFileKind {
|
|
73
|
-
FixedPollingInterval = 1,
|
|
74
|
-
PriorityPollingInterval = 2,
|
|
75
|
-
DynamicPriorityPolling = 3,
|
|
76
|
-
FixedChunkSizePolling = 4,
|
|
77
|
-
UseFsEvents = 5,
|
|
78
|
-
UseFsEventsOnParentDirectory = 6
|
|
79
|
-
}
|
|
80
|
-
export declare enum WatchDirectoryKind {
|
|
81
|
-
UseFsEvents = 1,
|
|
82
|
-
FixedPollingInterval = 2,
|
|
83
|
-
DynamicPriorityPolling = 3,
|
|
84
|
-
FixedChunkSizePolling = 4
|
|
85
|
-
}
|
|
86
|
-
export declare enum PollingKind {
|
|
87
|
-
FixedInterval = 1,
|
|
88
|
-
PriorityInterval = 2,
|
|
89
|
-
DynamicPriority = 3,
|
|
90
|
-
FixedChunkSize = 4
|
|
91
|
-
}
|
|
92
77
|
/**
|
|
93
78
|
* Compiler options, in tsgo's field order (which `--showConfig` follows).
|
|
94
79
|
*
|
|
@@ -163,6 +148,8 @@ export interface CompilerOptions {
|
|
|
163
148
|
outDir?: string;
|
|
164
149
|
/** Substitutions are `undefined` where the config gave a non-array. */
|
|
165
150
|
paths?: Map<string, string[] | undefined>;
|
|
151
|
+
/** Read only for `--showConfig`; plugins are not loaded. */
|
|
152
|
+
plugins?: PluginImport[];
|
|
166
153
|
preserveConstEnums?: boolean;
|
|
167
154
|
preserveSymlinks?: boolean;
|
|
168
155
|
project?: string;
|
|
@@ -227,15 +214,6 @@ export interface CompilerOptions {
|
|
|
227
214
|
quiet?: boolean;
|
|
228
215
|
checkers?: number;
|
|
229
216
|
}
|
|
230
|
-
export interface WatchOptions {
|
|
231
|
-
watchInterval?: number;
|
|
232
|
-
watchFile?: WatchFileKind;
|
|
233
|
-
watchDirectory?: WatchDirectoryKind;
|
|
234
|
-
fallbackPolling?: PollingKind;
|
|
235
|
-
synchronousWatchDirectory?: boolean;
|
|
236
|
-
excludeDirectories?: string[];
|
|
237
|
-
excludeFiles?: string[];
|
|
238
|
-
}
|
|
239
217
|
export interface BuildOptions {
|
|
240
218
|
dry?: boolean;
|
|
241
219
|
force?: boolean;
|
|
@@ -258,6 +236,11 @@ export interface TypeAcquisition {
|
|
|
258
236
|
export type OptionValue = boolean | number | string | string[] | null;
|
|
259
237
|
/** A compiler option value as stored in `CompilerOptions`, except `paths`. */
|
|
260
238
|
export type CompilerOptionValue = boolean | number | string | string[];
|
|
239
|
+
/** An entry of `plugins`: its `name`, or `''` when it has no string name. */
|
|
240
|
+
export declare class PluginImport {
|
|
241
|
+
readonly name: string;
|
|
242
|
+
constructor(name: string);
|
|
243
|
+
}
|
|
261
244
|
/** Compiler option names in field order. */
|
|
262
245
|
export declare const compilerOptionNames: readonly string[];
|
|
263
246
|
/** Sets compiler option `name` (a declaration name) from a parsed value. `null` and unknown names are ignored. */
|
|
@@ -268,7 +251,6 @@ export declare function setCompilerOption(options: CompilerOptions, name: string
|
|
|
268
251
|
*/
|
|
269
252
|
export declare function mergeCompilerOptions(target: CompilerOptions, source: CompilerOptions, nulls: ReadonlySet<string> | undefined): CompilerOptions;
|
|
270
253
|
export declare function getCompilerOption(options: CompilerOptions, name: string): CompilerOptionValue | undefined;
|
|
271
|
-
export declare function setWatchOption(options: WatchOptions, name: string, value: OptionValue): void;
|
|
272
254
|
export declare function setBuildOption(options: BuildOptions, name: string, value: OptionValue): void;
|
|
273
255
|
export declare function setTypeAcquisitionOption(options: TypeAcquisition, name: string, value: OptionValue): void;
|
|
274
256
|
export declare function getEmitScriptTarget(options: CompilerOptions): ScriptTarget;
|
|
@@ -19,10 +19,11 @@ export var ScriptTarget;
|
|
|
19
19
|
ScriptTarget[ScriptTarget["ES2023"] = 10] = "ES2023";
|
|
20
20
|
ScriptTarget[ScriptTarget["ES2024"] = 11] = "ES2024";
|
|
21
21
|
ScriptTarget[ScriptTarget["ES2025"] = 12] = "ES2025";
|
|
22
|
+
ScriptTarget[ScriptTarget["ES2026"] = 13] = "ES2026";
|
|
22
23
|
ScriptTarget[ScriptTarget["ESNext"] = 99] = "ESNext";
|
|
23
24
|
ScriptTarget[ScriptTarget["JSON"] = 100] = "JSON";
|
|
24
25
|
ScriptTarget[ScriptTarget["Latest"] = 99] = "Latest";
|
|
25
|
-
ScriptTarget[ScriptTarget["LatestStandard"] =
|
|
26
|
+
ScriptTarget[ScriptTarget["LatestStandard"] = 13] = "LatestStandard";
|
|
26
27
|
})(ScriptTarget || (ScriptTarget = {}));
|
|
27
28
|
export var ModuleKind;
|
|
28
29
|
(function (ModuleKind) {
|
|
@@ -47,6 +48,14 @@ export var ModuleKind;
|
|
|
47
48
|
/** Emit imports and exports as written. */
|
|
48
49
|
ModuleKind[ModuleKind["Preserve"] = 200] = "Preserve";
|
|
49
50
|
})(ModuleKind || (ModuleKind = {}));
|
|
51
|
+
/** Whether `import defer` and `import.defer()` are allowed under a module kind. */
|
|
52
|
+
export function supportsDeferredImports(moduleKind) {
|
|
53
|
+
return moduleKind === ModuleKind.ESNext || moduleKind === ModuleKind.Preserve;
|
|
54
|
+
}
|
|
55
|
+
/** Whether `import source` and `import.source()` are allowed under a module kind. */
|
|
56
|
+
export function supportsSourcePhaseImports(moduleKind) {
|
|
57
|
+
return moduleKind === ModuleKind.ESNext || moduleKind === ModuleKind.NodeNext || moduleKind === ModuleKind.Preserve;
|
|
58
|
+
}
|
|
50
59
|
export var ModuleResolutionKind;
|
|
51
60
|
(function (ModuleResolutionKind) {
|
|
52
61
|
/** @deprecated Accepted for parsing and validation only. */
|
|
@@ -66,8 +75,8 @@ export var ModuleDetectionKind;
|
|
|
66
75
|
export var JsxEmit;
|
|
67
76
|
(function (JsxEmit) {
|
|
68
77
|
JsxEmit[JsxEmit["Preserve"] = 1] = "Preserve";
|
|
69
|
-
JsxEmit[JsxEmit["
|
|
70
|
-
JsxEmit[JsxEmit["
|
|
78
|
+
JsxEmit[JsxEmit["React"] = 2] = "React";
|
|
79
|
+
JsxEmit[JsxEmit["ReactNative"] = 3] = "ReactNative";
|
|
71
80
|
JsxEmit[JsxEmit["ReactJSX"] = 4] = "ReactJSX";
|
|
72
81
|
JsxEmit[JsxEmit["ReactJSXDev"] = 5] = "ReactJSXDev";
|
|
73
82
|
})(JsxEmit || (JsxEmit = {}));
|
|
@@ -76,29 +85,13 @@ export var NewLineKind;
|
|
|
76
85
|
NewLineKind[NewLineKind["CRLF"] = 1] = "CRLF";
|
|
77
86
|
NewLineKind[NewLineKind["LF"] = 2] = "LF";
|
|
78
87
|
})(NewLineKind || (NewLineKind = {}));
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
WatchFileKind[WatchFileKind["UseFsEventsOnParentDirectory"] = 6] = "UseFsEventsOnParentDirectory";
|
|
87
|
-
})(WatchFileKind || (WatchFileKind = {}));
|
|
88
|
-
export var WatchDirectoryKind;
|
|
89
|
-
(function (WatchDirectoryKind) {
|
|
90
|
-
WatchDirectoryKind[WatchDirectoryKind["UseFsEvents"] = 1] = "UseFsEvents";
|
|
91
|
-
WatchDirectoryKind[WatchDirectoryKind["FixedPollingInterval"] = 2] = "FixedPollingInterval";
|
|
92
|
-
WatchDirectoryKind[WatchDirectoryKind["DynamicPriorityPolling"] = 3] = "DynamicPriorityPolling";
|
|
93
|
-
WatchDirectoryKind[WatchDirectoryKind["FixedChunkSizePolling"] = 4] = "FixedChunkSizePolling";
|
|
94
|
-
})(WatchDirectoryKind || (WatchDirectoryKind = {}));
|
|
95
|
-
export var PollingKind;
|
|
96
|
-
(function (PollingKind) {
|
|
97
|
-
PollingKind[PollingKind["FixedInterval"] = 1] = "FixedInterval";
|
|
98
|
-
PollingKind[PollingKind["PriorityInterval"] = 2] = "PriorityInterval";
|
|
99
|
-
PollingKind[PollingKind["DynamicPriority"] = 3] = "DynamicPriority";
|
|
100
|
-
PollingKind[PollingKind["FixedChunkSize"] = 4] = "FixedChunkSize";
|
|
101
|
-
})(PollingKind || (PollingKind = {}));
|
|
88
|
+
/** An entry of `plugins`: its `name`, or `''` when it has no string name. */
|
|
89
|
+
export class PluginImport {
|
|
90
|
+
name;
|
|
91
|
+
constructor(name) {
|
|
92
|
+
this.name = name;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
102
95
|
/** Compiler option names in field order. */
|
|
103
96
|
export const compilerOptionNames = [
|
|
104
97
|
'allowJs',
|
|
@@ -168,6 +161,7 @@ export const compilerOptionNames = [
|
|
|
168
161
|
'noUncheckedSideEffectImports',
|
|
169
162
|
'outDir',
|
|
170
163
|
'paths',
|
|
164
|
+
'plugins',
|
|
171
165
|
'preserveConstEnums',
|
|
172
166
|
'preserveSymlinks',
|
|
173
167
|
'project',
|
|
@@ -707,6 +701,7 @@ export function mergeCompilerOptions(target, source, nulls) {
|
|
|
707
701
|
target.noUncheckedSideEffectImports = merged(source.noUncheckedSideEffectImports, target.noUncheckedSideEffectImports, nulls, 'noUncheckedSideEffectImports');
|
|
708
702
|
target.outDir = merged(source.outDir, target.outDir, nulls, 'outDir');
|
|
709
703
|
target.paths = merged(source.paths, target.paths, nulls, 'paths');
|
|
704
|
+
target.plugins = merged(source.plugins, target.plugins, nulls, 'plugins');
|
|
710
705
|
target.preserveConstEnums = merged(source.preserveConstEnums, target.preserveConstEnums, nulls, 'preserveConstEnums');
|
|
711
706
|
target.preserveSymlinks = merged(source.preserveSymlinks, target.preserveSymlinks, nulls, 'preserveSymlinks');
|
|
712
707
|
target.project = merged(source.project, target.project, nulls, 'project');
|
|
@@ -1040,34 +1035,6 @@ export function getCompilerOption(options, name) {
|
|
|
1040
1035
|
}
|
|
1041
1036
|
return undefined;
|
|
1042
1037
|
}
|
|
1043
|
-
export function setWatchOption(options, name, value) {
|
|
1044
|
-
switch (name) {
|
|
1045
|
-
case 'watchInterval':
|
|
1046
|
-
options.watchInterval = numberValue(value);
|
|
1047
|
-
break;
|
|
1048
|
-
case 'watchFile':
|
|
1049
|
-
if (value !== null)
|
|
1050
|
-
options.watchFile = numberValue(value);
|
|
1051
|
-
break;
|
|
1052
|
-
case 'watchDirectory':
|
|
1053
|
-
if (value !== null)
|
|
1054
|
-
options.watchDirectory = numberValue(value);
|
|
1055
|
-
break;
|
|
1056
|
-
case 'fallbackPolling':
|
|
1057
|
-
if (value !== null)
|
|
1058
|
-
options.fallbackPolling = numberValue(value);
|
|
1059
|
-
break;
|
|
1060
|
-
case 'synchronousWatchDirectory':
|
|
1061
|
-
options.synchronousWatchDirectory = value === null ? undefined : value === true;
|
|
1062
|
-
break;
|
|
1063
|
-
case 'excludeDirectories':
|
|
1064
|
-
options.excludeDirectories = stringList(value);
|
|
1065
|
-
break;
|
|
1066
|
-
case 'excludeFiles':
|
|
1067
|
-
options.excludeFiles = stringList(value);
|
|
1068
|
-
break;
|
|
1069
|
-
}
|
|
1070
|
-
}
|
|
1071
1038
|
export function setBuildOption(options, name, value) {
|
|
1072
1039
|
if (value === null)
|
|
1073
1040
|
return;
|
|
@@ -28,7 +28,10 @@ export declare function getOutputJSFileName(inputFileName: string, options: Comp
|
|
|
28
28
|
export declare function getOutputJSFileNameWorker(inputFileName: string, options: CompilerOptions, host: OutputPathsHost): string;
|
|
29
29
|
/** The declaration output of `inputFileName`. */
|
|
30
30
|
export declare function getOutputDeclarationFileNameWorker(inputFileName: string, options: CompilerOptions, host: OutputPathsHost): string;
|
|
31
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* `fileName` moved from `commonSourceDirectory` to `newDirectory`. The prefix check is case-folded when file names
|
|
33
|
+
* are case-insensitive; case folding keeps each code point's length, so the prefix is removed by its own length.
|
|
34
|
+
*/
|
|
32
35
|
export declare function getSourceFilePathInNewDirWorker(fileName: string, newDirectory: string, currentDirectory: string, commonSourceDirectory: string, useCaseSensitiveFileNames: boolean): string;
|
|
33
36
|
export declare function getSourceMapFilePath(jsFilePath: string, options: CompilerOptions): string;
|
|
34
37
|
/** The `.tsbuildinfo` file of an incremental build, or `''`. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { changeExtension, combinePaths, comparePaths,
|
|
1
|
+
import { changeExtension, combinePaths, comparePaths, ensureTrailingDirectorySeparator, fileExtensionIs, fileExtensionIsOneOf, getAnyExtensionFromPath, getBaseFileName, getCanonicalFileName, getDirectoryPath, getNormalizedAbsolutePath, getPathComponents, getPathComponentsRelativeTo, getPathFromPathComponents, reducePathComponents, removeFileExtension, resolvePath, } from './path.js';
|
|
2
2
|
/** The files emitted for one source file; `''` for those not emitted. */
|
|
3
3
|
export class OutputPaths {
|
|
4
4
|
jsFilePath;
|
|
@@ -96,15 +96,10 @@ function getDeclarationEmitOutputFilePath(file, options, host) {
|
|
|
96
96
|
: getSourceFilePathInNewDirWorker(file, outputDirectory, host.currentDirectory, host.commonSourceDirectory(), host.useCaseSensitiveFileNames);
|
|
97
97
|
return removeFileExtension(path) + getDeclarationEmitExtensionForPath(path);
|
|
98
98
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
sourceFilePath = sourceFilePath.slice(common.length);
|
|
104
|
-
}
|
|
105
|
-
return combinePaths(newDirectory, sourceFilePath);
|
|
106
|
-
}
|
|
107
|
-
/** Like `getSourceFilePathInNewDir`, but with a case-folded prefix check. */
|
|
99
|
+
/**
|
|
100
|
+
* `fileName` moved from `commonSourceDirectory` to `newDirectory`. The prefix check is case-folded when file names
|
|
101
|
+
* are case-insensitive; case folding keeps each code point's length, so the prefix is removed by its own length.
|
|
102
|
+
*/
|
|
108
103
|
export function getSourceFilePathInNewDirWorker(fileName, newDirectory, currentDirectory, commonSourceDirectory, useCaseSensitiveFileNames) {
|
|
109
104
|
let sourceFilePath = getNormalizedAbsolutePath(fileName, currentDirectory);
|
|
110
105
|
const common = getCanonicalFileName(commonSourceDirectory, useCaseSensitiveFileNames);
|
|
@@ -116,7 +111,7 @@ export function getSourceFilePathInNewDirWorker(fileName, newDirectory, currentD
|
|
|
116
111
|
function getOwnEmitOutputFilePath(fileName, options, host, extension) {
|
|
117
112
|
const withoutExtension = options.outDir === undefined
|
|
118
113
|
? removeFileExtension(fileName)
|
|
119
|
-
: removeFileExtension(
|
|
114
|
+
: removeFileExtension(getSourceFilePathInNewDirWorker(fileName, options.outDir, host.currentDirectory, host.commonSourceDirectory(), host.useCaseSensitiveFileNames));
|
|
120
115
|
return withoutExtension + extension;
|
|
121
116
|
}
|
|
122
117
|
export function getSourceMapFilePath(jsFilePath, options) {
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* "Expected type of 'main' field in 'package.json' to be 'string', got 'number'".
|
|
6
6
|
*/
|
|
7
7
|
import { type MessageWithArgs } from './diagnostics.js';
|
|
8
|
-
export declare const typeScriptVersion = "7.0
|
|
9
|
-
export declare const typeScriptVersionMajorMinor = "7.
|
|
8
|
+
export declare const typeScriptVersion = "7.1.0-beta";
|
|
9
|
+
export declare const typeScriptVersionMajorMinor = "7.1";
|
|
10
10
|
export type JsonType = 'null' | 'boolean' | 'number' | 'string' | 'array' | 'object';
|
|
11
11
|
/** How an object in `exports` or `imports` is interpreted, from the first character of its keys. */
|
|
12
12
|
export declare const enum JsonObjectKind {
|
|
@@ -143,7 +143,7 @@ export declare class PackageJsonInfoCache {
|
|
|
143
143
|
constructor(currentDirectory: string, useCaseSensitiveFileNames: boolean);
|
|
144
144
|
/**
|
|
145
145
|
* Called before the cache is shared with other threads, which makes it immutable: from then on,
|
|
146
|
-
* each thread keeps the lookups it adds in a table of its own.
|
|
146
|
+
* each thread keeps the lookups it adds in a table of its own. A cache already shared is immutable.
|
|
147
147
|
*/
|
|
148
148
|
prepareForSharing(): void;
|
|
149
149
|
get(packageJsonPath: string): PackageJsonInfo | undefined;
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { messageWithArgs } from './diagnostics.js';
|
|
8
8
|
import { toPath } from './path.js';
|
|
9
|
-
export const typeScriptVersion = '7.0
|
|
10
|
-
export const typeScriptVersionMajorMinor = '7.
|
|
9
|
+
export const typeScriptVersion = '7.1.0-beta';
|
|
10
|
+
export const typeScriptVersionMajorMinor = '7.1';
|
|
11
11
|
const JSON_NULL = { type: 'null' };
|
|
12
12
|
const JSON_TRUE = { type: 'boolean', value: true };
|
|
13
13
|
const JSON_FALSE = { type: 'boolean', value: false };
|
|
@@ -414,30 +414,30 @@ export class PackageJson {
|
|
|
414
414
|
const traces = this.versionTraces;
|
|
415
415
|
const typesVersions = this.typesVersions;
|
|
416
416
|
if (typesVersions === undefined) {
|
|
417
|
-
traces.push(messageWithArgs(
|
|
417
|
+
traces.push(messageWithArgs(1280 /* Diagnostics.X_package_json_does_not_have_a_0_field */, 'typesVersions'));
|
|
418
418
|
return undefined;
|
|
419
419
|
}
|
|
420
420
|
if (typesVersions.type !== 'object') {
|
|
421
|
-
traces.push(messageWithArgs(
|
|
421
|
+
traces.push(messageWithArgs(1284 /* Diagnostics.Expected_type_of_0_field_in_package_json_to_be_1_got_2 */, 'typesVersions', 'object', typesVersions.type));
|
|
422
422
|
return undefined;
|
|
423
423
|
}
|
|
424
|
-
traces.push(messageWithArgs(
|
|
424
|
+
traces.push(messageWithArgs(1370 /* Diagnostics.X_package_json_has_a_typesVersions_field_with_version_specific_path_mappings */, 'typesVersions'));
|
|
425
425
|
for (const [key, value] of typesVersions.entries) {
|
|
426
426
|
const range = parseVersionRange(key);
|
|
427
427
|
if (range === undefined) {
|
|
428
|
-
traces.push(messageWithArgs(
|
|
428
|
+
traces.push(messageWithArgs(1373 /* Diagnostics.X_package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range */, key));
|
|
429
429
|
continue;
|
|
430
430
|
}
|
|
431
431
|
if (!versionRangeMatches(range, TYPESCRIPT_VERSION))
|
|
432
432
|
continue;
|
|
433
433
|
if (value.type !== 'object') {
|
|
434
|
-
traces.push(messageWithArgs(
|
|
434
|
+
traces.push(messageWithArgs(1284 /* Diagnostics.Expected_type_of_0_field_in_package_json_to_be_1_got_2 */, "typesVersions['" + key + "']", 'object', value.type));
|
|
435
435
|
return undefined;
|
|
436
436
|
}
|
|
437
437
|
// An empty key matches every version but, as in tsgo, yields no paths.
|
|
438
438
|
return key === '' ? undefined : { version: key, paths: versionPathsFromJson(value) };
|
|
439
439
|
}
|
|
440
|
-
traces.push(messageWithArgs(
|
|
440
|
+
traces.push(messageWithArgs(1371 /* Diagnostics.X_package_json_does_not_have_a_typesVersions_entry_that_matches_version_0 */, typeScriptVersionMajorMinor));
|
|
441
441
|
return undefined;
|
|
442
442
|
}
|
|
443
443
|
}
|
|
@@ -616,10 +616,11 @@ export class PackageJsonInfoCache {
|
|
|
616
616
|
}
|
|
617
617
|
/**
|
|
618
618
|
* Called before the cache is shared with other threads, which makes it immutable: from then on,
|
|
619
|
-
* each thread keeps the lookups it adds in a table of its own.
|
|
619
|
+
* each thread keeps the lookups it adds in a table of its own. A cache already shared is immutable.
|
|
620
620
|
*/
|
|
621
621
|
prepareForSharing() {
|
|
622
|
-
this.shared
|
|
622
|
+
if (!this.shared)
|
|
623
|
+
this.shared = true;
|
|
623
624
|
}
|
|
624
625
|
get(packageJsonPath) {
|
|
625
626
|
return this.lookup(toPath(packageJsonPath, this.currentDirectory, this.useCaseSensitiveFileNames));
|
|
@@ -46,22 +46,26 @@ declare const enum ListElement {
|
|
|
46
46
|
ObjectBindingElement = 6,
|
|
47
47
|
ClassElement = 7,
|
|
48
48
|
HeritageClause = 8,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
49
|
+
/** A heritage clause of an interface declaration. */
|
|
50
|
+
InterfaceHeritageClause = 9,
|
|
51
|
+
ExpressionWithTypeArguments = 10,
|
|
52
|
+
/** An element of a type heritage clause: `implements` of a class, `extends` of an interface. */
|
|
53
|
+
TypeHeritageClauseElement = 11,
|
|
54
|
+
EnumMember = 12,
|
|
55
|
+
ImportSpecifier = 13,
|
|
56
|
+
ExportSpecifier = 14,
|
|
57
|
+
Type = 15,
|
|
58
|
+
ImportAttribute = 16,
|
|
59
|
+
TypeMember = 17,
|
|
60
|
+
TypeParameter = 18,
|
|
61
|
+
Parameter = 19,
|
|
58
62
|
/** A parameter of a signature, using `signatureParameter*` state. */
|
|
59
|
-
SignatureParameter =
|
|
60
|
-
TupleElement =
|
|
61
|
-
JsxAttribute =
|
|
62
|
-
ArgumentExpression =
|
|
63
|
-
ArrayLiteralElement =
|
|
64
|
-
ObjectLiteralElement =
|
|
63
|
+
SignatureParameter = 20,
|
|
64
|
+
TupleElement = 21,
|
|
65
|
+
JsxAttribute = 22,
|
|
66
|
+
ArgumentExpression = 23,
|
|
67
|
+
ArrayLiteralElement = 24,
|
|
68
|
+
ObjectLiteralElement = 25
|
|
65
69
|
}
|
|
66
70
|
export declare const enum ParseFlags {
|
|
67
71
|
None = 0,
|
|
@@ -286,8 +290,13 @@ export declare class Parser extends ScannerErrorReporter {
|
|
|
286
290
|
parseClassDeclarationOrExpression(pos: number, jsdoc: JSDocScannerInfo, modifiers: ModifierList | undefined, kind: SyntaxKind): Node;
|
|
287
291
|
parseNameOfClassDeclarationOrExpression(): Identifier | undefined;
|
|
288
292
|
isImplementsClause(): boolean;
|
|
289
|
-
parseHeritageClauses(): NodeList | undefined;
|
|
290
|
-
parseHeritageClause(): Node;
|
|
293
|
+
parseHeritageClauses(isInterface: boolean): NodeList | undefined;
|
|
294
|
+
parseHeritageClause(isInterface: boolean): Node;
|
|
295
|
+
/** A type reference when the element is an entity name with optional type arguments, otherwise the
|
|
296
|
+
* `ExpressionWithTypeArguments`, which the checker reports. */
|
|
297
|
+
parseTypeHeritageClauseElement(): Node;
|
|
298
|
+
/** The `QualifiedName` chain for an identifier or a chain of property accesses, spanning the same text. */
|
|
299
|
+
convertEntityNameExpressionToEntityName(node: Node): Node;
|
|
291
300
|
parseExpressionWithTypeArguments(): Node;
|
|
292
301
|
parseClassElement(): Node;
|
|
293
302
|
parseClassStaticBlockDeclaration(pos: number, jsdoc: JSDocScannerInfo, modifiers: ModifierList | undefined): Node;
|
|
@@ -309,6 +318,11 @@ export declare class Parser extends ScannerErrorReporter {
|
|
|
309
318
|
parseModuleOrNamespaceDeclaration(pos: number, jsdoc: JSDocScannerInfo, modifiers: ModifierList | undefined, nested: boolean, keyword: SyntaxKind): Node;
|
|
310
319
|
parseImportDeclarationOrImportEqualsDeclaration(pos: number, jsdoc: JSDocScannerInfo, modifiers: ModifierList | undefined): Statement;
|
|
311
320
|
tokenAfterImportDefinitelyProducesImportDeclaration(): boolean;
|
|
321
|
+
/** In `import defer ___` or `import source ___`, whether `defer` or `source` is a phase modifier rather than the
|
|
322
|
+
* default import's name. */
|
|
323
|
+
shouldParseImportPhaseModifier(): boolean;
|
|
324
|
+
/** The phase modifier the current token's text spells, written without escapes, or `Unknown`. */
|
|
325
|
+
currentImportPhaseModifier(): SyntaxKind;
|
|
312
326
|
/** In `import id ___`, whether the token makes this an ImportDeclaration rather than ImportEqualsDeclaration. */
|
|
313
327
|
tokenAfterImportedIdentifierDefinitelyProducesImportDeclaration(): boolean;
|
|
314
328
|
parseImportEqualsDeclaration(pos: number, jsdoc: JSDocScannerInfo, modifiers: ModifierList | undefined, identifier: Identifier, isTypeOnly: boolean): Node;
|
|
@@ -357,8 +371,11 @@ export declare class Parser extends ScannerErrorReporter {
|
|
|
357
371
|
parseLiteralTypeNode(negative: boolean): TypeNode;
|
|
358
372
|
parseTypeReference(): TypeNode;
|
|
359
373
|
parseEntityNameOfTypeReference(): EntityName;
|
|
360
|
-
/**
|
|
361
|
-
|
|
374
|
+
/**
|
|
375
|
+
* An entity name; `use` is for its first identifier, the qualified names' right sides are names.
|
|
376
|
+
* Only a type query allows private names on the right (`typeof this.#x`).
|
|
377
|
+
*/
|
|
378
|
+
parseEntityName(allowReservedWords: boolean, allowPrivateName: boolean, diagnosticMessage: DiagnosticMessage | undefined, use?: IdentifierUse): EntityName;
|
|
362
379
|
parseRightSideOfDot(allowIdentifierNames: boolean, allowPrivateIdentifiers: boolean, allowUnicodeEscapeSequenceInIdentifierName: boolean): Node;
|
|
363
380
|
/** `parseRightSideOfDot` without private identifiers. */
|
|
364
381
|
parseRightSideOfDotIdentifier(allowIdentifierNames: boolean, allowUnicodeEscapeSequenceInIdentifierName: boolean): Identifier;
|
|
@@ -503,6 +520,8 @@ export declare class Parser extends ScannerErrorReporter {
|
|
|
503
520
|
parseAwaitExpression(): Expression;
|
|
504
521
|
parseTypeAssertion(): Expression;
|
|
505
522
|
parseLeftHandSideExpressionOrHigher(): Expression;
|
|
523
|
+
/** The name after `import.`; `defer` and `source` written with escapes are reported. */
|
|
524
|
+
parseImportMetaPropertyName(): Identifier;
|
|
506
525
|
parseSuperExpression(): Expression;
|
|
507
526
|
isTemplateStartOfTaggedTemplate(): boolean;
|
|
508
527
|
tryParseTypeArgumentsInExpression(): NodeList | undefined;
|
|
@@ -608,4 +627,6 @@ export declare function forgetLazyJSDocFile(): void;
|
|
|
608
627
|
export declare function getNodeAtPosition(file: SourceFile, position: number, includeJSDoc: boolean): Node;
|
|
609
628
|
/** Whether `moduleName` names a Node.js core module, with or without the `node:` prefix. */
|
|
610
629
|
export declare function isNodeCoreModule(moduleName: string): boolean;
|
|
630
|
+
export declare const unprefixedNodeCoreModules: Set<string>;
|
|
631
|
+
export declare const exclusivelyPrefixedNodeCoreModules: Set<string>;
|
|
611
632
|
export {};
|