tsc-ts 0.0.3 → 0.0.5
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 +46 -0
- package/dist/api/compiler/ast-utilities.d.ts +82 -0
- package/dist/api/compiler/ast-utilities.js +462 -0
- package/dist/api/compiler/ast.d.ts +2350 -0
- package/dist/api/compiler/ast.js +11206 -0
- package/dist/api/compiler/astnav.d.ts +37 -0
- package/dist/api/compiler/astnav.js +767 -0
- package/dist/api/compiler/binder-utilities.d.ts +182 -0
- package/dist/api/compiler/binder-utilities.js +1240 -0
- package/dist/api/compiler/binder.d.ts +33 -0
- package/dist/api/compiler/binder.js +2358 -0
- package/dist/api/compiler/character-codes.d.ts +161 -0
- package/dist/api/compiler/character-codes.js +160 -0
- package/dist/api/compiler/checker-calls.d.ts +46 -0
- package/dist/api/compiler/checker-calls.js +1640 -0
- package/dist/api/compiler/checker-classes.d.ts +30 -0
- package/dist/api/compiler/checker-classes.js +582 -0
- package/dist/api/compiler/checker-contextual.d.ts +77 -0
- package/dist/api/compiler/checker-contextual.js +1136 -0
- package/dist/api/compiler/checker-declaration-order.d.ts +12 -0
- package/dist/api/compiler/checker-declaration-order.js +356 -0
- package/dist/api/compiler/checker-declarations.d.ts +33 -0
- package/dist/api/compiler/checker-declarations.js +888 -0
- package/dist/api/compiler/checker-declared-types.d.ts +48 -0
- package/dist/api/compiler/checker-declared-types.js +787 -0
- package/dist/api/compiler/checker-decorators.d.ts +26 -0
- package/dist/api/compiler/checker-decorators.js +562 -0
- package/dist/api/compiler/checker-deprecation.d.ts +33 -0
- package/dist/api/compiler/checker-deprecation.js +315 -0
- package/dist/api/compiler/checker-destructuring.d.ts +34 -0
- package/dist/api/compiler/checker-destructuring.js +584 -0
- package/dist/api/compiler/checker-elaboration.d.ts +15 -0
- package/dist/api/compiler/checker-elaboration.js +290 -0
- package/dist/api/compiler/checker-emit-helpers.d.ts +58 -0
- package/dist/api/compiler/checker-emit-helpers.js +154 -0
- package/dist/api/compiler/checker-emit-resolver.d.ts +75 -0
- package/dist/api/compiler/checker-emit-resolver.js +579 -0
- package/dist/api/compiler/checker-evaluator.d.ts +27 -0
- package/dist/api/compiler/checker-evaluator.js +188 -0
- package/dist/api/compiler/checker-expressions.d.ts +67 -0
- package/dist/api/compiler/checker-expressions.js +1351 -0
- package/dist/api/compiler/checker-features.d.ts +6 -0
- package/dist/api/compiler/checker-features.js +354 -0
- package/dist/api/compiler/checker-flow.d.ts +86 -0
- package/dist/api/compiler/checker-flow.js +169 -0
- package/dist/api/compiler/checker-functions.d.ts +43 -0
- package/dist/api/compiler/checker-functions.js +1002 -0
- package/dist/api/compiler/checker-generated-code.d.ts +25 -0
- package/dist/api/compiler/checker-generated-code.js +168 -0
- package/dist/api/compiler/checker-globals.d.ts +14 -0
- package/dist/api/compiler/checker-globals.js +37 -0
- package/dist/api/compiler/checker-grammar.d.ts +35 -0
- package/dist/api/compiler/checker-grammar.js +2573 -0
- package/dist/api/compiler/checker-heritage.d.ts +28 -0
- package/dist/api/compiler/checker-heritage.js +900 -0
- package/dist/api/compiler/checker-inference.d.ts +179 -0
- package/dist/api/compiler/checker-inference.js +2105 -0
- package/dist/api/compiler/checker-iteration.d.ts +115 -0
- package/dist/api/compiler/checker-iteration.js +857 -0
- package/dist/api/compiler/checker-javascript.d.ts +42 -0
- package/dist/api/compiler/checker-javascript.js +441 -0
- package/dist/api/compiler/checker-jsdoc.d.ts +30 -0
- package/dist/api/compiler/checker-jsdoc.js +320 -0
- package/dist/api/compiler/checker-jsx.d.ts +94 -0
- package/dist/api/compiler/checker-jsx.js +1433 -0
- package/dist/api/compiler/checker-literals.d.ts +6 -0
- package/dist/api/compiler/checker-literals.js +43 -0
- package/dist/api/compiler/checker-members.d.ts +198 -0
- package/dist/api/compiler/checker-members.js +2126 -0
- package/dist/api/compiler/checker-modules.d.ts +85 -0
- package/dist/api/compiler/checker-modules.js +2141 -0
- package/dist/api/compiler/checker-narrowing.d.ts +120 -0
- package/dist/api/compiler/checker-narrowing.js +2797 -0
- package/dist/api/compiler/checker-object-literals.d.ts +14 -0
- package/dist/api/compiler/checker-object-literals.js +479 -0
- package/dist/api/compiler/checker-operators.d.ts +33 -0
- package/dist/api/compiler/checker-operators.js +1040 -0
- package/dist/api/compiler/checker-overloads.d.ts +7 -0
- package/dist/api/compiler/checker-overloads.js +270 -0
- package/dist/api/compiler/checker-property-access.d.ts +34 -0
- package/dist/api/compiler/checker-property-access.js +672 -0
- package/dist/api/compiler/checker-services.d.ts +49 -0
- package/dist/api/compiler/checker-services.js +995 -0
- package/dist/api/compiler/checker-signatures.d.ts +55 -0
- package/dist/api/compiler/checker-signatures.js +788 -0
- package/dist/api/compiler/checker-source-file.d.ts +27 -0
- package/dist/api/compiler/checker-source-file.js +619 -0
- package/dist/api/compiler/checker-statements.d.ts +18 -0
- package/dist/api/compiler/checker-statements.js +226 -0
- package/dist/api/compiler/checker-super.d.ts +13 -0
- package/dist/api/compiler/checker-super.js +241 -0
- package/dist/api/compiler/checker-symbol-types.d.ts +67 -0
- package/dist/api/compiler/checker-symbol-types.js +1885 -0
- package/dist/api/compiler/checker-symbols.d.ts +181 -0
- package/dist/api/compiler/checker-symbols.js +1782 -0
- package/dist/api/compiler/checker-type-factory.d.ts +142 -0
- package/dist/api/compiler/checker-type-factory.js +2501 -0
- package/dist/api/compiler/checker-type-nodes.d.ts +26 -0
- package/dist/api/compiler/checker-type-nodes.js +828 -0
- package/dist/api/compiler/checker-type-operators.d.ts +109 -0
- package/dist/api/compiler/checker-type-operators.js +1842 -0
- package/dist/api/compiler/checker-types.d.ts +1027 -0
- package/dist/api/compiler/checker-types.js +1697 -0
- package/dist/api/compiler/checker-unused.d.ts +19 -0
- package/dist/api/compiler/checker-unused.js +524 -0
- package/dist/api/compiler/checker-utilities.d.ts +33 -0
- package/dist/api/compiler/checker-utilities.js +141 -0
- package/dist/api/compiler/checker.d.ts +491 -0
- package/dist/api/compiler/checker.js +912 -0
- package/dist/api/compiler/command-line.d.ts +32 -0
- package/dist/api/compiler/command-line.js +383 -0
- package/dist/api/compiler/compile-program.d.ts +118 -0
- package/dist/api/compiler/compile-program.js +384 -0
- package/dist/api/compiler/diagnostic-locales.d.ts +22 -0
- package/dist/api/compiler/diagnostic-locales.js +64 -0
- package/dist/api/compiler/diagnostic-messages.d.ts +2166 -0
- package/dist/api/compiler/diagnostic-messages.js +184 -0
- package/dist/api/compiler/diagnostics.d.ts +167 -0
- package/dist/api/compiler/diagnostics.js +820 -0
- package/dist/api/compiler/emitter.d.ts +71 -0
- package/dist/api/compiler/emitter.js +327 -0
- package/dist/api/compiler/file-include.d.ts +117 -0
- package/dist/api/compiler/file-include.js +536 -0
- package/dist/api/compiler/file-loader.d.ts +261 -0
- package/dist/api/compiler/file-loader.js +1257 -0
- package/dist/api/compiler/file-system.d.ts +51 -0
- package/dist/api/compiler/file-system.js +132 -0
- package/dist/api/compiler/flow.d.ts +60 -0
- package/dist/api/compiler/flow.js +45 -0
- package/dist/api/compiler/instantiation.d.ts +74 -0
- package/dist/api/compiler/instantiation.js +799 -0
- package/dist/api/compiler/jsdoc.d.ts +75 -0
- package/dist/api/compiler/jsdoc.js +1229 -0
- package/dist/api/compiler/link-tables.d.ts +36 -0
- package/dist/api/compiler/link-tables.js +83 -0
- package/dist/api/compiler/locale-data.d.ts +24 -0
- package/dist/api/compiler/locale-data.js +183 -0
- package/dist/api/compiler/locale.d.ts +4 -0
- package/dist/api/compiler/locale.js +317 -0
- package/dist/api/compiler/locales/cs-CZ.d.ts +2 -0
- package/dist/api/compiler/locales/cs-CZ.js +3 -0
- package/dist/api/compiler/locales/de-DE.d.ts +2 -0
- package/dist/api/compiler/locales/de-DE.js +3 -0
- package/dist/api/compiler/locales/es-ES.d.ts +2 -0
- package/dist/api/compiler/locales/es-ES.js +3 -0
- package/dist/api/compiler/locales/fr-FR.d.ts +2 -0
- package/dist/api/compiler/locales/fr-FR.js +3 -0
- package/dist/api/compiler/locales/it-IT.d.ts +2 -0
- package/dist/api/compiler/locales/it-IT.js +3 -0
- package/dist/api/compiler/locales/ja-JP.d.ts +2 -0
- package/dist/api/compiler/locales/ja-JP.js +3 -0
- package/dist/api/compiler/locales/ko-KR.d.ts +2 -0
- package/dist/api/compiler/locales/ko-KR.js +3 -0
- package/dist/api/compiler/locales/pl-PL.d.ts +2 -0
- package/dist/api/compiler/locales/pl-PL.js +3 -0
- package/dist/api/compiler/locales/pt-BR.d.ts +2 -0
- package/dist/api/compiler/locales/pt-BR.js +3 -0
- package/dist/api/compiler/locales/ru-RU.d.ts +2 -0
- package/dist/api/compiler/locales/ru-RU.js +3 -0
- package/dist/api/compiler/locales/tr-TR.d.ts +2 -0
- package/dist/api/compiler/locales/tr-TR.js +3 -0
- package/dist/api/compiler/locales/zh-CN.d.ts +2 -0
- package/dist/api/compiler/locales/zh-CN.js +3 -0
- package/dist/api/compiler/locales/zh-TW.d.ts +2 -0
- package/dist/api/compiler/locales/zh-TW.js +3 -0
- package/dist/api/compiler/module-resolution-types.d.ts +83 -0
- package/dist/api/compiler/module-resolution-types.js +176 -0
- package/dist/api/compiler/module-resolution.d.ts +71 -0
- package/dist/api/compiler/module-resolution.js +1598 -0
- package/dist/api/compiler/module-specifiers.d.ts +64 -0
- package/dist/api/compiler/module-specifiers.js +1101 -0
- package/dist/api/compiler/name-resolver.d.ts +43 -0
- package/dist/api/compiler/name-resolver.js +509 -0
- package/dist/api/compiler/node-builder-names.d.ts +32 -0
- package/dist/api/compiler/node-builder-names.js +854 -0
- package/dist/api/compiler/node-builder-pseudo.d.ts +36 -0
- package/dist/api/compiler/node-builder-pseudo.js +744 -0
- package/dist/api/compiler/node-builder-reuse.d.ts +4 -0
- package/dist/api/compiler/node-builder-reuse.js +647 -0
- package/dist/api/compiler/node-builder.d.ts +270 -0
- package/dist/api/compiler/node-builder.js +2645 -0
- package/dist/api/compiler/option-declarations.d.ts +90 -0
- package/dist/api/compiler/option-declarations.js +1460 -0
- package/dist/api/compiler/options.d.ts +289 -0
- package/dist/api/compiler/options.js +1197 -0
- package/dist/api/compiler/output-paths.d.ts +42 -0
- package/dist/api/compiler/output-paths.js +195 -0
- package/dist/api/compiler/package-json.d.ts +175 -0
- package/dist/api/compiler/package-json.js +1015 -0
- package/dist/api/compiler/parallel-parse.d.ts +219 -0
- package/dist/api/compiler/parallel-parse.js +537 -0
- package/dist/api/compiler/parser.d.ts +587 -0
- package/dist/api/compiler/parser.js +6407 -0
- package/dist/api/compiler/path.d.ts +91 -0
- package/dist/api/compiler/path.js +705 -0
- package/dist/api/compiler/printer/async-helpers.d.ts +22 -0
- package/dist/api/compiler/printer/async-helpers.js +91 -0
- package/dist/api/compiler/printer/auto-generate.d.ts +13 -0
- package/dist/api/compiler/printer/auto-generate.js +20 -0
- package/dist/api/compiler/printer/decorator-helpers.d.ts +24 -0
- package/dist/api/compiler/printer/decorator-helpers.js +118 -0
- package/dist/api/compiler/printer/emit-context.d.ts +154 -0
- package/dist/api/compiler/printer/emit-context.js +576 -0
- package/dist/api/compiler/printer/emit-flags.d.ts +60 -0
- package/dist/api/compiler/printer/emit-flags.js +2 -0
- package/dist/api/compiler/printer/factory-base.d.ts +171 -0
- package/dist/api/compiler/printer/factory-base.js +1505 -0
- package/dist/api/compiler/printer/factory.d.ts +147 -0
- package/dist/api/compiler/printer/factory.js +542 -0
- package/dist/api/compiler/printer/helpers.d.ts +27 -0
- package/dist/api/compiler/printer/helpers.js +164 -0
- package/dist/api/compiler/printer/name-generator.d.ts +41 -0
- package/dist/api/compiler/printer/name-generator.js +283 -0
- package/dist/api/compiler/printer/printer.d.ts +411 -0
- package/dist/api/compiler/printer/printer.js +4517 -0
- package/dist/api/compiler/printer/text-writer.d.ts +46 -0
- package/dist/api/compiler/printer/text-writer.js +172 -0
- package/dist/api/compiler/printer/utilities.d.ts +82 -0
- package/dist/api/compiler/printer/utilities.js +817 -0
- package/dist/api/compiler/program-checker.d.ts +156 -0
- package/dist/api/compiler/program-checker.js +526 -0
- package/dist/api/compiler/program-utilities.d.ts +52 -0
- package/dist/api/compiler/program-utilities.js +365 -0
- package/dist/api/compiler/program.d.ts +180 -0
- package/dist/api/compiler/program.js +1011 -0
- package/dist/api/compiler/pseudo-bigint.d.ts +5 -0
- package/dist/api/compiler/pseudo-bigint.js +61 -0
- package/dist/api/compiler/regexp-checker.d.ts +38 -0
- package/dist/api/compiler/regexp-checker.js +942 -0
- package/dist/api/compiler/relations.d.ts +263 -0
- package/dist/api/compiler/relations.js +4002 -0
- package/dist/api/compiler/reparser.d.ts +48 -0
- package/dist/api/compiler/reparser.js +1323 -0
- package/dist/api/compiler/scanner.d.ts +256 -0
- package/dist/api/compiler/scanner.js +2853 -0
- package/dist/api/compiler/side-state.d.ts +16 -0
- package/dist/api/compiler/side-state.js +89 -0
- package/dist/api/compiler/sourcemap.d.ts +55 -0
- package/dist/api/compiler/sourcemap.js +340 -0
- package/dist/api/compiler/spelling.d.ts +14 -0
- package/dist/api/compiler/spelling.js +128 -0
- package/dist/api/compiler/symbol-accessibility.d.ts +57 -0
- package/dist/api/compiler/symbol-accessibility.js +894 -0
- package/dist/api/compiler/symbol.d.ts +240 -0
- package/dist/api/compiler/symbol.js +228 -0
- package/dist/api/compiler/symlinks.d.ts +32 -0
- package/dist/api/compiler/symlinks.js +114 -0
- package/dist/api/compiler/syntax-kind.d.ts +389 -0
- package/dist/api/compiler/syntax-kind.js +2 -0
- package/dist/api/compiler/timeline.d.ts +9 -0
- package/dist/api/compiler/timeline.js +54 -0
- package/dist/api/compiler/transformers/alias-references.d.ts +39 -0
- package/dist/api/compiler/transformers/alias-references.js +676 -0
- package/dist/api/compiler/transformers/async-utilities.d.ts +51 -0
- package/dist/api/compiler/transformers/async-utilities.js +260 -0
- package/dist/api/compiler/transformers/async.d.ts +53 -0
- package/dist/api/compiler/transformers/async.js +645 -0
- package/dist/api/compiler/transformers/class-fields.d.ts +206 -0
- package/dist/api/compiler/transformers/class-fields.js +2418 -0
- package/dist/api/compiler/transformers/class-utilities.d.ts +46 -0
- package/dist/api/compiler/transformers/class-utilities.js +261 -0
- package/dist/api/compiler/transformers/commonjs-module.d.ts +103 -0
- package/dist/api/compiler/transformers/commonjs-module.js +1180 -0
- package/dist/api/compiler/transformers/const-enum-inliner.d.ts +11 -0
- package/dist/api/compiler/transformers/const-enum-inliner.js +36 -0
- package/dist/api/compiler/transformers/declarations-diagnostics.d.ts +52 -0
- package/dist/api/compiler/transformers/declarations-diagnostics.js +538 -0
- package/dist/api/compiler/transformers/declarations-pseudo.d.ts +160 -0
- package/dist/api/compiler/transformers/declarations-pseudo.js +797 -0
- package/dist/api/compiler/transformers/declarations-resolver.d.ts +152 -0
- package/dist/api/compiler/transformers/declarations-resolver.js +35 -0
- package/dist/api/compiler/transformers/declarations-syntactic.d.ts +119 -0
- package/dist/api/compiler/transformers/declarations-syntactic.js +1582 -0
- package/dist/api/compiler/transformers/declarations-tracker.d.ts +46 -0
- package/dist/api/compiler/transformers/declarations-tracker.js +197 -0
- package/dist/api/compiler/transformers/declarations.d.ts +175 -0
- package/dist/api/compiler/transformers/declarations.js +2380 -0
- package/dist/api/compiler/transformers/decorator-metadata.d.ts +54 -0
- package/dist/api/compiler/transformers/decorator-metadata.js +554 -0
- package/dist/api/compiler/transformers/decorator-utilities.d.ts +38 -0
- package/dist/api/compiler/transformers/decorator-utilities.js +238 -0
- package/dist/api/compiler/transformers/destructuring.d.ts +25 -0
- package/dist/api/compiler/transformers/destructuring.js +626 -0
- package/dist/api/compiler/transformers/downlevel.d.ts +6 -0
- package/dist/api/compiler/transformers/downlevel.js +45 -0
- package/dist/api/compiler/transformers/emit-resolver.d.ts +61 -0
- package/dist/api/compiler/transformers/emit-resolver.js +197 -0
- package/dist/api/compiler/transformers/es-decorators.d.ts +118 -0
- package/dist/api/compiler/transformers/es-decorators.js +1901 -0
- package/dist/api/compiler/transformers/exponentiation.d.ts +11 -0
- package/dist/api/compiler/transformers/exponentiation.js +76 -0
- package/dist/api/compiler/transformers/external-module-info.d.ts +35 -0
- package/dist/api/compiler/transformers/external-module-info.js +351 -0
- package/dist/api/compiler/transformers/for-await.d.ts +43 -0
- package/dist/api/compiler/transformers/for-await.js +469 -0
- package/dist/api/compiler/transformers/import-elision.d.ts +16 -0
- package/dist/api/compiler/transformers/import-elision.js +124 -0
- package/dist/api/compiler/transformers/jsx-entities.d.ts +1 -0
- package/dist/api/compiler/transformers/jsx-entities.js +256 -0
- package/dist/api/compiler/transformers/jsx.d.ts +71 -0
- package/dist/api/compiler/transformers/jsx.js +700 -0
- package/dist/api/compiler/transformers/legacy-decorators.d.ts +56 -0
- package/dist/api/compiler/transformers/legacy-decorators.js +564 -0
- package/dist/api/compiler/transformers/logical-assignment.d.ts +14 -0
- package/dist/api/compiler/transformers/logical-assignment.js +62 -0
- package/dist/api/compiler/transformers/module-utilities.d.ts +9 -0
- package/dist/api/compiler/transformers/module-utilities.js +36 -0
- package/dist/api/compiler/transformers/module.d.ts +49 -0
- package/dist/api/compiler/transformers/module.js +296 -0
- package/dist/api/compiler/transformers/named-evaluation.d.ts +26 -0
- package/dist/api/compiler/transformers/named-evaluation.js +266 -0
- package/dist/api/compiler/transformers/nullish-coalescing.d.ts +9 -0
- package/dist/api/compiler/transformers/nullish-coalescing.js +26 -0
- package/dist/api/compiler/transformers/object-rest-spread.d.ts +34 -0
- package/dist/api/compiler/transformers/object-rest-spread.js +411 -0
- package/dist/api/compiler/transformers/optional-catch.d.ts +9 -0
- package/dist/api/compiler/transformers/optional-catch.js +20 -0
- package/dist/api/compiler/transformers/optional-chain.d.ts +14 -0
- package/dist/api/compiler/transformers/optional-chain.js +188 -0
- package/dist/api/compiler/transformers/reference-resolver.d.ts +128 -0
- package/dist/api/compiler/transformers/reference-resolver.js +1155 -0
- package/dist/api/compiler/transformers/runtime-syntax.d.ts +71 -0
- package/dist/api/compiler/transformers/runtime-syntax.js +753 -0
- package/dist/api/compiler/transformers/subtree-facts.d.ts +9 -0
- package/dist/api/compiler/transformers/subtree-facts.js +203 -0
- package/dist/api/compiler/transformers/syntax-facts.d.ts +51 -0
- package/dist/api/compiler/transformers/syntax-facts.js +254 -0
- package/dist/api/compiler/transformers/tagged-template.d.ts +17 -0
- package/dist/api/compiler/transformers/tagged-template.js +148 -0
- package/dist/api/compiler/transformers/transformer.d.ts +17 -0
- package/dist/api/compiler/transformers/transformer.js +54 -0
- package/dist/api/compiler/transformers/type-eraser.d.ts +21 -0
- package/dist/api/compiler/transformers/type-eraser.js +346 -0
- package/dist/api/compiler/transformers/type-serialization.d.ts +20 -0
- package/dist/api/compiler/transformers/type-serialization.js +347 -0
- package/dist/api/compiler/transformers/using.d.ts +56 -0
- package/dist/api/compiler/transformers/using.js +453 -0
- package/dist/api/compiler/transformers/utilities.d.ts +50 -0
- package/dist/api/compiler/transformers/utilities.js +347 -0
- package/dist/api/compiler/transformers/visitor-base.d.ts +6 -0
- package/dist/api/compiler/transformers/visitor-base.js +817 -0
- package/dist/api/compiler/transformers/visitor-hooks.d.ts +29 -0
- package/dist/api/compiler/transformers/visitor-hooks.js +189 -0
- package/dist/api/compiler/tsconfig.d.ts +177 -0
- package/dist/api/compiler/tsconfig.js +1311 -0
- package/dist/api/compiler/type-printer.d.ts +15 -0
- package/dist/api/compiler/type-printer.js +74 -0
- package/dist/api/compiler/types.d.ts +87 -0
- package/dist/api/compiler/types.js +23 -0
- package/dist/api/compiler/unicode-identifiers.d.ts +2 -0
- package/dist/api/compiler/unicode-identifiers.js +209 -0
- package/dist/api/compiler/unicode-properties.d.ts +8 -0
- package/dist/api/compiler/unicode-properties.js +531 -0
- package/dist/api/compiler/vfs-match.d.ts +24 -0
- package/dist/api/compiler/vfs-match.js +587 -0
- package/dist/api/library/ast.d.ts +74 -0
- package/dist/api/library/ast.generated.d.ts +1145 -0
- package/dist/api/library/ast.generated.js +3 -0
- package/dist/api/library/ast.js +5 -0
- package/dist/api/library/checker.d.ts +51 -0
- package/dist/api/library/checker.js +318 -0
- package/dist/api/library/compiler-options.generated.d.ts +108 -0
- package/dist/api/library/compiler-options.generated.js +3 -0
- package/dist/api/library/diagnostics.d.ts +13 -0
- package/dist/api/library/diagnostics.js +50 -0
- package/dist/api/library/disk.d.ts +13 -0
- package/dist/api/library/disk.js +66 -0
- package/dist/api/library/enums.generated.d.ts +891 -0
- package/dist/api/library/enums.generated.js +916 -0
- package/dist/api/library/errors.d.ts +13 -0
- package/dist/api/library/errors.js +24 -0
- package/dist/api/library/host.d.ts +24 -0
- package/dist/api/library/host.js +52 -0
- package/dist/api/library/index.d.ts +14 -0
- package/dist/api/library/index.js +15 -0
- package/dist/api/library/nodes.d.ts +51 -0
- package/dist/api/library/nodes.js +196 -0
- package/dist/api/library/options.d.ts +144 -0
- package/dist/api/library/options.js +308 -0
- package/dist/api/library/parse.d.ts +19 -0
- package/dist/api/library/parse.js +41 -0
- package/dist/api/library/program.d.ts +21 -0
- package/dist/api/library/program.js +234 -0
- package/dist/api/library/symbols.d.ts +8 -0
- package/dist/api/library/symbols.js +11 -0
- package/dist/api/library/types.d.ts +313 -0
- package/dist/api/library/types.js +6 -0
- package/package.json +22 -8
- package/src/compiler/ast-utilities.ts +548 -0
- package/src/compiler/ast.ts +12862 -0
- package/src/compiler/astnav.ts +799 -0
- package/src/compiler/binder-utilities.ts +1392 -0
- package/src/compiler/binder.ts +2703 -0
- package/src/compiler/build-info.ts +1197 -0
- package/src/compiler/character-codes.ts +323 -0
- package/src/compiler/checker-calls.ts +2155 -0
- package/src/compiler/checker-classes.ts +706 -0
- package/src/compiler/checker-contextual.ts +1457 -0
- package/src/compiler/checker-declaration-order.ts +438 -0
- package/src/compiler/checker-declarations.ts +1194 -0
- package/src/compiler/checker-declared-types.ts +919 -0
- package/src/compiler/checker-decorators.ts +694 -0
- package/src/compiler/checker-deprecation.ts +359 -0
- package/src/compiler/checker-destructuring.ts +805 -0
- package/src/compiler/checker-elaboration.ts +477 -0
- package/src/compiler/checker-emit-helpers.ts +224 -0
- package/src/compiler/checker-emit-resolver.ts +769 -0
- package/src/compiler/checker-evaluator.ts +243 -0
- package/src/compiler/checker-expressions.ts +1831 -0
- package/src/compiler/checker-features.ts +361 -0
- package/src/compiler/checker-flow.ts +394 -0
- package/src/compiler/checker-functions.ts +1296 -0
- package/src/compiler/checker-generated-code.ts +227 -0
- package/src/compiler/checker-globals.ts +52 -0
- package/src/compiler/checker-grammar.ts +3584 -0
- package/src/compiler/checker-heritage.ts +1233 -0
- package/src/compiler/checker-inference.ts +2576 -0
- package/src/compiler/checker-iteration.ts +1206 -0
- package/src/compiler/checker-javascript.ts +502 -0
- package/src/compiler/checker-jsdoc.ts +360 -0
- package/src/compiler/checker-jsx.ts +1924 -0
- package/src/compiler/checker-literals.ts +61 -0
- package/src/compiler/checker-members.ts +2436 -0
- package/src/compiler/checker-modules.ts +2886 -0
- package/src/compiler/checker-narrowing.ts +3230 -0
- package/src/compiler/checker-object-literals.ts +575 -0
- package/src/compiler/checker-operators.ts +1422 -0
- package/src/compiler/checker-overloads.ts +328 -0
- package/src/compiler/checker-property-access.ts +906 -0
- package/src/compiler/checker-services.ts +1149 -0
- package/src/compiler/checker-signatures.ts +1032 -0
- package/src/compiler/checker-source-file.ts +732 -0
- package/src/compiler/checker-statements.ts +292 -0
- package/src/compiler/checker-super.ts +261 -0
- package/src/compiler/checker-symbol-types.ts +2107 -0
- package/src/compiler/checker-symbols.ts +2150 -0
- package/src/compiler/checker-type-factory.ts +2579 -0
- package/src/compiler/checker-type-nodes.ts +1033 -0
- package/src/compiler/checker-type-operators.ts +2502 -0
- package/src/compiler/checker-types.ts +2340 -0
- package/src/compiler/checker-unused.ts +642 -0
- package/src/compiler/checker-utilities.ts +161 -0
- package/src/compiler/checker.ts +1116 -0
- package/src/compiler/command-line.ts +436 -0
- package/src/compiler/compile-program.ts +439 -0
- package/src/compiler/decoder.ts +1209 -0
- package/src/compiler/diagnostic-locales.ts +86 -0
- package/src/compiler/diagnostic-messages.ts +2349 -0
- package/src/compiler/diagnostics.ts +897 -0
- package/src/compiler/emitter.ts +434 -0
- package/src/compiler/encoder.ts +1945 -0
- package/src/compiler/file-include.ts +673 -0
- package/src/compiler/file-loader.ts +1528 -0
- package/src/compiler/file-system.ts +143 -0
- package/src/compiler/flow.ts +89 -0
- package/src/compiler/help.ts +473 -0
- package/src/compiler/incremental.ts +2784 -0
- package/src/compiler/init.ts +141 -0
- package/src/compiler/instantiation.ts +894 -0
- package/src/compiler/jsdoc.ts +1386 -0
- package/src/compiler/link-tables.ts +98 -0
- package/src/compiler/locale-data.ts +203 -0
- package/src/compiler/locale.ts +307 -0
- package/src/compiler/locales/cs-CZ.ts +5 -0
- package/src/compiler/locales/de-DE.ts +5 -0
- package/src/compiler/locales/es-ES.ts +5 -0
- package/src/compiler/locales/fr-FR.ts +5 -0
- package/src/compiler/locales/it-IT.ts +5 -0
- package/src/compiler/locales/ja-JP.ts +5 -0
- package/src/compiler/locales/ko-KR.ts +5 -0
- package/src/compiler/locales/pl-PL.ts +5 -0
- package/src/compiler/locales/pt-BR.ts +5 -0
- package/src/compiler/locales/ru-RU.ts +5 -0
- package/src/compiler/locales/tr-TR.ts +5 -0
- package/src/compiler/locales/zh-CN.ts +5 -0
- package/src/compiler/locales/zh-TW.ts +5 -0
- package/src/compiler/module-resolution-types.ts +243 -0
- package/src/compiler/module-resolution.ts +2072 -0
- package/src/compiler/module-specifiers.ts +1491 -0
- package/src/compiler/name-resolver.ts +646 -0
- package/src/compiler/node-builder-names.ts +1069 -0
- package/src/compiler/node-builder-pseudo.ts +892 -0
- package/src/compiler/node-builder-reuse.ts +764 -0
- package/src/compiler/node-builder.ts +3425 -0
- package/src/compiler/option-declarations.ts +1560 -0
- package/src/compiler/options.ts +1576 -0
- package/src/compiler/output-paths.ts +334 -0
- package/src/compiler/package-json.ts +1083 -0
- package/src/compiler/parallel-check.ts +1951 -0
- package/src/compiler/parallel-parse.ts +590 -0
- package/src/compiler/parse-thread.ts +140 -0
- package/src/compiler/parser.ts +7716 -0
- package/src/compiler/path.ts +717 -0
- package/src/compiler/printer/async-helpers.ts +183 -0
- package/src/compiler/printer/auto-generate.ts +27 -0
- package/src/compiler/printer/decorator-helpers.ts +218 -0
- package/src/compiler/printer/emit-context.ts +679 -0
- package/src/compiler/printer/emit-flags.ts +64 -0
- package/src/compiler/printer/factory-base.ts +2577 -0
- package/src/compiler/printer/factory.ts +764 -0
- package/src/compiler/printer/helpers.ts +291 -0
- package/src/compiler/printer/name-generator.ts +372 -0
- package/src/compiler/printer/printer.ts +5072 -0
- package/src/compiler/printer/text-writer.ts +183 -0
- package/src/compiler/printer/utilities.ts +884 -0
- package/src/compiler/program-checker.ts +592 -0
- package/src/compiler/program-utilities.ts +435 -0
- package/src/compiler/program.ts +1419 -0
- package/src/compiler/pseudo-bigint.ts +62 -0
- package/src/compiler/regexp-checker.ts +1142 -0
- package/src/compiler/relations.ts +5149 -0
- package/src/compiler/reparser.ts +1566 -0
- package/src/compiler/scanner.ts +2951 -0
- package/src/compiler/show-config.ts +239 -0
- package/src/compiler/side-state.ts +125 -0
- package/src/compiler/sourcemap.ts +366 -0
- package/src/compiler/spelling.ts +122 -0
- package/src/compiler/symbol-accessibility.ts +1071 -0
- package/src/compiler/symbol.ts +439 -0
- package/src/compiler/symlinks.ts +137 -0
- package/src/compiler/syntax-kind.ts +391 -0
- package/src/compiler/thread-entry.ts +191 -0
- package/src/compiler/timeline.ts +53 -0
- package/src/compiler/transformers/alias-references.ts +757 -0
- package/src/compiler/transformers/async-utilities.ts +335 -0
- package/src/compiler/transformers/async.ts +838 -0
- package/src/compiler/transformers/class-fields.ts +2967 -0
- package/src/compiler/transformers/class-utilities.ts +324 -0
- package/src/compiler/transformers/commonjs-module.ts +1621 -0
- package/src/compiler/transformers/const-enum-inliner.ts +50 -0
- package/src/compiler/transformers/declarations-diagnostics.ts +832 -0
- package/src/compiler/transformers/declarations-pseudo.ts +966 -0
- package/src/compiler/transformers/declarations-resolver.ts +249 -0
- package/src/compiler/transformers/declarations-syntactic.ts +1859 -0
- package/src/compiler/transformers/declarations-tracker.ts +269 -0
- package/src/compiler/transformers/declarations.ts +3120 -0
- package/src/compiler/transformers/decorator-metadata.ts +697 -0
- package/src/compiler/transformers/decorator-utilities.ts +283 -0
- package/src/compiler/transformers/destructuring.ts +708 -0
- package/src/compiler/transformers/downlevel.ts +50 -0
- package/src/compiler/transformers/emit-resolver.ts +258 -0
- package/src/compiler/transformers/es-decorators.ts +2682 -0
- package/src/compiler/transformers/exponentiation.ts +80 -0
- package/src/compiler/transformers/external-module-info.ts +412 -0
- package/src/compiler/transformers/for-await.ts +687 -0
- package/src/compiler/transformers/import-elision.ts +152 -0
- package/src/compiler/transformers/jsx-entities.ts +256 -0
- package/src/compiler/transformers/jsx.ts +824 -0
- package/src/compiler/transformers/legacy-decorators.ts +726 -0
- package/src/compiler/transformers/logical-assignment.ts +75 -0
- package/src/compiler/transformers/module-utilities.ts +42 -0
- package/src/compiler/transformers/module.ts +474 -0
- package/src/compiler/transformers/named-evaluation.ts +389 -0
- package/src/compiler/transformers/nullish-coalescing.ts +35 -0
- package/src/compiler/transformers/object-rest-spread.ts +577 -0
- package/src/compiler/transformers/optional-catch.ts +29 -0
- package/src/compiler/transformers/optional-chain.ts +246 -0
- package/src/compiler/transformers/reference-resolver.ts +1201 -0
- package/src/compiler/transformers/runtime-syntax.ts +942 -0
- package/src/compiler/transformers/subtree-facts.ts +245 -0
- package/src/compiler/transformers/syntax-facts.ts +353 -0
- package/src/compiler/transformers/tagged-template.ts +167 -0
- package/src/compiler/transformers/transformer.ts +56 -0
- package/src/compiler/transformers/type-eraser.ts +520 -0
- package/src/compiler/transformers/type-serialization.ts +374 -0
- package/src/compiler/transformers/using.ts +613 -0
- package/src/compiler/transformers/utilities.ts +419 -0
- package/src/compiler/transformers/visitor-base.ts +1601 -0
- package/src/compiler/transformers/visitor-hooks.ts +252 -0
- package/src/compiler/tsc-build.ts +1418 -0
- package/src/compiler/tsc-cli.ts +666 -0
- package/src/compiler/tsc-compile.ts +437 -0
- package/src/compiler/tsc-watch.ts +854 -0
- package/src/compiler/tsconfig.ts +1574 -0
- package/src/compiler/type-printer.ts +110 -0
- package/src/compiler/types.ts +115 -0
- package/src/compiler/unicode-identifiers.ts +212 -0
- package/src/compiler/unicode-properties.ts +537 -0
- package/src/compiler/vfs-match.ts +597 -0
- package/src/compiler/xxh3.ts +650 -0
- package/src/library/ast.generated.ts +1685 -0
- package/src/library/ast.ts +104 -0
- package/src/library/checker.ts +384 -0
- package/src/library/compiler-options.generated.ts +114 -0
- package/src/library/diagnostics.ts +72 -0
- package/src/library/disk.ts +73 -0
- package/src/library/enums.generated.ts +1024 -0
- package/src/library/errors.ts +26 -0
- package/src/library/host.ts +63 -0
- package/src/library/index.ts +71 -0
- package/src/library/nodes.ts +232 -0
- package/src/library/options.ts +449 -0
- package/src/library/parse.ts +63 -0
- package/src/library/program.ts +293 -0
- package/src/library/symbols.ts +15 -0
- package/src/library/types.ts +359 -0
|
@@ -0,0 +1,1027 @@
|
|
|
1
|
+
import type { ProgramLifetime } from '@scriptc/types';
|
|
2
|
+
import type { Node } from './ast.js';
|
|
3
|
+
import { type Symbol, type SymbolTable } from './symbol.js';
|
|
4
|
+
export declare const enum TypeFlags {
|
|
5
|
+
None = 0,
|
|
6
|
+
Any = 1,
|
|
7
|
+
Unknown = 2,
|
|
8
|
+
Undefined = 4,
|
|
9
|
+
Null = 8,
|
|
10
|
+
Void = 16,
|
|
11
|
+
String = 32,
|
|
12
|
+
Number = 64,
|
|
13
|
+
BigInt = 128,
|
|
14
|
+
Boolean = 256,
|
|
15
|
+
ESSymbol = 512,
|
|
16
|
+
StringLiteral = 1024,
|
|
17
|
+
NumberLiteral = 2048,
|
|
18
|
+
BigIntLiteral = 4096,
|
|
19
|
+
BooleanLiteral = 8192,
|
|
20
|
+
UniqueESSymbol = 16384,
|
|
21
|
+
/** Always combined with StringLiteral, NumberLiteral, or Union. */
|
|
22
|
+
EnumLiteral = 32768,
|
|
23
|
+
/** A numeric enum member with a computed value. */
|
|
24
|
+
Enum = 65536,
|
|
25
|
+
NonPrimitive = 131072,
|
|
26
|
+
Never = 262144,
|
|
27
|
+
TypeParameter = 524288,
|
|
28
|
+
Object = 1048576,
|
|
29
|
+
Index = 2097152,
|
|
30
|
+
TemplateLiteral = 4194304,
|
|
31
|
+
StringMapping = 8388608,
|
|
32
|
+
Substitution = 16777216,
|
|
33
|
+
IndexedAccess = 33554432,
|
|
34
|
+
Conditional = 67108864,
|
|
35
|
+
Union = 134217728,
|
|
36
|
+
Intersection = 268435456,
|
|
37
|
+
Reserved1 = 536870912,
|
|
38
|
+
Reserved2 = 1073741824,
|
|
39
|
+
AnyOrUnknown = 3,
|
|
40
|
+
Nullable = 12,
|
|
41
|
+
Literal = 15360,
|
|
42
|
+
Unit = 97292,
|
|
43
|
+
Freshable = 80896,
|
|
44
|
+
StringOrNumberLiteral = 3072,
|
|
45
|
+
StringOrNumberLiteralOrUnique = 19456,
|
|
46
|
+
DefinitelyFalsy = 15388,
|
|
47
|
+
PossiblyFalsy = 15868,
|
|
48
|
+
Intrinsic = 393983,
|
|
49
|
+
StringLike = 12583968,
|
|
50
|
+
NumberLike = 67648,
|
|
51
|
+
BigIntLike = 4224,
|
|
52
|
+
BooleanLike = 8448,
|
|
53
|
+
EnumLike = 98304,
|
|
54
|
+
ESSymbolLike = 16896,
|
|
55
|
+
VoidLike = 20,
|
|
56
|
+
Primitive = 12713980,
|
|
57
|
+
DefinitelyNonNullable = 13893600,
|
|
58
|
+
DisjointDomains = 12812284,
|
|
59
|
+
UnionOrIntersection = 402653184,
|
|
60
|
+
StructuredType = 403701760,
|
|
61
|
+
TypeVariable = 34078720,
|
|
62
|
+
InstantiableNonPrimitive = 117964800,
|
|
63
|
+
InstantiablePrimitive = 14680064,
|
|
64
|
+
Instantiable = 132644864,
|
|
65
|
+
StructuredOrInstantiable = 536346624,
|
|
66
|
+
ObjectFlagsType = 403963917,
|
|
67
|
+
Simplifiable = 102760448,
|
|
68
|
+
Singleton = 394239,
|
|
69
|
+
/** Types where narrowing actually narrows. */
|
|
70
|
+
Narrowable = 536575971,
|
|
71
|
+
/** Aggregated during union and intersection construction. */
|
|
72
|
+
IncludesMask = 416808959,
|
|
73
|
+
IncludesMissingType = 524288,
|
|
74
|
+
IncludesNonWideningType = 2097152,
|
|
75
|
+
IncludesWildcard = 33554432,
|
|
76
|
+
IncludesEmptyObject = 67108864,
|
|
77
|
+
IncludesInstantiable = 16777216,
|
|
78
|
+
IncludesConstrainedTypeVariable = 536870912,
|
|
79
|
+
IncludesError = 1073741824,
|
|
80
|
+
NotPrimitiveUnion = 286523411
|
|
81
|
+
}
|
|
82
|
+
/** The sign bit, which TypeScript enums can't hold as a positive flag. */
|
|
83
|
+
export declare const typeFlagsReserved3 = -2147483648;
|
|
84
|
+
export declare const enum ObjectFlags {
|
|
85
|
+
None = 0,
|
|
86
|
+
Class = 1,
|
|
87
|
+
Interface = 2,
|
|
88
|
+
/** A generic type reference. */
|
|
89
|
+
Reference = 4,
|
|
90
|
+
Tuple = 8,
|
|
91
|
+
Anonymous = 16,
|
|
92
|
+
Mapped = 32,
|
|
93
|
+
/** An instantiated anonymous or mapped type. */
|
|
94
|
+
Instantiated = 64,
|
|
95
|
+
ObjectLiteral = 128,
|
|
96
|
+
EvolvingArray = 256,
|
|
97
|
+
ObjectLiteralPatternWithComputedProperties = 512,
|
|
98
|
+
ReverseMapped = 1024,
|
|
99
|
+
JsxAttributes = 2048,
|
|
100
|
+
/** Declared in JS: reads and writes of missing members are allowed. */
|
|
101
|
+
JSLiteral = 4096,
|
|
102
|
+
FreshLiteral = 8192,
|
|
103
|
+
ArrayLiteral = 16384,
|
|
104
|
+
PrimitiveUnion = 32768,
|
|
105
|
+
ContainsWideningType = 65536,
|
|
106
|
+
ContainsObjectOrArrayLiteral = 131072,
|
|
107
|
+
/** Is or contains anyFunctionType or silentNeverType. */
|
|
108
|
+
NonInferrableType = 262144,
|
|
109
|
+
CouldContainTypeVariablesComputed = 524288,
|
|
110
|
+
CouldContainTypeVariables = 1048576,
|
|
111
|
+
MembersResolved = 2097152,
|
|
112
|
+
ClassOrInterface = 3,
|
|
113
|
+
RequiresWidening = 196608,
|
|
114
|
+
PropagatingFlags = 458752,
|
|
115
|
+
InstantiatedMapped = 96,
|
|
116
|
+
ContainsSpread = 4194304,
|
|
117
|
+
ObjectRestType = 8388608,
|
|
118
|
+
InstantiationExpressionType = 16777216,
|
|
119
|
+
SingleSignatureType = 33554432,
|
|
120
|
+
IsClassInstanceClone = 67108864,
|
|
121
|
+
IdenticalBaseTypeCalculated = 134217728,
|
|
122
|
+
IdenticalBaseTypeExists = 268435456,
|
|
123
|
+
UnresolvedMembers = 536870912,
|
|
124
|
+
FromTypeNode = 1073741824,
|
|
125
|
+
/**
|
|
126
|
+
* The type keeps the state that is computed lazily in the checker's side tables instead of its
|
|
127
|
+
* own fields, which stay unset (`sideOf`). Every type with `TSC_TS_SIDE_STATE=1`.
|
|
128
|
+
*/
|
|
129
|
+
SideState = -2147483648,
|
|
130
|
+
IsGenericTypeComputed = 4194304,
|
|
131
|
+
IsGenericObjectType = 8388608,
|
|
132
|
+
IsGenericIndexType = 16777216,
|
|
133
|
+
IsGenericType = 25165824,
|
|
134
|
+
ContainsIntersections = 33554432,
|
|
135
|
+
IsUnknownLikeUnionComputed = 67108864,
|
|
136
|
+
IsUnknownLikeUnion = 134217728,
|
|
137
|
+
IsNeverIntersectionComputed = 33554432,
|
|
138
|
+
IsNeverIntersection = 67108864,
|
|
139
|
+
IsConstrainedTypeVariable = 134217728,
|
|
140
|
+
ObjectTypeKindMask = 50332991
|
|
141
|
+
}
|
|
142
|
+
export declare const enum ElementFlags {
|
|
143
|
+
None = 0,
|
|
144
|
+
Required = 1,
|
|
145
|
+
Optional = 2,
|
|
146
|
+
Rest = 4,
|
|
147
|
+
Variadic = 8,
|
|
148
|
+
Fixed = 3,
|
|
149
|
+
Variable = 12,
|
|
150
|
+
NonRequired = 14,
|
|
151
|
+
NonRest = 11
|
|
152
|
+
}
|
|
153
|
+
export declare const enum SignatureFlags {
|
|
154
|
+
None = 0,
|
|
155
|
+
HasRestParameter = 1,
|
|
156
|
+
HasLiteralTypes = 2,
|
|
157
|
+
Construct = 4,
|
|
158
|
+
Abstract = 8,
|
|
159
|
+
IsInnerCallChain = 16,
|
|
160
|
+
IsOuterCallChain = 32,
|
|
161
|
+
IsUntypedSignatureInJSFile = 64,
|
|
162
|
+
IsNonInferrable = 128,
|
|
163
|
+
IsSignatureCandidateForOverloadFailure = 256,
|
|
164
|
+
/** The signature keeps its lazily computed state in the checker's side tables (`signatureSideOf`). */
|
|
165
|
+
SideState = 512,
|
|
166
|
+
PropagatingFlags = 335,
|
|
167
|
+
CallChainFlags = 48
|
|
168
|
+
}
|
|
169
|
+
export declare const enum SignatureKind {
|
|
170
|
+
Call = 0,
|
|
171
|
+
Construct = 1
|
|
172
|
+
}
|
|
173
|
+
export declare const enum IndexFlags {
|
|
174
|
+
None = 0,
|
|
175
|
+
StringsOnly = 1,
|
|
176
|
+
NoIndexSignatures = 2,
|
|
177
|
+
NoReducibleCheck = 4
|
|
178
|
+
}
|
|
179
|
+
export declare const enum AccessFlags {
|
|
180
|
+
None = 0,
|
|
181
|
+
IncludeUndefined = 1,
|
|
182
|
+
NoIndexSignatures = 2,
|
|
183
|
+
Writing = 4,
|
|
184
|
+
CacheSymbol = 8,
|
|
185
|
+
AllowMissing = 16,
|
|
186
|
+
ExpressionPosition = 32,
|
|
187
|
+
ReportDeprecated = 64,
|
|
188
|
+
SuppressNoImplicitAnyError = 128,
|
|
189
|
+
Contextual = 256,
|
|
190
|
+
Persistent = 1
|
|
191
|
+
}
|
|
192
|
+
export declare const enum VarianceFlags {
|
|
193
|
+
Invariant = 0,
|
|
194
|
+
Covariant = 1,
|
|
195
|
+
Contravariant = 2,
|
|
196
|
+
Bivariant = 3,
|
|
197
|
+
/** An unwitnessed type parameter. */
|
|
198
|
+
Independent = 4,
|
|
199
|
+
VarianceMask = 7,
|
|
200
|
+
/** Relies on structural comparisons not reflected in generic relationships. */
|
|
201
|
+
Unmeasurable = 8,
|
|
202
|
+
/** May produce false negatives, never false positives. */
|
|
203
|
+
Unreliable = 16,
|
|
204
|
+
AllowsStructuralFallback = 24
|
|
205
|
+
}
|
|
206
|
+
/** `x & y` picks the lesser in False < Unknown < Maybe < True; `x | y` the greater. */
|
|
207
|
+
export declare const enum Ternary {
|
|
208
|
+
False = 0,
|
|
209
|
+
Unknown = 1,
|
|
210
|
+
Maybe = 3,
|
|
211
|
+
True = -1
|
|
212
|
+
}
|
|
213
|
+
export declare const enum TypePredicateKind {
|
|
214
|
+
This = 0,
|
|
215
|
+
Identifier = 1,
|
|
216
|
+
AssertsThis = 2,
|
|
217
|
+
AssertsIdentifier = 3
|
|
218
|
+
}
|
|
219
|
+
export declare const enum NodeCheckFlags {
|
|
220
|
+
None = 0,
|
|
221
|
+
TypeChecked = 1,
|
|
222
|
+
UnusedChecked = 2,
|
|
223
|
+
ContextChecked = 64,
|
|
224
|
+
EnumValuesComputed = 1024,
|
|
225
|
+
AssignmentsMarked = 131072,
|
|
226
|
+
ContainsClassWithPrivateIdentifiers = 1048576,
|
|
227
|
+
ContainsSuperPropertyInStaticInitializer = 2097152,
|
|
228
|
+
InCheckIdentifier = 4194304,
|
|
229
|
+
InitializerIsUndefined = 16777216,
|
|
230
|
+
InitializerIsUndefinedComputed = 33554432
|
|
231
|
+
}
|
|
232
|
+
export declare const enum CheckMode {
|
|
233
|
+
Normal = 0,
|
|
234
|
+
Contextual = 1,
|
|
235
|
+
Inferential = 2,
|
|
236
|
+
SkipContextSensitive = 4,
|
|
237
|
+
SkipGenericFunctions = 8,
|
|
238
|
+
IsForSignatureHelp = 16,
|
|
239
|
+
RestBindingElement = 32,
|
|
240
|
+
TypeOnly = 64,
|
|
241
|
+
ForceTuple = 128
|
|
242
|
+
}
|
|
243
|
+
export declare const enum TypeFormatFlags {
|
|
244
|
+
None = 0,
|
|
245
|
+
NoTruncation = 1,
|
|
246
|
+
WriteArrayAsGenericType = 2,
|
|
247
|
+
UseStructuralFallback = 8,
|
|
248
|
+
WriteTypeArgumentsOfSignature = 32,
|
|
249
|
+
UseFullyQualifiedType = 64,
|
|
250
|
+
SuppressAnyReturnType = 256,
|
|
251
|
+
MultilineObjectLiterals = 1024,
|
|
252
|
+
WriteClassExpressionAsTypeLiteral = 2048,
|
|
253
|
+
UseTypeOfFunction = 4096,
|
|
254
|
+
OmitParameterModifiers = 8192,
|
|
255
|
+
UseAliasDefinedOutsideCurrentScope = 16384,
|
|
256
|
+
AllowUniqueESSymbolType = 1048576,
|
|
257
|
+
AddUndefined = 131072,
|
|
258
|
+
WriteArrowStyleSignature = 262144,
|
|
259
|
+
InArrayType = 524288,
|
|
260
|
+
InElementType = 2097152,
|
|
261
|
+
InFirstTypeArgument = 4194304,
|
|
262
|
+
InTypeAlias = 8388608,
|
|
263
|
+
OmitThisParameter = 33554432,
|
|
264
|
+
WriteCallStyleSignature = 134217728,
|
|
265
|
+
UseSingleQuotesForStringLiteralType = 268435456,
|
|
266
|
+
NoTypeReduction = 536870912
|
|
267
|
+
}
|
|
268
|
+
/** Kinds of the checker's `cachedTypesById` entries, which are keyed by kind and type id (tsgo's CachedTypeKey). */
|
|
269
|
+
export declare const enum CachedTypeKind {
|
|
270
|
+
LiteralUnionBaseType = 0,
|
|
271
|
+
IndexType = 1,
|
|
272
|
+
StringIndexType = 2,
|
|
273
|
+
EquivalentBaseType = 3,
|
|
274
|
+
Apparent = 4,
|
|
275
|
+
Awaited = 5,
|
|
276
|
+
EvolvingArray = 6,
|
|
277
|
+
ArrayLiteral = 7,
|
|
278
|
+
PermissiveInstantiation = 8,
|
|
279
|
+
RestrictiveInstantiation = 9,
|
|
280
|
+
RestrictiveTypeParameter = 10,
|
|
281
|
+
IndexedAccessForReading = 11,
|
|
282
|
+
IndexedAccessForWriting = 12,
|
|
283
|
+
Widened = 13,
|
|
284
|
+
RegularObjectLiteral = 14,
|
|
285
|
+
PromisedTypeOfPromise = 15,
|
|
286
|
+
Optional = 16,
|
|
287
|
+
OptionalProperty = 17
|
|
288
|
+
}
|
|
289
|
+
export declare function cachedTypeKey(kind: CachedTypeKind, id: number): number;
|
|
290
|
+
/** The `cachedTypesByPair` key of two type ids and four bits, or -1 when an id is too large to pack. */
|
|
291
|
+
export declare function cachedTypePairKey(a: number, b: number, bits: number): number;
|
|
292
|
+
/** An alias symbol and its type arguments, for types written through a type alias. */
|
|
293
|
+
export declare class TypeAlias {
|
|
294
|
+
readonly symbol: Symbol;
|
|
295
|
+
readonly typeArguments: Type[];
|
|
296
|
+
constructor(symbol: Symbol, typeArguments: Type[]);
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Values keyed by a list of types, an optional alias and a small tag: the keys `typeListKey(types) +
|
|
300
|
+
* aliasKey(alias)` plus a suffix spelled, without building them. A lookup takes a number hashing the
|
|
301
|
+
* parts (`typeListHash`); entries keep their parts, so a match is exact and keys sharing a hash chain.
|
|
302
|
+
* Like tsgo's hashed type list keys. A list must not change after it keys an entry.
|
|
303
|
+
*/
|
|
304
|
+
export declare class TypeListCache<V> {
|
|
305
|
+
private readonly entries;
|
|
306
|
+
get(hash: number, types: readonly Type[], alias: TypeAlias | undefined, tag: number): V | undefined;
|
|
307
|
+
set(hash: number, types: readonly Type[], alias: TypeAlias | undefined, tag: number, value: V): void;
|
|
308
|
+
clear(): void;
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* The references to a generic class, interface or tuple type, by the hash of their type arguments
|
|
312
|
+
* (`createTypeReference`). A reference is its own entry: a lookup compares its type arguments. A
|
|
313
|
+
* reference whose hash another reference has is kept in `collisions`.
|
|
314
|
+
*/
|
|
315
|
+
export declare class ReferenceCache {
|
|
316
|
+
private readonly references;
|
|
317
|
+
private collisions;
|
|
318
|
+
get(hash: number, typeArguments: readonly Type[]): TypeReference | undefined;
|
|
319
|
+
/** Adds `reference`, whose type arguments `get` did not find. */
|
|
320
|
+
add(hash: number, reference: TypeReference): void;
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Fields that few types set, kept out of line in `Type.extra`, which is created on the first write
|
|
324
|
+
* of a value other than the field's default. A type then costs one slot for all of them. Each field
|
|
325
|
+
* is read and written through an accessor of the type class it belongs to, which returns the
|
|
326
|
+
* default while the type has no extra fields. Rare fields that hot paths read stay inline (the
|
|
327
|
+
* alias, construct signatures): a native accessor returns an owned reference, which costs reference
|
|
328
|
+
* counting on every read of a counted value.
|
|
329
|
+
*/
|
|
330
|
+
export declare class TypeExtra implements ProgramLifetime {
|
|
331
|
+
objectTypeWithoutAbstractConstructSignatures: Type | undefined;
|
|
332
|
+
instantiations: TypeListCache<Type> | undefined;
|
|
333
|
+
node: Node | undefined;
|
|
334
|
+
resolvedReducedType: Type | undefined;
|
|
335
|
+
regularType: Type | undefined;
|
|
336
|
+
origin: Type | undefined;
|
|
337
|
+
keyPropertyName: string;
|
|
338
|
+
constituentMap: Map<Type, Type> | undefined;
|
|
339
|
+
constituentSet: Set<Type> | undefined;
|
|
340
|
+
membershipTests: number;
|
|
341
|
+
uniqueLiteralFilledInstantiation: Type | undefined;
|
|
342
|
+
constructor();
|
|
343
|
+
}
|
|
344
|
+
/** The extra fields of `t`, created if it has none yet. */
|
|
345
|
+
export declare function typeExtra(t: Type): TypeExtra;
|
|
346
|
+
/**
|
|
347
|
+
* The base of every type. Narrow by `flags` (and `objectFlags` for object types), then cast to
|
|
348
|
+
* the subclass, as tsgo does with `AsUnionType()` etc.
|
|
349
|
+
*/
|
|
350
|
+
/**
|
|
351
|
+
* `TSC_TS_SIDE_STATE=1` (a test of the side tables): every type and signature keeps its lazily
|
|
352
|
+
* computed state in the checker's side tables (`ObjectFlags.SideState`, `SignatureFlags.SideState`).
|
|
353
|
+
*/
|
|
354
|
+
export declare const sideStateForAll: boolean;
|
|
355
|
+
/**
|
|
356
|
+
* What the methods of types that tsc-ts's public API calls need from the checker that created the type
|
|
357
|
+
* (`InterfaceType.checking`, `ConditionalType.checking`); the Checker implements it.
|
|
358
|
+
*/
|
|
359
|
+
export interface TypeChecking {
|
|
360
|
+
baseTypesOf(t: InterfaceType): readonly Type[];
|
|
361
|
+
trueTypeOf(t: ConditionalType): Type;
|
|
362
|
+
falseTypeOf(t: ConditionalType): Type;
|
|
363
|
+
}
|
|
364
|
+
export declare class Type implements ProgramLifetime {
|
|
365
|
+
flags: TypeFlags;
|
|
366
|
+
objectFlags: ObjectFlags;
|
|
367
|
+
readonly id: number;
|
|
368
|
+
symbol: Symbol | undefined;
|
|
369
|
+
alias: TypeAlias | undefined;
|
|
370
|
+
/** For types with a computed base constraint (type variables, structured types, …). */
|
|
371
|
+
resolvedBaseConstraint: Type | undefined;
|
|
372
|
+
/** Rarely set fields; undefined while all of them have their defaults. */
|
|
373
|
+
extra: TypeExtra | undefined;
|
|
374
|
+
constructor(flags: TypeFlags, objectFlags: ObjectFlags, id: number, symbol: Symbol | undefined);
|
|
375
|
+
getSymbol(): Symbol | undefined;
|
|
376
|
+
getAliasSymbol(): Symbol | undefined;
|
|
377
|
+
getAliasTypeArguments(): readonly Type[];
|
|
378
|
+
/** The target of a type reference, index type or string mapping type. */
|
|
379
|
+
getTarget(): Type | undefined;
|
|
380
|
+
/** The members of a union or intersection type, or the types of a template literal type. */
|
|
381
|
+
getTypes(): readonly Type[];
|
|
382
|
+
getFreshType(): Type | undefined;
|
|
383
|
+
getRegularType(): Type | undefined;
|
|
384
|
+
getObjectType(): Type | undefined;
|
|
385
|
+
getIndexType(): Type | undefined;
|
|
386
|
+
getCheckType(): Type | undefined;
|
|
387
|
+
getExtendsType(): Type | undefined;
|
|
388
|
+
getTrueType(): Type | undefined;
|
|
389
|
+
getFalseType(): Type | undefined;
|
|
390
|
+
/** The base type of a substitution type. */
|
|
391
|
+
getBaseType(): Type | undefined;
|
|
392
|
+
/** The constraint of a substitution type. */
|
|
393
|
+
getConstraint(): Type | undefined;
|
|
394
|
+
/** The type parameters of a class or interface type, outer and local, without its `this` type. */
|
|
395
|
+
getTypeParameters(): readonly Type[];
|
|
396
|
+
getOuterTypeParameters(): readonly Type[];
|
|
397
|
+
getLocalTypeParameters(): readonly Type[];
|
|
398
|
+
/** The base types of a class or interface type, or undefined for any other type. */
|
|
399
|
+
getBaseTypes(): readonly Type[] | undefined;
|
|
400
|
+
isClassOrInterface(): boolean;
|
|
401
|
+
isUnionType(): boolean;
|
|
402
|
+
isIntersectionType(): boolean;
|
|
403
|
+
isObjectType(): boolean;
|
|
404
|
+
isIntrinsicType(): boolean;
|
|
405
|
+
/** Whether this is the error type: an intrinsic type named `error`. */
|
|
406
|
+
isErrorType(): boolean;
|
|
407
|
+
isLiteralType(): boolean;
|
|
408
|
+
isStringLiteralType(): boolean;
|
|
409
|
+
isNumberLiteralType(): boolean;
|
|
410
|
+
isBigIntLiteralType(): boolean;
|
|
411
|
+
isBooleanLiteralType(): boolean;
|
|
412
|
+
isTypeReference(): boolean;
|
|
413
|
+
isTupleType(): boolean;
|
|
414
|
+
isIndexType(): boolean;
|
|
415
|
+
isIndexedAccessType(): boolean;
|
|
416
|
+
isConditionalType(): boolean;
|
|
417
|
+
isSubstitutionType(): boolean;
|
|
418
|
+
isTemplateLiteralType(): boolean;
|
|
419
|
+
isStringMappingType(): boolean;
|
|
420
|
+
isTypeParameter(): boolean;
|
|
421
|
+
}
|
|
422
|
+
export declare class IntrinsicType extends Type {
|
|
423
|
+
readonly intrinsicName: string;
|
|
424
|
+
constructor(flags: TypeFlags, objectFlags: ObjectFlags, id: number, intrinsicName: string);
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* A literal or enum member type. `value` is the string of string literals, the number of number
|
|
428
|
+
* literals, `true`/`false` for booleans, the decimal digits (with a leading `-`) of bigints, and
|
|
429
|
+
* unset for computed enum members.
|
|
430
|
+
*/
|
|
431
|
+
export declare class LiteralType extends Type {
|
|
432
|
+
readonly stringValue: string;
|
|
433
|
+
readonly numberValue: number;
|
|
434
|
+
/** Created on first use, except for `true` and `false`. */
|
|
435
|
+
freshType: LiteralType | undefined;
|
|
436
|
+
regularType: LiteralType;
|
|
437
|
+
constructor(flags: TypeFlags, id: number, symbol: Symbol | undefined, stringValue: string, numberValue: number);
|
|
438
|
+
/** The value, as TypeScript 7's API gives it: a string, number, bigint or boolean. */
|
|
439
|
+
get value(): string | number | bigint | boolean;
|
|
440
|
+
}
|
|
441
|
+
export declare class UniqueESSymbolType extends Type {
|
|
442
|
+
readonly name: string;
|
|
443
|
+
constructor(id: number, symbol: Symbol, name: string);
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* The members table of a type, built when `members` is read (checker-members.ts): of an instantiated
|
|
447
|
+
* type whose member symbols are instantiated on demand (`PendingInstantiatedMembers`), where reading
|
|
448
|
+
* `properties` builds the properties too, as tsgo builds them when it resolves the members, and
|
|
449
|
+
* lookups by name instantiate only the member asked for; or of a type whose members are all
|
|
450
|
+
* properties (`PropertyMembers`), where lookups by name read the properties.
|
|
451
|
+
*/
|
|
452
|
+
export declare abstract class PendingMembers {
|
|
453
|
+
/**
|
|
454
|
+
* Set when `properties` is built and the members table is not (`PropertyMembers`): the type's
|
|
455
|
+
* properties, which lookups by name then read.
|
|
456
|
+
*/
|
|
457
|
+
materializedProperties: Symbol[] | undefined;
|
|
458
|
+
/**
|
|
459
|
+
* Sets `t.propertiesValue`. Where lookups can read the properties, it replaces `t.pendingMembers`
|
|
460
|
+
* with a `PropertyMembers`; otherwise it sets `t.membersValue` too and clears `t.pendingMembers`.
|
|
461
|
+
*/
|
|
462
|
+
abstract materialize(t: StructuredType): void;
|
|
463
|
+
/** Sets `t.membersValue` and `t.propertiesValue` and clears `t.pendingMembers`. */
|
|
464
|
+
abstract materializeTable(t: StructuredType): void;
|
|
465
|
+
/** `members.get(name)` of the table tsgo would have built by now. */
|
|
466
|
+
abstract get(name: string): Symbol | undefined;
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* The property names of instantiated types whose members tables are built on demand, shared by the
|
|
470
|
+
* instantiations of one source that have the same names in the same order: most instantiations of
|
|
471
|
+
* a class or interface have the members of their source and of the same bases.
|
|
472
|
+
*/
|
|
473
|
+
export declare class MemberNames {
|
|
474
|
+
/** The names of the properties, in order. */
|
|
475
|
+
readonly names: string[];
|
|
476
|
+
/** The index of each name in `names`. */
|
|
477
|
+
readonly positions: Map<string, number>;
|
|
478
|
+
/** The indexes in `names` of the members table's names, in table order. */
|
|
479
|
+
readonly tableOrder: number[];
|
|
480
|
+
constructor(names: string[], positions: Map<string, number>, tableOrder: number[]);
|
|
481
|
+
}
|
|
482
|
+
/** A type with members: object types, unions and intersections. */
|
|
483
|
+
export declare class StructuredType extends Type {
|
|
484
|
+
membersValue: SymbolTable | undefined;
|
|
485
|
+
propertiesValue: Symbol[];
|
|
486
|
+
/** Set while the member symbols of an instantiated type are not instantiated yet. */
|
|
487
|
+
pendingMembers: PendingMembers | undefined;
|
|
488
|
+
callSignatures: Signature[];
|
|
489
|
+
constructSignatures: Signature[];
|
|
490
|
+
indexInfos: IndexInfo[];
|
|
491
|
+
constructor(flags: TypeFlags, objectFlags: ObjectFlags, id: number, symbol: Symbol | undefined);
|
|
492
|
+
get objectTypeWithoutAbstractConstructSignatures(): Type | undefined;
|
|
493
|
+
set objectTypeWithoutAbstractConstructSignatures(t: Type | undefined);
|
|
494
|
+
get members(): SymbolTable | undefined;
|
|
495
|
+
set members(members: SymbolTable | undefined);
|
|
496
|
+
get properties(): Symbol[];
|
|
497
|
+
set properties(properties: Symbol[]);
|
|
498
|
+
}
|
|
499
|
+
export declare class ObjectType extends StructuredType {
|
|
500
|
+
/** The generic type this one instantiates. */
|
|
501
|
+
target: Type | undefined;
|
|
502
|
+
mapper: TypeMapper | undefined;
|
|
503
|
+
constructor(objectFlags: ObjectFlags, id: number, symbol: Symbol | undefined);
|
|
504
|
+
get instantiations(): TypeListCache<Type> | undefined;
|
|
505
|
+
set instantiations(instantiations: TypeListCache<Type> | undefined);
|
|
506
|
+
}
|
|
507
|
+
/** An instantiation of a generic class, interface or tuple type. */
|
|
508
|
+
export declare class TypeReference extends ObjectType {
|
|
509
|
+
resolvedTypeArguments: Type[] | undefined;
|
|
510
|
+
constructor(objectFlags: ObjectFlags, id: number, symbol: Symbol | undefined);
|
|
511
|
+
/** The type node of a deferred reference, else undefined. */
|
|
512
|
+
get node(): Node | undefined;
|
|
513
|
+
set node(node: Node | undefined);
|
|
514
|
+
}
|
|
515
|
+
/** A class or interface; when generic, also the reference to itself instantiated with its own type parameters. */
|
|
516
|
+
export declare class InterfaceType extends TypeReference {
|
|
517
|
+
/** Outer, then local type parameters, then the `this` type. */
|
|
518
|
+
allTypeParameters: Type[];
|
|
519
|
+
outerTypeParameterCount: number;
|
|
520
|
+
thisType: Type | undefined;
|
|
521
|
+
baseTypesResolved: boolean;
|
|
522
|
+
declaredMembersResolved: boolean;
|
|
523
|
+
resolvedBaseConstructorType: Type | undefined;
|
|
524
|
+
resolvedBaseTypes: Type[];
|
|
525
|
+
declaredMembers: SymbolTable | undefined;
|
|
526
|
+
declaredCallSignatures: Signature[];
|
|
527
|
+
declaredConstructSignatures: Signature[];
|
|
528
|
+
declaredIndexInfos: IndexInfo[];
|
|
529
|
+
/** Positions of the declared members by name, for lazily instantiated members of instantiations. */
|
|
530
|
+
declaredMemberPositions: Map<string, number> | undefined;
|
|
531
|
+
/** The member states of the last pending instantiation of the type's members (`sharedStates`). */
|
|
532
|
+
lastMemberStates: number[] | undefined;
|
|
533
|
+
/** The property names of the last instantiation whose members table is built on demand. */
|
|
534
|
+
lastMemberNames: MemberNames | undefined;
|
|
535
|
+
/** The references to a generic class, interface or tuple type, by their type arguments. */
|
|
536
|
+
references: ReferenceCache | undefined;
|
|
537
|
+
/** The checker that created the type, for `getBaseTypes()`. */
|
|
538
|
+
checking: TypeChecking | undefined;
|
|
539
|
+
constructor(objectFlags: ObjectFlags, id: number, symbol: Symbol | undefined);
|
|
540
|
+
outerTypeParameters(): Type[];
|
|
541
|
+
localTypeParameters(): Type[];
|
|
542
|
+
typeParameters(): Type[];
|
|
543
|
+
/** `typeParameters().length`, without copying them. */
|
|
544
|
+
typeParameterCount(): number;
|
|
545
|
+
}
|
|
546
|
+
export declare class TupleElementInfo {
|
|
547
|
+
readonly flags: ElementFlags;
|
|
548
|
+
/** A NamedTupleMember or ParameterDeclaration, if labeled. */
|
|
549
|
+
readonly labeledDeclaration: Node | undefined;
|
|
550
|
+
constructor(flags: ElementFlags, labeledDeclaration: Node | undefined);
|
|
551
|
+
}
|
|
552
|
+
export declare class TupleType extends InterfaceType {
|
|
553
|
+
elementInfos: TupleElementInfo[];
|
|
554
|
+
/** Required or variadic elements. */
|
|
555
|
+
minLength: number;
|
|
556
|
+
/** Leading required or optional elements. */
|
|
557
|
+
fixedLength: number;
|
|
558
|
+
combinedFlags: ElementFlags;
|
|
559
|
+
readonly: boolean;
|
|
560
|
+
constructor(objectFlags: ObjectFlags, id: number);
|
|
561
|
+
/** The flags of each element (TypeScript 7's API). */
|
|
562
|
+
get elementFlags(): ElementFlags[];
|
|
563
|
+
}
|
|
564
|
+
export declare class InstantiationExpressionType extends ObjectType {
|
|
565
|
+
node: Node | undefined;
|
|
566
|
+
constructor(objectFlags: ObjectFlags, id: number, symbol: Symbol | undefined);
|
|
567
|
+
}
|
|
568
|
+
export declare class MappedType extends ObjectType {
|
|
569
|
+
declaration: Node | undefined;
|
|
570
|
+
typeParameter: Type | undefined;
|
|
571
|
+
constraintType: Type | undefined;
|
|
572
|
+
nameType: Type | undefined;
|
|
573
|
+
templateType: Type | undefined;
|
|
574
|
+
modifiersType: Type | undefined;
|
|
575
|
+
resolvedApparentType: Type | undefined;
|
|
576
|
+
containsError: boolean;
|
|
577
|
+
constructor(objectFlags: ObjectFlags, id: number, symbol: Symbol | undefined);
|
|
578
|
+
}
|
|
579
|
+
export declare class ReverseMappedType extends ObjectType {
|
|
580
|
+
source: Type | undefined;
|
|
581
|
+
mappedType: Type | undefined;
|
|
582
|
+
constraintType: Type | undefined;
|
|
583
|
+
constructor(objectFlags: ObjectFlags, id: number);
|
|
584
|
+
}
|
|
585
|
+
export declare class EvolvingArrayType extends ObjectType {
|
|
586
|
+
elementType: Type | undefined;
|
|
587
|
+
finalArrayType: Type | undefined;
|
|
588
|
+
constructor(objectFlags: ObjectFlags, id: number);
|
|
589
|
+
}
|
|
590
|
+
export declare class UnionOrIntersectionType extends StructuredType {
|
|
591
|
+
readonly types: Type[];
|
|
592
|
+
propertyCache: SymbolTable | undefined;
|
|
593
|
+
propertyCacheWithoutFunctionPropertyAugment: SymbolTable | undefined;
|
|
594
|
+
resolvedProperties: Symbol[] | undefined;
|
|
595
|
+
constructor(flags: TypeFlags, objectFlags: ObjectFlags, id: number, types: Type[]);
|
|
596
|
+
}
|
|
597
|
+
/** A union; all of its own fields are rarely set and live in `extra`. */
|
|
598
|
+
export declare class UnionType extends UnionOrIntersectionType {
|
|
599
|
+
constructor(objectFlags: ObjectFlags, id: number, types: Type[]);
|
|
600
|
+
get resolvedReducedType(): Type | undefined;
|
|
601
|
+
set resolvedReducedType(t: Type | undefined);
|
|
602
|
+
get regularType(): Type | undefined;
|
|
603
|
+
set regularType(t: Type | undefined);
|
|
604
|
+
/** The denormalized union, intersection or index type the union came from. */
|
|
605
|
+
get origin(): Type | undefined;
|
|
606
|
+
set origin(t: Type | undefined);
|
|
607
|
+
/** A property with a unique unit type in every object of the union; '' if not computed, '\0' if none. */
|
|
608
|
+
get keyPropertyName(): string;
|
|
609
|
+
set keyPropertyName(name: string);
|
|
610
|
+
get constituentMap(): Map<Type, Type> | undefined;
|
|
611
|
+
set constituentMap(map: Map<Type, Type> | undefined);
|
|
612
|
+
/** The constituents of a large union, for membership tests; created on the second test. */
|
|
613
|
+
get constituentSet(): Set<Type> | undefined;
|
|
614
|
+
set constituentSet(set: Set<Type> | undefined);
|
|
615
|
+
get membershipTests(): number;
|
|
616
|
+
set membershipTests(tests: number);
|
|
617
|
+
}
|
|
618
|
+
export declare class IntersectionType extends UnionOrIntersectionType {
|
|
619
|
+
resolvedApparentType: Type | undefined;
|
|
620
|
+
constructor(objectFlags: ObjectFlags, id: number, types: Type[]);
|
|
621
|
+
get uniqueLiteralFilledInstantiation(): Type | undefined;
|
|
622
|
+
set uniqueLiteralFilledInstantiation(t: Type | undefined);
|
|
623
|
+
}
|
|
624
|
+
export declare class TypeParameter extends Type {
|
|
625
|
+
constraint: Type | undefined;
|
|
626
|
+
target: Type | undefined;
|
|
627
|
+
mapper: TypeMapper | undefined;
|
|
628
|
+
isThisType: boolean;
|
|
629
|
+
resolvedDefaultType: Type | undefined;
|
|
630
|
+
constructor(id: number, symbol: Symbol | undefined);
|
|
631
|
+
}
|
|
632
|
+
/** `keyof T`. */
|
|
633
|
+
export declare class IndexType extends Type {
|
|
634
|
+
readonly target: Type;
|
|
635
|
+
readonly indexFlags: IndexFlags;
|
|
636
|
+
constructor(id: number, target: Type, indexFlags: IndexFlags);
|
|
637
|
+
}
|
|
638
|
+
/** `T[K]`. */
|
|
639
|
+
export declare class IndexedAccessType extends Type {
|
|
640
|
+
readonly objectType: Type;
|
|
641
|
+
readonly indexType: Type;
|
|
642
|
+
/** Only AccessFlags.Persistent. */
|
|
643
|
+
readonly accessFlags: AccessFlags;
|
|
644
|
+
constructor(id: number, objectType: Type, indexType: Type, accessFlags: AccessFlags);
|
|
645
|
+
}
|
|
646
|
+
export declare class TemplateLiteralType extends Type {
|
|
647
|
+
/** One longer than `types`. */
|
|
648
|
+
readonly texts: string[];
|
|
649
|
+
readonly types: Type[];
|
|
650
|
+
constructor(id: number, texts: string[], types: Type[]);
|
|
651
|
+
}
|
|
652
|
+
/** `Uppercase<T>` and friends. */
|
|
653
|
+
export declare class StringMappingType extends Type {
|
|
654
|
+
readonly target: Type;
|
|
655
|
+
constructor(id: number, symbol: Symbol, target: Type);
|
|
656
|
+
}
|
|
657
|
+
export declare class SubstitutionType extends Type {
|
|
658
|
+
readonly baseType: Type;
|
|
659
|
+
/** What the base type is known to satisfy. */
|
|
660
|
+
readonly constraint: Type;
|
|
661
|
+
constructor(id: number, baseType: Type, constraint: Type);
|
|
662
|
+
}
|
|
663
|
+
export declare class ConditionalRoot {
|
|
664
|
+
readonly node: Node;
|
|
665
|
+
readonly checkType: Type;
|
|
666
|
+
readonly extendsType: Type;
|
|
667
|
+
readonly isDistributive: boolean;
|
|
668
|
+
readonly inferTypeParameters: Type[];
|
|
669
|
+
readonly outerTypeParameters: Type[];
|
|
670
|
+
readonly instantiations: TypeListCache<Type>;
|
|
671
|
+
readonly alias: TypeAlias | undefined;
|
|
672
|
+
/**
|
|
673
|
+
* The type arguments of an extends type that is a reference to a class or interface; null for
|
|
674
|
+
* other extends types, undefined until computed.
|
|
675
|
+
*/
|
|
676
|
+
referenceArgs: ReferenceArgs | null | undefined;
|
|
677
|
+
constructor(node: Node, checkType: Type, extendsType: Type, isDistributive: boolean, inferTypeParameters: Type[], outerTypeParameters: Type[], alias: TypeAlias | undefined);
|
|
678
|
+
}
|
|
679
|
+
/** What each type argument of a conditional type's extends type is, for `isFalseForEveryInference`. */
|
|
680
|
+
export declare class ReferenceArgs {
|
|
681
|
+
readonly kinds: ReferenceArgKind[];
|
|
682
|
+
/** The `infer` type parameter of each `ReferenceArgKind.Infer` type argument. */
|
|
683
|
+
readonly inferTypeParameters: (Type | undefined)[];
|
|
684
|
+
constructor(kinds: ReferenceArgKind[], inferTypeParameters: (Type | undefined)[]);
|
|
685
|
+
}
|
|
686
|
+
export declare const enum ReferenceArgKind {
|
|
687
|
+
/** Has no `infer` type parameters, so inference doesn't change it. */
|
|
688
|
+
Fixed = 0,
|
|
689
|
+
/** Just an `infer` type parameter that occurs nowhere else in the extends type. */
|
|
690
|
+
Infer = 1,
|
|
691
|
+
/** An object type with `infer` type parameters: an instantiation of it is an object type. */
|
|
692
|
+
Object = 2,
|
|
693
|
+
Other = 3
|
|
694
|
+
}
|
|
695
|
+
export declare class ConditionalType extends Type {
|
|
696
|
+
readonly root: ConditionalRoot;
|
|
697
|
+
readonly checkType: Type;
|
|
698
|
+
readonly extendsType: Type;
|
|
699
|
+
resolvedTrueType: Type | undefined;
|
|
700
|
+
resolvedFalseType: Type | undefined;
|
|
701
|
+
/** The true and false types, as one list (getBranchTypesFromConditionalType). */
|
|
702
|
+
resolvedBranchTypes: Type[] | undefined;
|
|
703
|
+
resolvedInferredTrueType: Type | undefined;
|
|
704
|
+
resolvedDefaultConstraint: Type | undefined;
|
|
705
|
+
resolvedConstraintOfDistributive: Type | undefined;
|
|
706
|
+
readonly mapper: TypeMapper | undefined;
|
|
707
|
+
readonly combinedMapper: TypeMapper | undefined;
|
|
708
|
+
/** The checker that created the type, for `getTrueType()` and `getFalseType()`. */
|
|
709
|
+
checking: TypeChecking | undefined;
|
|
710
|
+
constructor(id: number, root: ConditionalRoot, checkType: Type, extendsType: Type, mapper: TypeMapper | undefined, combinedMapper: TypeMapper | undefined);
|
|
711
|
+
}
|
|
712
|
+
export declare class TypePredicate {
|
|
713
|
+
readonly kind: TypePredicateKind;
|
|
714
|
+
readonly parameterIndex: number;
|
|
715
|
+
readonly parameterName: string;
|
|
716
|
+
readonly type: Type | undefined;
|
|
717
|
+
constructor(kind: TypePredicateKind, parameterName: string, parameterIndex: number, type: Type | undefined);
|
|
718
|
+
}
|
|
719
|
+
export declare class CompositeSignature {
|
|
720
|
+
/** False for an intersection. */
|
|
721
|
+
readonly isUnion: boolean;
|
|
722
|
+
readonly signatures: Signature[];
|
|
723
|
+
constructor(isUnion: boolean, signatures: Signature[]);
|
|
724
|
+
}
|
|
725
|
+
/**
|
|
726
|
+
* Fields that few signatures set, kept out of line in `Signature.extra` (see TypeExtra): the `this`
|
|
727
|
+
* parameter, composite signatures and the caches of derived signatures.
|
|
728
|
+
*/
|
|
729
|
+
export declare class SignatureExtra implements ProgramLifetime {
|
|
730
|
+
thisParameter: Symbol | undefined;
|
|
731
|
+
isolatedSignatureType: Type | undefined;
|
|
732
|
+
composite: CompositeSignature | undefined;
|
|
733
|
+
erasedSignatureCache: Signature | undefined;
|
|
734
|
+
canonicalSignatureCache: Signature | undefined;
|
|
735
|
+
baseSignatureCache: Signature | undefined;
|
|
736
|
+
optionalCallSignatureCache: Signature | undefined;
|
|
737
|
+
instantiations: TypeListCache<Signature> | undefined;
|
|
738
|
+
constructor();
|
|
739
|
+
}
|
|
740
|
+
/** The extra fields of `s`, created if it has none yet. */
|
|
741
|
+
export declare function signatureExtra(s: Signature): SignatureExtra;
|
|
742
|
+
export declare class Signature implements ProgramLifetime {
|
|
743
|
+
readonly id: number;
|
|
744
|
+
flags: SignatureFlags;
|
|
745
|
+
minArgumentCount: number;
|
|
746
|
+
/** -1 until computed. */
|
|
747
|
+
resolvedMinArgumentCount: number;
|
|
748
|
+
declaration: Node | undefined;
|
|
749
|
+
typeParameters: Type[];
|
|
750
|
+
parameters: Symbol[];
|
|
751
|
+
resolvedReturnType: Type | undefined;
|
|
752
|
+
resolvedTypePredicate: TypePredicate | undefined;
|
|
753
|
+
target: Signature | undefined;
|
|
754
|
+
mapper: TypeMapper | undefined;
|
|
755
|
+
/** Rarely set fields; undefined while all of them have their defaults. */
|
|
756
|
+
extra: SignatureExtra | undefined;
|
|
757
|
+
constructor(id: number, flags: SignatureFlags, declaration: Node | undefined, typeParameters: Type[], thisParameter: Symbol | undefined, parameters: Symbol[], resolvedReturnType: Type | undefined, resolvedTypePredicate: TypePredicate | undefined, minArgumentCount: number);
|
|
758
|
+
get thisParameter(): Symbol | undefined;
|
|
759
|
+
set thisParameter(symbol: Symbol | undefined);
|
|
760
|
+
getTypeParameters(): readonly Type[];
|
|
761
|
+
getParameters(): readonly Symbol[];
|
|
762
|
+
getThisParameter(): Symbol | undefined;
|
|
763
|
+
/** The signature this one was instantiated from. */
|
|
764
|
+
getTarget(): Signature | undefined;
|
|
765
|
+
get isolatedSignatureType(): Type | undefined;
|
|
766
|
+
set isolatedSignatureType(t: Type | undefined);
|
|
767
|
+
get composite(): CompositeSignature | undefined;
|
|
768
|
+
set composite(composite: CompositeSignature | undefined);
|
|
769
|
+
/** Caches of derived signatures. */
|
|
770
|
+
get erasedSignatureCache(): Signature | undefined;
|
|
771
|
+
set erasedSignatureCache(s: Signature | undefined);
|
|
772
|
+
get canonicalSignatureCache(): Signature | undefined;
|
|
773
|
+
set canonicalSignatureCache(s: Signature | undefined);
|
|
774
|
+
get baseSignatureCache(): Signature | undefined;
|
|
775
|
+
set baseSignatureCache(s: Signature | undefined);
|
|
776
|
+
get optionalCallSignatureCache(): Signature | undefined;
|
|
777
|
+
set optionalCallSignatureCache(s: Signature | undefined);
|
|
778
|
+
get instantiations(): TypeListCache<Signature> | undefined;
|
|
779
|
+
set instantiations(instantiations: TypeListCache<Signature> | undefined);
|
|
780
|
+
hasRestParameter(): boolean;
|
|
781
|
+
}
|
|
782
|
+
export declare class IndexInfo implements ProgramLifetime {
|
|
783
|
+
readonly keyType: Type;
|
|
784
|
+
readonly valueType: Type;
|
|
785
|
+
readonly isReadonly: boolean;
|
|
786
|
+
/** The IndexSignatureDeclaration. */
|
|
787
|
+
readonly declaration: Node | undefined;
|
|
788
|
+
/** Elements with computed property names that make up the index signature. */
|
|
789
|
+
readonly components: Node[];
|
|
790
|
+
indexSymbol: Symbol | undefined;
|
|
791
|
+
constructor(keyType: Type, valueType: Type, isReadonly: boolean, declaration: Node | undefined, components: Node[]);
|
|
792
|
+
/** The value type (TypeScript 7's API). */
|
|
793
|
+
get type(): Type;
|
|
794
|
+
}
|
|
795
|
+
export declare const emptyTypes: Type[];
|
|
796
|
+
export declare const emptySymbols: Symbol[];
|
|
797
|
+
export declare const emptySignatures: Signature[];
|
|
798
|
+
export declare const emptyIndexInfos: IndexInfo[];
|
|
799
|
+
export declare const enum TypeMapperKind {
|
|
800
|
+
Unknown = 0,
|
|
801
|
+
Simple = 1,
|
|
802
|
+
Array = 2,
|
|
803
|
+
Merged = 3
|
|
804
|
+
}
|
|
805
|
+
/** Maps type parameters to types. Subclasses replace tsgo's function mappers. */
|
|
806
|
+
export declare abstract class TypeMapper {
|
|
807
|
+
abstract map(type: Type): Type;
|
|
808
|
+
kind(): TypeMapperKind;
|
|
809
|
+
/** Whether the mapper only maps a `this` type parameter. */
|
|
810
|
+
mapsThisOnly(): boolean;
|
|
811
|
+
}
|
|
812
|
+
export declare class SimpleTypeMapper extends TypeMapper {
|
|
813
|
+
readonly source: Type;
|
|
814
|
+
readonly target: Type;
|
|
815
|
+
constructor(source: Type, target: Type);
|
|
816
|
+
map(type: Type): Type;
|
|
817
|
+
kind(): TypeMapperKind;
|
|
818
|
+
mapsThisOnly(): boolean;
|
|
819
|
+
}
|
|
820
|
+
export declare class ArrayTypeMapper extends TypeMapper {
|
|
821
|
+
readonly sources: Type[];
|
|
822
|
+
readonly targets: Type[];
|
|
823
|
+
constructor(sources: Type[], targets: Type[]);
|
|
824
|
+
map(type: Type): Type;
|
|
825
|
+
kind(): TypeMapperKind;
|
|
826
|
+
mapsThisOnly(): boolean;
|
|
827
|
+
}
|
|
828
|
+
/** An ArrayTypeMapper that looks its sources up in an index, built on its first lookup. */
|
|
829
|
+
export declare class IndexedArrayTypeMapper extends ArrayTypeMapper {
|
|
830
|
+
/** The index of each source's first occurrence. */
|
|
831
|
+
index: Map<Type, number> | undefined;
|
|
832
|
+
/** The number of sources `index` was built from. */
|
|
833
|
+
indexedLength: number;
|
|
834
|
+
map(type: Type): Type;
|
|
835
|
+
}
|
|
836
|
+
/** Maps each of `sources` to one target. */
|
|
837
|
+
export declare class ArrayToSingleTypeMapper extends TypeMapper {
|
|
838
|
+
readonly sources: Type[];
|
|
839
|
+
readonly target: Type;
|
|
840
|
+
constructor(sources: Type[], target: Type);
|
|
841
|
+
map(type: Type): Type;
|
|
842
|
+
mapsThisOnly(): boolean;
|
|
843
|
+
}
|
|
844
|
+
/** Applies `m1`, then `m2`. */
|
|
845
|
+
export declare class MergedTypeMapper extends TypeMapper {
|
|
846
|
+
readonly m1: TypeMapper;
|
|
847
|
+
readonly m2: TypeMapper;
|
|
848
|
+
constructor(m1: TypeMapper, m2: TypeMapper);
|
|
849
|
+
map(type: Type): Type;
|
|
850
|
+
kind(): TypeMapperKind;
|
|
851
|
+
}
|
|
852
|
+
export declare function newTypeMapper(sources: Type[], targets: Type[]): TypeMapper;
|
|
853
|
+
export declare function mergeTypeMappers(m1: TypeMapper | undefined, m2: TypeMapper): TypeMapper;
|
|
854
|
+
export declare function prependTypeMapping(source: Type, target: Type, mapper: TypeMapper | undefined): TypeMapper;
|
|
855
|
+
export declare function appendTypeMapping(mapper: TypeMapper | undefined, source: Type, target: Type): TypeMapper;
|
|
856
|
+
/**
|
|
857
|
+
* What the checker caches per symbol and rarely sets. Common values (the type, target, mapper, name type
|
|
858
|
+
* and others) are columns of `Checker` instead; see link-tables.ts. The fields most links objects have
|
|
859
|
+
* are fields of this class; the others are in a RareSymbolLinks object, created on the first write of
|
|
860
|
+
* one of them, behind accessors.
|
|
861
|
+
*/
|
|
862
|
+
export declare class SymbolLinks implements ProgramLifetime {
|
|
863
|
+
/** Constituents of a deferred union/intersection property type. */
|
|
864
|
+
deferralParent: Type | undefined;
|
|
865
|
+
deferralConstituents: Type[] | undefined;
|
|
866
|
+
immediateTarget: Symbol | undefined;
|
|
867
|
+
aliasTarget: Symbol | undefined;
|
|
868
|
+
resolvedExports: SymbolTable | undefined;
|
|
869
|
+
resolvedMembers: SymbolTable | undefined;
|
|
870
|
+
declaredType: Type | undefined;
|
|
871
|
+
/** The other links, created on first write. */
|
|
872
|
+
private rareLinks;
|
|
873
|
+
functionOrConstructorChecked: boolean;
|
|
874
|
+
aliasReferenced: boolean;
|
|
875
|
+
constructor();
|
|
876
|
+
private rare;
|
|
877
|
+
get writeType(): Type | undefined;
|
|
878
|
+
set writeType(value: Type | undefined);
|
|
879
|
+
get deferralWriteConstituents(): Type[] | undefined;
|
|
880
|
+
set deferralWriteConstituents(value: Type[] | undefined);
|
|
881
|
+
get typeOnlyDeclaration(): Node | undefined;
|
|
882
|
+
set typeOnlyDeclaration(value: Node | undefined);
|
|
883
|
+
get typeOnlyExportStarMap(): Map<string, Node> | undefined;
|
|
884
|
+
set typeOnlyExportStarMap(value: Map<string, Node> | undefined);
|
|
885
|
+
get exportsChecked(): boolean;
|
|
886
|
+
set exportsChecked(value: boolean);
|
|
887
|
+
get lateSymbol(): Symbol | undefined;
|
|
888
|
+
set lateSymbol(value: Symbol | undefined);
|
|
889
|
+
get typeParameters(): Type[] | undefined;
|
|
890
|
+
set typeParameters(value: Type[] | undefined);
|
|
891
|
+
get instantiations(): Map<string, Type> | undefined;
|
|
892
|
+
set instantiations(value: Map<string, Type> | undefined);
|
|
893
|
+
get interfaceChecked(): boolean;
|
|
894
|
+
set interfaceChecked(value: boolean);
|
|
895
|
+
get indexSignaturesChecked(): boolean;
|
|
896
|
+
set indexSignaturesChecked(value: boolean);
|
|
897
|
+
get typeParametersChecked(): boolean;
|
|
898
|
+
set typeParametersChecked(value: boolean);
|
|
899
|
+
get enumChecked(): boolean;
|
|
900
|
+
set enumChecked(value: boolean);
|
|
901
|
+
get variances(): VarianceFlags[] | undefined;
|
|
902
|
+
set variances(value: VarianceFlags[] | undefined);
|
|
903
|
+
get lastAssignmentPos(): number;
|
|
904
|
+
set lastAssignmentPos(value: number);
|
|
905
|
+
get hasDefiniteAssignment(): boolean;
|
|
906
|
+
set hasDefiniteAssignment(value: boolean);
|
|
907
|
+
get isConstructorDeclaredProperty(): boolean;
|
|
908
|
+
set isConstructorDeclaredProperty(value: boolean);
|
|
909
|
+
get thisAssignmentKind(): number;
|
|
910
|
+
set thisAssignmentKind(value: number);
|
|
911
|
+
get thisAssignmentLocation(): Node | undefined;
|
|
912
|
+
set thisAssignmentLocation(value: Node | undefined);
|
|
913
|
+
get reverseMappedPropertyType(): Type | undefined;
|
|
914
|
+
set reverseMappedPropertyType(value: Type | undefined);
|
|
915
|
+
get reverseMappedMappedType(): Type | undefined;
|
|
916
|
+
set reverseMappedMappedType(value: Type | undefined);
|
|
917
|
+
get reverseMappedConstraintType(): Type | undefined;
|
|
918
|
+
set reverseMappedConstraintType(value: Type | undefined);
|
|
919
|
+
}
|
|
920
|
+
/** The links of a symbol that few symbols have (SymbolLinks). */
|
|
921
|
+
export declare class RareSymbolLinks implements ProgramLifetime {
|
|
922
|
+
writeType: Type | undefined;
|
|
923
|
+
deferralWriteConstituents: Type[] | undefined;
|
|
924
|
+
typeOnlyDeclaration: Node | undefined;
|
|
925
|
+
/** Exports reached only through `export type *`, by name. */
|
|
926
|
+
typeOnlyExportStarMap: Map<string, Node> | undefined;
|
|
927
|
+
exportsChecked: boolean;
|
|
928
|
+
lateSymbol: Symbol | undefined;
|
|
929
|
+
/** Type parameters of a type alias. */
|
|
930
|
+
typeParameters: Type[] | undefined;
|
|
931
|
+
/** Instantiations of a generic type alias. */
|
|
932
|
+
instantiations: Map<string, Type> | undefined;
|
|
933
|
+
interfaceChecked: boolean;
|
|
934
|
+
indexSignaturesChecked: boolean;
|
|
935
|
+
typeParametersChecked: boolean;
|
|
936
|
+
enumChecked: boolean;
|
|
937
|
+
variances: VarianceFlags[] | undefined;
|
|
938
|
+
lastAssignmentPos: number;
|
|
939
|
+
hasDefiniteAssignment: boolean;
|
|
940
|
+
isConstructorDeclaredProperty: boolean;
|
|
941
|
+
/** A `ThisAssignmentKind` plus one; zero until computed. */
|
|
942
|
+
thisAssignmentKind: number;
|
|
943
|
+
thisAssignmentLocation: Node | undefined;
|
|
944
|
+
reverseMappedPropertyType: Type | undefined;
|
|
945
|
+
reverseMappedMappedType: Type | undefined;
|
|
946
|
+
reverseMappedConstraintType: Type | undefined;
|
|
947
|
+
constructor();
|
|
948
|
+
}
|
|
949
|
+
/**
|
|
950
|
+
* What the checker caches per node and rarely sets. The resolved symbol, type and signature are columns of
|
|
951
|
+
* `Checker` instead; see link-tables.ts. As in SymbolLinks, the fields few links objects have are in a
|
|
952
|
+
* RareNodeLinks object behind accessors.
|
|
953
|
+
*/
|
|
954
|
+
export declare class NodeLinks implements ProgramLifetime {
|
|
955
|
+
/** Outer type parameters of an anonymous object type node. */
|
|
956
|
+
outerTypeParameters: Type[] | undefined;
|
|
957
|
+
effectsSignature: Signature | undefined;
|
|
958
|
+
/** Type of an assertion's operand. */
|
|
959
|
+
assertionExpressionType: Type | undefined;
|
|
960
|
+
/** The other links, created on first write. */
|
|
961
|
+
private rareLinks;
|
|
962
|
+
flags: NodeCheckFlags;
|
|
963
|
+
constructor();
|
|
964
|
+
private rare;
|
|
965
|
+
get contextFreeType(): Type | undefined;
|
|
966
|
+
set contextFreeType(value: Type | undefined);
|
|
967
|
+
get enumStringValue(): string;
|
|
968
|
+
set enumStringValue(value: string);
|
|
969
|
+
get enumNumberValue(): number;
|
|
970
|
+
set enumNumberValue(value: number);
|
|
971
|
+
get enumValueKind(): number;
|
|
972
|
+
set enumValueKind(value: number);
|
|
973
|
+
get enumValueFlags(): number;
|
|
974
|
+
set enumValueFlags(value: number);
|
|
975
|
+
get hasReportedStatementInAmbientContext(): boolean;
|
|
976
|
+
set hasReportedStatementInAmbientContext(value: boolean);
|
|
977
|
+
get declarationRequiresScopeChange(): number;
|
|
978
|
+
set declarationRequiresScopeChange(value: number);
|
|
979
|
+
get typeChecked(): boolean;
|
|
980
|
+
set typeChecked(value: boolean);
|
|
981
|
+
get deferredNodes(): Node[] | undefined;
|
|
982
|
+
set deferredNodes(value: Node[] | undefined);
|
|
983
|
+
get switchTypes(): Type[] | undefined;
|
|
984
|
+
set switchTypes(value: Type[] | undefined);
|
|
985
|
+
get switchWitnesses(): string[] | undefined;
|
|
986
|
+
set switchWitnesses(value: string[] | undefined);
|
|
987
|
+
get switchWitnessesValid(): boolean;
|
|
988
|
+
set switchWitnessesValid(value: boolean);
|
|
989
|
+
get exhaustiveState(): number;
|
|
990
|
+
set exhaustiveState(value: number);
|
|
991
|
+
get decoratorSignature(): Signature | undefined;
|
|
992
|
+
set decoratorSignature(value: Signature | undefined);
|
|
993
|
+
get containsArgumentsReference(): number;
|
|
994
|
+
set containsArgumentsReference(value: number);
|
|
995
|
+
get mentionsArguments(): number;
|
|
996
|
+
set mentionsArguments(value: number);
|
|
997
|
+
}
|
|
998
|
+
/** The links of a node that few nodes have (NodeLinks). */
|
|
999
|
+
export declare class RareNodeLinks implements ProgramLifetime {
|
|
1000
|
+
/** Context-free type of an expression. */
|
|
1001
|
+
contextFreeType: Type | undefined;
|
|
1002
|
+
/** Enum member value: a string, or a number when `enumValueIsNumber`. */
|
|
1003
|
+
enumStringValue: string;
|
|
1004
|
+
enumNumberValue: number;
|
|
1005
|
+
enumValueKind: number;
|
|
1006
|
+
/** EvaluatedFlags of the enum member value. */
|
|
1007
|
+
enumValueFlags: number;
|
|
1008
|
+
hasReportedStatementInAmbientContext: boolean;
|
|
1009
|
+
declarationRequiresScopeChange: number;
|
|
1010
|
+
/** For source files: whether the file has been checked, and its nodes waiting for a deferred check. */
|
|
1011
|
+
typeChecked: boolean;
|
|
1012
|
+
deferredNodes: Node[] | undefined;
|
|
1013
|
+
/** Case clause types of a switch statement. */
|
|
1014
|
+
switchTypes: Type[] | undefined;
|
|
1015
|
+
/** `typeof` case texts of a switch statement; '' for default and duplicates. */
|
|
1016
|
+
switchWitnesses: string[] | undefined;
|
|
1017
|
+
switchWitnessesValid: boolean;
|
|
1018
|
+
/** 0 unknown, 1 computing, 2 not exhaustive, 3 exhaustive. */
|
|
1019
|
+
exhaustiveState: number;
|
|
1020
|
+
/** The signature the runtime calls a decorator of this declaration with. */
|
|
1021
|
+
decoratorSignature: Signature | undefined;
|
|
1022
|
+
/** Whether a function body references `arguments`: 0 until computed, 1 for no, 2 for yes. */
|
|
1023
|
+
containsArgumentsReference: number;
|
|
1024
|
+
/** For source files: whether the file has an identifier `arguments`: 0 until computed, 1 for no, 2 for yes. */
|
|
1025
|
+
mentionsArguments: number;
|
|
1026
|
+
constructor();
|
|
1027
|
+
}
|