tsc-ts 0.0.10 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (379) hide show
  1. package/README.md +1 -1
  2. package/bin/tsc-ts.js +70 -1
  3. package/dist/api/compiler/ast-utilities.d.ts +19 -1
  4. package/dist/api/compiler/ast-utilities.js +180 -95
  5. package/dist/api/compiler/ast.d.ts +29 -18
  6. package/dist/api/compiler/ast.js +1040 -1007
  7. package/dist/api/compiler/astnav.js +15 -15
  8. package/dist/api/compiler/binder-utilities.js +186 -186
  9. package/dist/api/compiler/binder.js +290 -263
  10. package/dist/api/compiler/character-codes.js +2 -2
  11. package/dist/api/compiler/checker-calls.js +173 -123
  12. package/dist/api/compiler/checker-classes.d.ts +14 -3
  13. package/dist/api/compiler/checker-classes.js +136 -91
  14. package/dist/api/compiler/checker-contextual.d.ts +20 -0
  15. package/dist/api/compiler/checker-contextual.js +175 -62
  16. package/dist/api/compiler/checker-declaration-order.js +79 -79
  17. package/dist/api/compiler/checker-declarations.d.ts +1 -0
  18. package/dist/api/compiler/checker-declarations.js +160 -136
  19. package/dist/api/compiler/checker-declared-types.js +67 -65
  20. package/dist/api/compiler/checker-decorators.js +77 -77
  21. package/dist/api/compiler/checker-deprecation.d.ts +8 -3
  22. package/dist/api/compiler/checker-deprecation.js +76 -55
  23. package/dist/api/compiler/checker-destructuring.js +47 -45
  24. package/dist/api/compiler/checker-elaboration.js +24 -24
  25. package/dist/api/compiler/checker-emit-helpers.js +4 -4
  26. package/dist/api/compiler/checker-emit-resolver.d.ts +4 -2
  27. package/dist/api/compiler/checker-emit-resolver.js +25 -13
  28. package/dist/api/compiler/checker-evaluator.js +9 -9
  29. package/dist/api/compiler/checker-expressions.js +258 -212
  30. package/dist/api/compiler/checker-functions.js +113 -107
  31. package/dist/api/compiler/checker-generated-code.d.ts +0 -11
  32. package/dist/api/compiler/checker-generated-code.js +28 -52
  33. package/dist/api/compiler/checker-grammar.d.ts +1 -0
  34. package/dist/api/compiler/checker-grammar.js +469 -438
  35. package/dist/api/compiler/checker-heritage.js +91 -93
  36. package/dist/api/compiler/checker-inference.d.ts +77 -5
  37. package/dist/api/compiler/checker-inference.js +487 -113
  38. package/dist/api/compiler/checker-iteration.d.ts +0 -10
  39. package/dist/api/compiler/checker-iteration.js +35 -52
  40. package/dist/api/compiler/checker-javascript.js +14 -14
  41. package/dist/api/compiler/checker-jsdoc.d.ts +8 -10
  42. package/dist/api/compiler/checker-jsdoc.js +67 -58
  43. package/dist/api/compiler/checker-jsx.js +107 -89
  44. package/dist/api/compiler/checker-members.d.ts +9 -2
  45. package/dist/api/compiler/checker-members.js +210 -74
  46. package/dist/api/compiler/checker-modules.d.ts +15 -6
  47. package/dist/api/compiler/checker-modules.js +469 -309
  48. package/dist/api/compiler/checker-narrowing.js +273 -189
  49. package/dist/api/compiler/checker-object-literals.js +25 -22
  50. package/dist/api/compiler/checker-operators.js +126 -118
  51. package/dist/api/compiler/checker-overloads.js +27 -27
  52. package/dist/api/compiler/checker-property-access.js +59 -55
  53. package/dist/api/compiler/checker-services.d.ts +1 -0
  54. package/dist/api/compiler/checker-services.js +222 -210
  55. package/dist/api/compiler/checker-signatures.js +65 -49
  56. package/dist/api/compiler/checker-source-file.d.ts +5 -0
  57. package/dist/api/compiler/checker-source-file.js +154 -130
  58. package/dist/api/compiler/checker-statements.js +33 -32
  59. package/dist/api/compiler/checker-super.js +50 -50
  60. package/dist/api/compiler/checker-symbol-types.js +109 -93
  61. package/dist/api/compiler/checker-symbols.d.ts +13 -1
  62. package/dist/api/compiler/checker-symbols.js +264 -149
  63. package/dist/api/compiler/checker-type-factory.d.ts +5 -0
  64. package/dist/api/compiler/checker-type-factory.js +190 -46
  65. package/dist/api/compiler/checker-type-nodes.d.ts +1 -0
  66. package/dist/api/compiler/checker-type-nodes.js +179 -141
  67. package/dist/api/compiler/checker-type-operators.d.ts +2 -0
  68. package/dist/api/compiler/checker-type-operators.js +110 -63
  69. package/dist/api/compiler/checker-types.d.ts +80 -3
  70. package/dist/api/compiler/checker-types.js +121 -2
  71. package/dist/api/compiler/checker-unused.js +114 -118
  72. package/dist/api/compiler/checker-utilities.js +11 -11
  73. package/dist/api/compiler/checker.d.ts +97 -31
  74. package/dist/api/compiler/checker.js +149 -35
  75. package/dist/api/compiler/command-line.d.ts +1 -3
  76. package/dist/api/compiler/command-line.js +47 -44
  77. package/dist/api/compiler/compile-program.d.ts +24 -4
  78. package/dist/api/compiler/compile-program.js +53 -26
  79. package/dist/api/compiler/diagnostic-messages.d.ts +1849 -1774
  80. package/dist/api/compiler/diagnostic-messages.js +128 -122
  81. package/dist/api/compiler/diagnostics.js +7 -7
  82. package/dist/api/compiler/emitter.d.ts +7 -1
  83. package/dist/api/compiler/emitter.js +53 -11
  84. package/dist/api/compiler/expr-record.d.ts +11 -0
  85. package/dist/api/compiler/expr-record.js +53 -0
  86. package/dist/api/compiler/file-include.d.ts +2 -1
  87. package/dist/api/compiler/file-include.js +11 -7
  88. package/dist/api/compiler/file-loader.d.ts +10 -0
  89. package/dist/api/compiler/file-loader.js +138 -41
  90. package/dist/api/compiler/identifier-name.d.ts +9 -0
  91. package/dist/api/compiler/identifier-name.js +10 -0
  92. package/dist/api/compiler/instantiation.d.ts +7 -0
  93. package/dist/api/compiler/instantiation.js +101 -49
  94. package/dist/api/compiler/jsdoc.js +27 -25
  95. package/dist/api/compiler/link-tables.d.ts +48 -18
  96. package/dist/api/compiler/link-tables.js +80 -37
  97. package/dist/api/compiler/locales/cs-CZ.d.ts +1 -1
  98. package/dist/api/compiler/locales/cs-CZ.js +1 -1
  99. package/dist/api/compiler/locales/de-DE.d.ts +1 -1
  100. package/dist/api/compiler/locales/de-DE.js +1 -1
  101. package/dist/api/compiler/locales/es-ES.d.ts +1 -1
  102. package/dist/api/compiler/locales/es-ES.js +1 -1
  103. package/dist/api/compiler/locales/fr-FR.d.ts +1 -1
  104. package/dist/api/compiler/locales/fr-FR.js +1 -1
  105. package/dist/api/compiler/locales/it-IT.d.ts +1 -1
  106. package/dist/api/compiler/locales/it-IT.js +1 -1
  107. package/dist/api/compiler/locales/ja-JP.d.ts +1 -1
  108. package/dist/api/compiler/locales/ja-JP.js +1 -1
  109. package/dist/api/compiler/locales/ko-KR.d.ts +1 -1
  110. package/dist/api/compiler/locales/ko-KR.js +1 -1
  111. package/dist/api/compiler/locales/pl-PL.d.ts +1 -1
  112. package/dist/api/compiler/locales/pl-PL.js +1 -1
  113. package/dist/api/compiler/locales/pt-BR.d.ts +1 -1
  114. package/dist/api/compiler/locales/pt-BR.js +1 -1
  115. package/dist/api/compiler/locales/ru-RU.d.ts +1 -1
  116. package/dist/api/compiler/locales/ru-RU.js +1 -1
  117. package/dist/api/compiler/locales/tr-TR.d.ts +1 -1
  118. package/dist/api/compiler/locales/tr-TR.js +1 -1
  119. package/dist/api/compiler/locales/zh-CN.d.ts +1 -1
  120. package/dist/api/compiler/locales/zh-CN.js +1 -1
  121. package/dist/api/compiler/locales/zh-TW.d.ts +1 -1
  122. package/dist/api/compiler/locales/zh-TW.js +1 -1
  123. package/dist/api/compiler/module-resolution-types.js +6 -6
  124. package/dist/api/compiler/module-resolution.d.ts +10 -1
  125. package/dist/api/compiler/module-resolution.js +115 -84
  126. package/dist/api/compiler/module-specifiers.d.ts +15 -0
  127. package/dist/api/compiler/module-specifiers.js +24 -18
  128. package/dist/api/compiler/name-resolver.js +74 -65
  129. package/dist/api/compiler/node-builder-names.d.ts +11 -3
  130. package/dist/api/compiler/node-builder-names.js +210 -90
  131. package/dist/api/compiler/node-builder-pseudo.js +29 -31
  132. package/dist/api/compiler/node-builder-reuse.js +23 -22
  133. package/dist/api/compiler/node-builder.d.ts +18 -1
  134. package/dist/api/compiler/node-builder.js +191 -102
  135. package/dist/api/compiler/option-declarations.d.ts +2 -6
  136. package/dist/api/compiler/option-declarations.js +315 -375
  137. package/dist/api/compiler/options.d.ts +15 -33
  138. package/dist/api/compiler/options.js +21 -54
  139. package/dist/api/compiler/output-paths.d.ts +4 -1
  140. package/dist/api/compiler/output-paths.js +6 -11
  141. package/dist/api/compiler/package-json.d.ts +3 -3
  142. package/dist/api/compiler/package-json.js +11 -10
  143. package/dist/api/compiler/parser.d.ts +42 -20
  144. package/dist/api/compiler/parser.js +318 -224
  145. package/dist/api/compiler/path.d.ts +9 -0
  146. package/dist/api/compiler/path.js +20 -3
  147. package/dist/api/compiler/printer/emit-context.d.ts +3 -1
  148. package/dist/api/compiler/printer/emit-context.js +16 -1
  149. package/dist/api/compiler/printer/factory-base.d.ts +2 -2
  150. package/dist/api/compiler/printer/factory-base.js +7 -3
  151. package/dist/api/compiler/printer/factory.js +6 -3
  152. package/dist/api/compiler/printer/helpers.js +10 -1
  153. package/dist/api/compiler/printer/name-generator.d.ts +1 -1
  154. package/dist/api/compiler/printer/name-generator.js +35 -16
  155. package/dist/api/compiler/printer/printer.d.ts +1 -0
  156. package/dist/api/compiler/printer/printer.js +306 -283
  157. package/dist/api/compiler/printer/utilities.js +149 -147
  158. package/dist/api/compiler/program-checker.d.ts +8 -2
  159. package/dist/api/compiler/program-checker.js +84 -34
  160. package/dist/api/compiler/program-utilities.d.ts +3 -1
  161. package/dist/api/compiler/program-utilities.js +28 -15
  162. package/dist/api/compiler/program.d.ts +2 -0
  163. package/dist/api/compiler/program.js +69 -57
  164. package/dist/api/compiler/pseudo-bigint.d.ts +2 -0
  165. package/dist/api/compiler/pseudo-bigint.js +18 -0
  166. package/dist/api/compiler/regexp-checker.d.ts +1 -1
  167. package/dist/api/compiler/regexp-checker.js +93 -76
  168. package/dist/api/compiler/relations.d.ts +27 -4
  169. package/dist/api/compiler/relations.js +337 -180
  170. package/dist/api/compiler/reparser.js +64 -59
  171. package/dist/api/compiler/scanner.d.ts +27 -2
  172. package/dist/api/compiler/scanner.js +181 -150
  173. package/dist/api/compiler/shared-results.d.ts +696 -0
  174. package/dist/api/compiler/shared-results.js +2905 -0
  175. package/dist/api/compiler/sourcemap.js +2 -2
  176. package/dist/api/compiler/symbol-accessibility.js +87 -74
  177. package/dist/api/compiler/symbol.d.ts +22 -13
  178. package/dist/api/compiler/symbol.js +15 -1
  179. package/dist/api/compiler/syntax-kind.d.ts +198 -197
  180. package/dist/api/compiler/transformers/alias-references.js +247 -139
  181. package/dist/api/compiler/transformers/async-utilities.js +25 -25
  182. package/dist/api/compiler/transformers/async.d.ts +0 -1
  183. package/dist/api/compiler/transformers/async.js +64 -77
  184. package/dist/api/compiler/transformers/class-fields.d.ts +1 -0
  185. package/dist/api/compiler/transformers/class-fields.js +81 -78
  186. package/dist/api/compiler/transformers/commonjs-module.js +18 -15
  187. package/dist/api/compiler/transformers/const-enum-inliner.js +1 -1
  188. package/dist/api/compiler/transformers/declarations-diagnostics.js +247 -244
  189. package/dist/api/compiler/transformers/declarations-pseudo.js +100 -100
  190. package/dist/api/compiler/transformers/declarations-resolver.d.ts +0 -3
  191. package/dist/api/compiler/transformers/declarations-syntactic.d.ts +1 -2
  192. package/dist/api/compiler/transformers/declarations-syntactic.js +134 -156
  193. package/dist/api/compiler/transformers/declarations-tracker.js +18 -18
  194. package/dist/api/compiler/transformers/declarations.d.ts +4 -1
  195. package/dist/api/compiler/transformers/declarations.js +307 -239
  196. package/dist/api/compiler/transformers/decorator-metadata.d.ts +1 -1
  197. package/dist/api/compiler/transformers/decorator-metadata.js +53 -45
  198. package/dist/api/compiler/transformers/decorator-utilities.js +24 -24
  199. package/dist/api/compiler/transformers/destructuring.js +19 -18
  200. package/dist/api/compiler/transformers/emit-resolver.js +1 -1
  201. package/dist/api/compiler/transformers/es-decorators.js +55 -55
  202. package/dist/api/compiler/transformers/external-module-info.js +3 -3
  203. package/dist/api/compiler/transformers/for-await.js +25 -25
  204. package/dist/api/compiler/transformers/import-elision.js +14 -14
  205. package/dist/api/compiler/transformers/jsx.js +12 -12
  206. package/dist/api/compiler/transformers/legacy-decorators.js +17 -17
  207. package/dist/api/compiler/transformers/module.js +8 -8
  208. package/dist/api/compiler/transformers/named-evaluation.js +4 -4
  209. package/dist/api/compiler/transformers/object-rest-spread.js +20 -20
  210. package/dist/api/compiler/transformers/optional-chain.js +10 -10
  211. package/dist/api/compiler/transformers/reference-resolver.d.ts +12 -1
  212. package/dist/api/compiler/transformers/reference-resolver.js +131 -69
  213. package/dist/api/compiler/transformers/runtime-syntax.js +35 -31
  214. package/dist/api/compiler/transformers/subtree-facts.js +47 -47
  215. package/dist/api/compiler/transformers/syntax-facts.js +56 -58
  216. package/dist/api/compiler/transformers/type-eraser.js +73 -66
  217. package/dist/api/compiler/transformers/type-serialization.js +24 -24
  218. package/dist/api/compiler/transformers/using.js +12 -12
  219. package/dist/api/compiler/transformers/utilities.js +77 -77
  220. package/dist/api/compiler/transformers/visitor-base.js +172 -172
  221. package/dist/api/compiler/transformers/visitor-hooks.js +6 -2
  222. package/dist/api/compiler/tsconfig.d.ts +10 -2
  223. package/dist/api/compiler/tsconfig.js +136 -48
  224. package/dist/api/compiler/type-printer.js +40 -3
  225. package/dist/api/compiler/types.d.ts +2 -1
  226. package/dist/api/library/ast.generated.d.ts +42 -39
  227. package/dist/api/library/ast.generated.js +1 -1
  228. package/dist/api/library/compiler-options.generated.d.ts +111 -100
  229. package/dist/api/library/compiler-options.generated.js +1 -1
  230. package/dist/api/library/disk.js +12 -1
  231. package/dist/api/library/enums.generated.d.ts +206 -206
  232. package/dist/api/library/enums.generated.js +206 -206
  233. package/dist/api/library/nodes.js +26 -26
  234. package/package.json +9 -9
  235. package/src/compiler/ast-utilities.ts +99 -7
  236. package/src/compiler/ast.ts +74 -38
  237. package/src/compiler/binder.ts +39 -4
  238. package/src/compiler/cgroup.ts +157 -0
  239. package/src/compiler/character-codes.ts +2 -2
  240. package/src/compiler/checker-calls.ts +76 -8
  241. package/src/compiler/checker-classes.ts +80 -25
  242. package/src/compiler/checker-contextual.ts +110 -1
  243. package/src/compiler/checker-declarations.ts +31 -4
  244. package/src/compiler/checker-declared-types.ts +8 -5
  245. package/src/compiler/checker-decorators.ts +1 -1
  246. package/src/compiler/checker-deprecation.ts +29 -8
  247. package/src/compiler/checker-destructuring.ts +10 -3
  248. package/src/compiler/checker-emit-helpers.ts +1 -0
  249. package/src/compiler/checker-emit-resolver.ts +16 -6
  250. package/src/compiler/checker-expressions.ts +95 -47
  251. package/src/compiler/checker-functions.ts +21 -6
  252. package/src/compiler/checker-generated-code.ts +2 -22
  253. package/src/compiler/checker-grammar.ts +133 -60
  254. package/src/compiler/checker-heritage.ts +22 -21
  255. package/src/compiler/checker-inference.ts +514 -87
  256. package/src/compiler/checker-iteration.ts +18 -31
  257. package/src/compiler/checker-javascript.ts +1 -1
  258. package/src/compiler/checker-jsdoc.ts +50 -27
  259. package/src/compiler/checker-jsx.ts +28 -5
  260. package/src/compiler/checker-members.ts +197 -55
  261. package/src/compiler/checker-modules.ts +332 -65
  262. package/src/compiler/checker-narrowing.ts +98 -19
  263. package/src/compiler/checker-object-literals.ts +3 -0
  264. package/src/compiler/checker-operators.ts +11 -4
  265. package/src/compiler/checker-property-access.ts +7 -2
  266. package/src/compiler/checker-services.ts +39 -12
  267. package/src/compiler/checker-signatures.ts +15 -1
  268. package/src/compiler/checker-source-file.ts +39 -13
  269. package/src/compiler/checker-statements.ts +3 -2
  270. package/src/compiler/checker-symbol-types.ts +29 -6
  271. package/src/compiler/checker-symbols.ts +158 -15
  272. package/src/compiler/checker-type-factory.ts +173 -35
  273. package/src/compiler/checker-type-nodes.ts +46 -3
  274. package/src/compiler/checker-type-operators.ts +83 -26
  275. package/src/compiler/checker-types.ts +147 -4
  276. package/src/compiler/checker-unused.ts +9 -14
  277. package/src/compiler/checker.ts +175 -41
  278. package/src/compiler/command-line.ts +28 -28
  279. package/src/compiler/compile-program.ts +59 -25
  280. package/src/compiler/decoder.ts +15 -5
  281. package/src/compiler/diagnostic-messages.ts +1973 -1892
  282. package/src/compiler/doctor-report.ts +133 -0
  283. package/src/compiler/emitter.ts +57 -8
  284. package/src/compiler/encoder.ts +23 -8
  285. package/src/compiler/expr-record.ts +59 -0
  286. package/src/compiler/file-include.ts +9 -3
  287. package/src/compiler/file-loader.ts +139 -32
  288. package/src/compiler/help.ts +10 -14
  289. package/src/compiler/identifier-name.ts +13 -0
  290. package/src/compiler/incremental.ts +86 -18
  291. package/src/compiler/init.ts +2 -7
  292. package/src/compiler/instantiation.ts +77 -22
  293. package/src/compiler/jsdoc.ts +7 -3
  294. package/src/compiler/link-tables.ts +82 -37
  295. package/src/compiler/locales/cs-CZ.ts +1 -1
  296. package/src/compiler/locales/de-DE.ts +1 -1
  297. package/src/compiler/locales/es-ES.ts +1 -1
  298. package/src/compiler/locales/fr-FR.ts +1 -1
  299. package/src/compiler/locales/it-IT.ts +1 -1
  300. package/src/compiler/locales/ja-JP.ts +1 -1
  301. package/src/compiler/locales/ko-KR.ts +1 -1
  302. package/src/compiler/locales/pl-PL.ts +1 -1
  303. package/src/compiler/locales/pt-BR.ts +1 -1
  304. package/src/compiler/locales/ru-RU.ts +1 -1
  305. package/src/compiler/locales/tr-TR.ts +1 -1
  306. package/src/compiler/locales/zh-CN.ts +1 -1
  307. package/src/compiler/locales/zh-TW.ts +1 -1
  308. package/src/compiler/module-resolution.ts +44 -8
  309. package/src/compiler/module-specifiers.ts +62 -20
  310. package/src/compiler/name-resolver.ts +9 -1
  311. package/src/compiler/node-builder-names.ts +236 -54
  312. package/src/compiler/node-builder-pseudo.ts +4 -7
  313. package/src/compiler/node-builder-reuse.ts +5 -4
  314. package/src/compiler/node-builder.ts +130 -31
  315. package/src/compiler/option-declarations.ts +33 -103
  316. package/src/compiler/options.ts +23 -62
  317. package/src/compiler/output-paths.ts +5 -18
  318. package/src/compiler/package-entrypoints.ts +345 -0
  319. package/src/compiler/package-json.ts +4 -4
  320. package/src/compiler/parallel-check.ts +543 -147
  321. package/src/compiler/parallel-emit.ts +4 -4
  322. package/src/compiler/parser.ts +166 -47
  323. package/src/compiler/path.ts +22 -2
  324. package/src/compiler/printer/emit-context.ts +16 -0
  325. package/src/compiler/printer/factory-base.ts +10 -3
  326. package/src/compiler/printer/factory.ts +7 -3
  327. package/src/compiler/printer/helpers.ts +10 -1
  328. package/src/compiler/printer/name-generator.ts +24 -2
  329. package/src/compiler/printer/printer.ts +39 -16
  330. package/src/compiler/printer/utilities.ts +8 -2
  331. package/src/compiler/program-checker.ts +53 -5
  332. package/src/compiler/program-utilities.ts +23 -10
  333. package/src/compiler/program.ts +13 -1
  334. package/src/compiler/pseudo-bigint.ts +17 -0
  335. package/src/compiler/regexp-checker.ts +63 -30
  336. package/src/compiler/relations.ts +233 -77
  337. package/src/compiler/reparser.ts +14 -5
  338. package/src/compiler/run-config.ts +1383 -0
  339. package/src/compiler/run-record-read.ts +87 -0
  340. package/src/compiler/run-records.ts +575 -0
  341. package/src/compiler/scanner.ts +166 -120
  342. package/src/compiler/shared-results.ts +3144 -0
  343. package/src/compiler/show-config.ts +18 -1
  344. package/src/compiler/sourcemap.ts +2 -2
  345. package/src/compiler/symbol-accessibility.ts +26 -3
  346. package/src/compiler/symbol.ts +31 -14
  347. package/src/compiler/syntax-kind.ts +188 -187
  348. package/src/compiler/thread-entry.ts +22 -3
  349. package/src/compiler/transformers/alias-references.ts +123 -4
  350. package/src/compiler/transformers/async.ts +2 -17
  351. package/src/compiler/transformers/class-fields.ts +13 -12
  352. package/src/compiler/transformers/commonjs-module.ts +11 -7
  353. package/src/compiler/transformers/declarations-diagnostics.ts +5 -3
  354. package/src/compiler/transformers/declarations-pseudo.ts +2 -4
  355. package/src/compiler/transformers/declarations-resolver.ts +0 -3
  356. package/src/compiler/transformers/declarations-syntactic.ts +1 -21
  357. package/src/compiler/transformers/declarations.ts +136 -49
  358. package/src/compiler/transformers/decorator-metadata.ts +9 -1
  359. package/src/compiler/transformers/destructuring.ts +4 -3
  360. package/src/compiler/transformers/external-module-info.ts +1 -1
  361. package/src/compiler/transformers/jsx.ts +2 -1
  362. package/src/compiler/transformers/reference-resolver.ts +83 -19
  363. package/src/compiler/transformers/runtime-syntax.ts +6 -1
  364. package/src/compiler/transformers/syntax-facts.ts +2 -7
  365. package/src/compiler/transformers/type-eraser.ts +10 -1
  366. package/src/compiler/transformers/type-serialization.ts +3 -2
  367. package/src/compiler/transformers/visitor-base.ts +2 -1
  368. package/src/compiler/transformers/visitor-hooks.ts +9 -4
  369. package/src/compiler/tsc-build.ts +67 -6
  370. package/src/compiler/tsc-cli.ts +35 -4
  371. package/src/compiler/tsc-compile.ts +220 -10
  372. package/src/compiler/tsc-watch.ts +97 -47
  373. package/src/compiler/tsconfig.ts +176 -19
  374. package/src/compiler/type-printer.ts +36 -2
  375. package/src/compiler/types.ts +2 -1
  376. package/src/library/ast.generated.ts +57 -41
  377. package/src/library/compiler-options.generated.ts +117 -103
  378. package/src/library/disk.ts +10 -1
  379. package/src/library/enums.generated.ts +196 -196
@@ -107,3 +107,5 @@ export declare function isMemberOfStringMapping(c: Checker, source: Type, target
107
107
  export type { TupleType, UnionType };
108
108
  /** The generic mapped type an instantiated mapped type came from, or the type itself. */
109
109
  export declare function mappedTypeTarget(t: MappedType): MappedType;
110
+ /** The key of the member of a conditional type instantiation's distribution for one constituent (shared-results.ts). */
111
+ export declare function distributedKey(root: number, typeArguments: readonly Type[], alias: TypeAlias | undefined, tag: number, constituent: Type): string;
@@ -5,9 +5,9 @@ import { getTypeOfPropertyOfContextualType } from './checker-contextual.js';
5
5
  import { checkDeprecatedIndexedAccess } from './checker-deprecation.js';
6
6
  import { isSelfTypeAccess, markPropertyAsReferenced } from './checker-unused.js';
7
7
  import { getName, getQuestionToken, getType, getSymbol, getDotDotDotToken, getElements, getExpression, getText, } from './ast.js';
8
- import { cachedTypeKey, ConditionalRoot, ConditionalType, IndexInfo, StringMappingType, appendTypeMapping, prependTypeMapping, newTypeMapper, ReferenceArgs, } from './checker-types.js';
8
+ import { cachedTypeKey, ConditionalRoot, ConditionalType, IndexInfo, ConditionalResultKey, DistributedConditional, StringMappingType, appendTypeMapping, prependTypeMapping, newTypeMapper, ReferenceArgs, getMappedType, getNonDistributedTypeParameter, } from './checker-types.js';
9
9
  import { aliasKey, createArrayTypeEx, createTupleTypeEx, everyType, filterType, getElementTypes, getIntersectionType, getIntersectionTypeEx, getRegularTypeOfLiteralType, getStringLiteralType, getTemplateLiteralType, getTotalFixedElementCount, getTypeArguments, getUnionType, getUnionTypeEx, isArrayType, isEmptyAnonymousObjectType, isErrorType, isGenericStringLikeType, isGenericTupleType, isPatternLiteralType, isReadonlyArrayType, isTupleType, mapType, mapTypeEx, intersectTypes, mapTypeWithAlias, newIndexType, newIndexedAccessType, newObjectType, newSubstitutionType, setStructuredTypeMembers, someType, tupleTargetOf, typeListKey, typesOf, typeListHash, } from './checker-type-factory.js';
10
- import { appendIndexInfo, getApparentType, getApplicableIndexInfo, getDeclarationModifierFlagsFromSymbol, getIndexInfoOfType, getPropertyOfObjectType, getIndexInfosOfType, getPropertiesOfType, getPropertyOfType, getReducedApparentType, getReducedType, getBaseConstraintOfType, getIndexTypeOfType, hasPropertiesOfType, keepPropertiesOnly, memberResolutionFlags, } from './checker-members.js';
10
+ import { appendIndexInfo, getApparentType, getApplicableIndexInfo, getDeclarationModifierFlagsFromSymbol, getIndexInfoOfType, getPropertyOfObjectType, getIndexInfosOfType, getPropertiesOfType, getPropertyOfType, getReducedApparentType, getReducedType, getBaseConstraintOfType, getIndexTypeOfType, hasPropertiesOfType, keepPropertiesOnly, } from './checker-members.js';
11
11
  import { getLateBoundSymbol, getSymbolOfDeclaration, popTypeResolution, pushTypeResolution, getParentOfSymbol, findResolutionCycleStartIndex, getFullyQualifiedName, } from './checker-symbols.js';
12
12
  import { getConstraintOfTypeParameter, getDeclaredTypeOfTypeParameter, getElementTypeOfArrayType, getInferTypeParameters, getOuterTypeParameters, hasNonCircularBaseConstraint, } from './checker-declared-types.js';
13
13
  import { addOptionality, getOptionalType, getTypeOfSymbol, getWriteTypeOfSymbol, isReadonlySymbol, removeMissingOrUndefinedType, } from './checker-symbol-types.js';
@@ -144,12 +144,7 @@ function getIndexTypeForGenericType(c, t, indexFlags) {
144
144
  return indexType;
145
145
  }
146
146
  export function getLiteralTypeFromProperties(c, t, include, includeOrigin) {
147
- const key = 'props' +
148
- t.id +
149
- ':' +
150
- include +
151
- (includeOrigin ? 'o' : '') +
152
- ((memberResolutionFlags(c, t) & 536870912 /* ObjectFlags.UnresolvedMembers */) !== 0 ? 'u' : '');
147
+ const key = 'props' + t.id + ':' + include + (includeOrigin ? 'o' : '');
153
148
  const cached = c.cachedTypes.get(key);
154
149
  if (cached !== undefined)
155
150
  return cached;
@@ -198,13 +193,13 @@ export function getLiteralTypeFromPropertyName(c, name) {
198
193
  return c.neverType;
199
194
  if (name.kind === 8 /* SyntaxKind.NumericLiteral */)
200
195
  return getRegularTypeOfLiteralType(c, checkExpression(c, name));
201
- if (name.kind === 168 /* SyntaxKind.ComputedPropertyName */)
196
+ if (name.kind === 169 /* SyntaxKind.ComputedPropertyName */)
202
197
  return getRegularTypeOfLiteralType(c, checkComputedPropertyName(c, name));
203
198
  if (name.kind === 79 /* SyntaxKind.Identifier */ ||
204
199
  name.kind === 10 /* SyntaxKind.StringLiteral */ ||
205
200
  name.kind === 14 /* SyntaxKind.NoSubstitutionTemplateLiteral */)
206
201
  return getStringLiteralType(c, getText(name));
207
- if (name.kind === 296 /* SyntaxKind.JsxNamespacedName */)
202
+ if (name.kind === 297 /* SyntaxKind.JsxNamespacedName */)
208
203
  return getStringLiteralType(c, nodeText(name));
209
204
  if (name.kind === 9 /* SyntaxKind.BigIntLiteral */)
210
205
  return getRegularTypeOfLiteralType(c, checkExpression(c, name));
@@ -352,6 +347,8 @@ export function getIndexedAccessTypeOrUndefinedEx(c, objectType, indexType, acce
352
347
  let t = c.indexedAccessTypes.get(key);
353
348
  if (t === undefined) {
354
349
  t = newIndexedAccessType(c, objectType, indexType, persistent);
350
+ if (c.indexedAccessKeyFlags !== undefined)
351
+ c.indexedAccessKeyFlags.set(t, accessFlags);
355
352
  t.alias = alias;
356
353
  c.indexedAccessTypes.set(key, t);
357
354
  }
@@ -382,7 +379,7 @@ export function getIndexedAccessTypeOrUndefinedEx(c, objectType, indexType, acce
382
379
  function shouldDeferIndexedAccessType(c, objectType, indexType, accessNode) {
383
380
  if (isGenericIndexType(c, indexType))
384
381
  return true;
385
- if (accessNode !== undefined && accessNode.kind !== 200 /* SyntaxKind.IndexedAccessType */)
382
+ if (accessNode !== undefined && accessNode.kind !== 201 /* SyntaxKind.IndexedAccessType */)
386
383
  return (isGenericTupleType(objectType) &&
387
384
  !indexTypeLessThan(indexType, getTotalFixedElementCount(tupleTargetOf(objectType))));
388
385
  return ((isGenericObjectType(c, objectType) &&
@@ -439,7 +436,7 @@ export function getPropertyNameFromIndex(indexType) {
439
436
  }
440
437
  /** The type of the property `indexType` selects; reporting of access errors happens in element access checks. */
441
438
  function getPropertyTypeForIndexType(c, originalObjectType, objectType, indexType, fullIndexType, accessNode, accessFlags) {
442
- const accessExpression = accessNode !== undefined && accessNode.kind === 213 /* SyntaxKind.ElementAccessExpression */ ? accessNode : undefined;
439
+ const accessExpression = accessNode !== undefined && accessNode.kind === 214 /* SyntaxKind.ElementAccessExpression */ ? accessNode : undefined;
443
440
  const propName = accessNode !== undefined && accessNode.kind === 80 /* SyntaxKind.PrivateIdentifier */
444
441
  ? undefined
445
442
  : getPropertyNameFromIndex(indexType);
@@ -454,7 +451,7 @@ function getPropertyTypeForIndexType(c, originalObjectType, objectType, indexTyp
454
451
  if (accessExpression !== undefined) {
455
452
  markPropertyAsReferenced(c, prop, accessExpression, isSelfTypeAccess(c, getExpression(accessExpression), objectType.symbol));
456
453
  if (isAssignmentToReadonlyEntity(c, accessExpression, prop, getAssignmentTargetKind(accessExpression))) {
457
- c.error(accessExpression.argumentExpression, 697 /* Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property */, isLateBoundName(prop.name) ? symbolToString(c, prop) : prop.name);
454
+ c.error(accessExpression.argumentExpression, 704 /* Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property */, isLateBoundName(prop.name) ? symbolToString(c, prop) : prop.name);
458
455
  return undefined;
459
456
  }
460
457
  if ((accessFlags & 8 /* AccessFlags.CacheSymbol */) !== 0)
@@ -466,7 +463,7 @@ function getPropertyTypeForIndexType(c, originalObjectType, objectType, indexTyp
466
463
  // Each property an element access reads is narrowed by itself, as a reference to that property.
467
464
  if (accessExpression !== undefined && getAssignmentTargetKind(accessExpression) !== 1 /* AssignmentKind.Definite */)
468
465
  return getFlowTypeOfReference(c, accessExpression, propType, propType, undefined);
469
- if (accessNode !== undefined && accessNode.kind === 200 /* SyntaxKind.IndexedAccessType */ && containsMissing(c, propType))
466
+ if (accessNode !== undefined && accessNode.kind === 201 /* SyntaxKind.IndexedAccessType */ && containsMissing(c, propType))
470
467
  return getUnionType(c, [propType, c.undefinedType]);
471
468
  return propType;
472
469
  }
@@ -478,13 +475,13 @@ function getPropertyTypeForIndexType(c, originalObjectType, objectType, indexTyp
478
475
  const indexNode = getIndexNodeForAccessExpression(accessNode);
479
476
  if (isTupleType(objectType)) {
480
477
  if (index < 0) {
481
- c.error(indexNode, 674 /* Diagnostics.A_tuple_type_cannot_be_indexed_with_a_negative_value */);
478
+ c.error(indexNode, 681 /* Diagnostics.A_tuple_type_cannot_be_indexed_with_a_negative_value */);
482
479
  return c.undefinedType;
483
480
  }
484
- c.error(indexNode, 653 /* Diagnostics.Tuple_type_0_of_length_1_has_no_element_at_index_2 */, typeToString(c, objectType), String(tupleTargetOf(objectType).typeParameterCount()), propName);
481
+ c.error(indexNode, 660 /* Diagnostics.Tuple_type_0_of_length_1_has_no_element_at_index_2 */, typeToString(c, objectType), String(tupleTargetOf(objectType).typeParameterCount()), propName);
485
482
  }
486
483
  else
487
- c.error(indexNode, 516 /* Diagnostics.Property_0_does_not_exist_on_type_1 */, propName, typeToString(c, objectType));
484
+ c.error(indexNode, 523 /* Diagnostics.Property_0_does_not_exist_on_type_1 */, propName, typeToString(c, objectType));
488
485
  }
489
486
  if (index >= 0) {
490
487
  errorIfWritingToReadonlyIndex(c, getIndexInfoOfType(c, objectType, c.numberType), objectType, accessExpression);
@@ -502,16 +499,16 @@ function getPropertyTypeForIndexType(c, originalObjectType, objectType, indexTyp
502
499
  if ((accessFlags & 2 /* AccessFlags.NoIndexSignatures */) !== 0 && indexInfo.keyType !== c.numberType) {
503
500
  if (accessExpression !== undefined) {
504
501
  if ((accessFlags & 4 /* AccessFlags.Writing */) !== 0)
505
- c.error(accessExpression, 982 /* Diagnostics.Type_0_is_generic_and_can_only_be_indexed_for_reading */, typeToString(c, originalObjectType));
502
+ c.error(accessExpression, 989 /* Diagnostics.Type_0_is_generic_and_can_only_be_indexed_for_reading */, typeToString(c, originalObjectType));
506
503
  else
507
- c.error(accessExpression, 693 /* Diagnostics.Type_0_cannot_be_used_to_index_type_1 */, typeToString(c, indexType), typeToString(c, originalObjectType));
504
+ c.error(accessExpression, 700 /* Diagnostics.Type_0_cannot_be_used_to_index_type_1 */, typeToString(c, indexType), typeToString(c, originalObjectType));
508
505
  }
509
506
  return undefined;
510
507
  }
511
508
  if (accessNode !== undefined &&
512
509
  indexInfo.keyType === c.stringType &&
513
510
  !isTypeAssignableToKind(c, indexType, 32 /* TypeFlags.String */ | 64 /* TypeFlags.Number */)) {
514
- c.error(getIndexNodeForAccessExpression(accessNode), 695 /* Diagnostics.Type_0_cannot_be_used_as_an_index_type */, typeToString(c, indexType));
511
+ c.error(getIndexNodeForAccessExpression(accessNode), 702 /* Diagnostics.Type_0_cannot_be_used_as_an_index_type */, typeToString(c, indexType));
515
512
  return (accessFlags & 1 /* AccessFlags.IncludeUndefined */) !== 0
516
513
  ? getUnionType(c, [indexInfo.valueType, c.missingType])
517
514
  : indexInfo.valueType;
@@ -534,7 +531,7 @@ function getPropertyTypeForIndexType(c, originalObjectType, objectType, indexTyp
534
531
  if (accessExpression !== undefined && !isConstEnumObjectType(objectType)) {
535
532
  if (isObjectLiteralType(objectType)) {
536
533
  if (c.noImplicitAny && (indexType.flags & (1024 /* TypeFlags.StringLiteral */ | 2048 /* TypeFlags.NumberLiteral */)) !== 0) {
537
- c.error(accessExpression, 516 /* Diagnostics.Property_0_does_not_exist_on_type_1 */, getPropertyNameFromType(indexType), typeToString(c, objectType));
534
+ c.error(accessExpression, 523 /* Diagnostics.Property_0_does_not_exist_on_type_1 */, getPropertyNameFromType(indexType), typeToString(c, objectType));
538
535
  return c.undefinedType;
539
536
  }
540
537
  if ((indexType.flags & (64 /* TypeFlags.Number */ | 32 /* TypeFlags.String */)) !== 0) {
@@ -549,42 +546,42 @@ function getPropertyTypeForIndexType(c, originalObjectType, objectType, indexTyp
549
546
  ? c.globalThisSymbol.exports?.get(propName)
550
547
  : undefined;
551
548
  if (globalSymbol !== undefined && (globalSymbol.flags & 418 /* SymbolFlags.BlockScoped */) !== 0)
552
- c.error(accessExpression, 516 /* Diagnostics.Property_0_does_not_exist_on_type_1 */, propName, typeToString(c, objectType));
549
+ c.error(accessExpression, 523 /* Diagnostics.Property_0_does_not_exist_on_type_1 */, propName, typeToString(c, objectType));
553
550
  else if (c.noImplicitAny && (accessFlags & 128 /* AccessFlags.SuppressNoImplicitAnyError */) === 0) {
554
551
  const argument = accessExpression.argumentExpression;
555
552
  const objectText = typeToString(c, objectType);
556
553
  const suggestion = propName !== undefined ? getSuggestionForNonexistentProperty(c, propName, objectType) : undefined;
557
554
  if (propName !== undefined && typeHasStaticProperty(c, propName, objectType))
558
- c.error(accessExpression, 727 /* Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead */, propName, objectText, objectText + '[' + getTextOfNodeFromSourceText(getSourceFileOfNode(argument).text, argument) + ']');
555
+ c.error(accessExpression, 734 /* Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead */, propName, objectText, objectText + '[' + getTextOfNodeFromSourceText(getSourceFileOfNode(argument).text, argument) + ']');
559
556
  else if (getIndexTypeOfType(c, objectType, c.numberType) !== undefined)
560
- c.error(argument, 1687 /* Diagnostics.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number */);
557
+ c.error(argument, 1706 /* Diagnostics.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number */);
561
558
  else if (suggestion !== undefined)
562
- c.error(argument, 706 /* Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2 */, propName, objectText, suggestion.name);
559
+ c.error(argument, 713 /* Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2 */, propName, objectText, suggestion.name);
563
560
  else {
564
561
  const methodSuggestion = getSuggestionForNonexistentIndexSignature(c, objectType, accessExpression, indexType);
565
562
  if (methodSuggestion !== '') {
566
- c.error(accessExpression, 1723 /* Diagnostics.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1 */, objectText, methodSuggestion);
563
+ c.error(accessExpression, 1742 /* Diagnostics.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1 */, objectText, methodSuggestion);
567
564
  return undefined;
568
565
  }
569
566
  let head = undefined;
570
567
  if ((indexType.flags & 32768 /* TypeFlags.EnumLiteral */) !== 0)
571
- head = createDiagnosticForNode(accessExpression, 516 /* Diagnostics.Property_0_does_not_exist_on_type_1 */, [
568
+ head = createDiagnosticForNode(accessExpression, 523 /* Diagnostics.Property_0_does_not_exist_on_type_1 */, [
572
569
  '[' + typeToString(c, indexType) + ']',
573
570
  objectText,
574
571
  ]);
575
572
  else if ((indexType.flags & 16384 /* TypeFlags.UniqueESSymbol */) !== 0)
576
- head = createDiagnosticForNode(accessExpression, 516 /* Diagnostics.Property_0_does_not_exist_on_type_1 */, [
573
+ head = createDiagnosticForNode(accessExpression, 523 /* Diagnostics.Property_0_does_not_exist_on_type_1 */, [
577
574
  '[' + getFullyQualifiedName(c, indexType.symbol, accessExpression) + ']',
578
575
  objectText,
579
576
  ]);
580
577
  else if ((indexType.flags & (1024 /* TypeFlags.StringLiteral */ | 2048 /* TypeFlags.NumberLiteral */)) !== 0)
581
- head = createDiagnosticForNode(accessExpression, 516 /* Diagnostics.Property_0_does_not_exist_on_type_1 */, [
578
+ head = createDiagnosticForNode(accessExpression, 523 /* Diagnostics.Property_0_does_not_exist_on_type_1 */, [
582
579
  getPropertyNameFromType(indexType),
583
580
  objectText,
584
581
  ]);
585
582
  else if ((indexType.flags & (64 /* TypeFlags.Number */ | 32 /* TypeFlags.String */)) !== 0)
586
- head = createDiagnosticForNode(accessExpression, 1725 /* Diagnostics.No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1 */, [typeToString(c, indexType), objectText]);
587
- const diagnostic = createDiagnosticForNode(accessExpression, 1724 /* Diagnostics.Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1 */, [typeToString(c, fullIndexType), objectText]);
583
+ head = createDiagnosticForNode(accessExpression, 1744 /* Diagnostics.No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1 */, [typeToString(c, indexType), objectText]);
584
+ const diagnostic = createDiagnosticForNode(accessExpression, 1743 /* Diagnostics.Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1 */, [typeToString(c, fullIndexType), objectText]);
588
585
  if (head !== undefined)
589
586
  diagnostic.addMessageChain(head);
590
587
  c.addDiagnostic(diagnostic);
@@ -601,11 +598,11 @@ function getPropertyTypeForIndexType(c, originalObjectType, objectType, indexTyp
601
598
  const indexNode = getIndexNodeForAccessExpression(accessNode);
602
599
  if (indexNode.kind !== 9 /* SyntaxKind.BigIntLiteral */ &&
603
600
  (indexType.flags & (1024 /* TypeFlags.StringLiteral */ | 2048 /* TypeFlags.NumberLiteral */)) !== 0)
604
- c.error(indexNode, 516 /* Diagnostics.Property_0_does_not_exist_on_type_1 */, getPropertyNameFromType(indexType), typeToString(c, objectType));
601
+ c.error(indexNode, 523 /* Diagnostics.Property_0_does_not_exist_on_type_1 */, getPropertyNameFromType(indexType), typeToString(c, objectType));
605
602
  else if ((indexType.flags & (32 /* TypeFlags.String */ | 64 /* TypeFlags.Number */)) !== 0)
606
- c.error(indexNode, 694 /* Diagnostics.Type_0_has_no_matching_index_signature_for_type_1 */, typeToString(c, objectType), typeToString(c, indexType));
603
+ c.error(indexNode, 701 /* Diagnostics.Type_0_has_no_matching_index_signature_for_type_1 */, typeToString(c, objectType), typeToString(c, indexType));
607
604
  else
608
- c.error(indexNode, 695 /* Diagnostics.Type_0_cannot_be_used_as_an_index_type */, indexNode.kind === 9 /* SyntaxKind.BigIntLiteral */ ? 'bigint' : typeToString(c, indexType));
605
+ c.error(indexNode, 702 /* Diagnostics.Type_0_cannot_be_used_as_an_index_type */, indexNode.kind === 9 /* SyntaxKind.BigIntLiteral */ ? 'bigint' : typeToString(c, indexType));
609
606
  }
610
607
  if ((indexType.flags & 1 /* TypeFlags.Any */) !== 0)
611
608
  return indexType;
@@ -616,7 +613,7 @@ function errorIfWritingToReadonlyIndex(c, indexInfo, objectType, accessExpressio
616
613
  indexInfo.isReadonly &&
617
614
  accessExpression !== undefined &&
618
615
  (isAssignmentTarget(accessExpression) || isDeleteTarget(accessExpression)))
619
- c.error(accessExpression, 698 /* Diagnostics.Index_signature_in_type_0_only_permits_reading */, typeToString(c, objectType));
616
+ c.error(accessExpression, 705 /* Diagnostics.Index_signature_in_type_0_only_permits_reading */, typeToString(c, objectType));
620
617
  }
621
618
  /** `obj.get` or `obj.set` for keyed access to a type with such methods instead of an index signature. */
622
619
  function getSuggestionForNonexistentIndexSignature(c, objectType, expr, keyedType) {
@@ -632,7 +629,7 @@ function getSuggestionForNonexistentIndexSignature(c, objectType, expr, keyedTyp
632
629
  const target = getExpression(expr);
633
630
  if (target.kind === 79 /* SyntaxKind.Identifier */)
634
631
  return getText(target) + '.' + suggestedMethod;
635
- if (target.kind === 212 /* SyntaxKind.PropertyAccessExpression */ && isEntityNameExpression(target, false))
632
+ if (target.kind === 213 /* SyntaxKind.PropertyAccessExpression */ && isEntityNameExpression(target, false))
636
633
  return getTextOfNodeFromSourceText(getSourceFileOfNode(target).text, target) + '.' + suggestedMethod;
637
634
  return suggestedMethod;
638
635
  }
@@ -648,11 +645,11 @@ function containsMissing(c, t) {
648
645
  return t === c.missingType || ((t.flags & 134217728 /* TypeFlags.Union */) !== 0 && typesOf(t)[0] === c.missingType);
649
646
  }
650
647
  function getIndexNodeForAccessExpression(accessNode) {
651
- if (accessNode.kind === 213 /* SyntaxKind.ElementAccessExpression */)
648
+ if (accessNode.kind === 214 /* SyntaxKind.ElementAccessExpression */)
652
649
  return accessNode.argumentExpression;
653
- if (accessNode.kind === 200 /* SyntaxKind.IndexedAccessType */)
650
+ if (accessNode.kind === 201 /* SyntaxKind.IndexedAccessType */)
654
651
  return accessNode.indexType;
655
- if (accessNode.kind === 168 /* SyntaxKind.ComputedPropertyName */)
652
+ if (accessNode.kind === 169 /* SyntaxKind.ComputedPropertyName */)
656
653
  return getExpression(accessNode);
657
654
  return accessNode;
658
655
  }
@@ -771,10 +768,30 @@ export function getSimplifiedType(c, t, writing) {
771
768
  return getSimplifiedIndexedAccessType(c, t, writing);
772
769
  if ((t.flags & 67108864 /* TypeFlags.Conditional */) !== 0)
773
770
  return getSimplifiedConditionalType(c, t, writing);
771
+ if ((t.flags & 2097152 /* TypeFlags.Index */) !== 0)
772
+ return getSimplifiedIndexType(c, t);
773
+ return t;
774
+ }
775
+ /** Simplifies `keyof` a generic mapped type with an `as` clause to the type of the keys it produces. */
776
+ function getSimplifiedIndexType(c, t) {
777
+ const target = t.target;
778
+ if (isGenericMappedType(c, target) &&
779
+ getNameTypeFromMappedType(c, target) !== undefined &&
780
+ !isMappedTypeWithKeyofConstraintDeclaration(c, target))
781
+ return getIndexForMappedType(c, target, 0 /* IndexFlags.None */);
774
782
  return t;
775
783
  }
776
784
  /** Simplifies `T extends U ? T : never` and `T extends U ? never : T` when the outcome is known. */
777
785
  function getSimplifiedConditionalType(c, t, writing) {
786
+ const key = cachedTypeKey(writing ? 19 /* CachedTypeKind.SimplifiedConditionalForWriting */ : 18 /* CachedTypeKind.SimplifiedConditionalForReading */, t.id);
787
+ const cached = c.cachedTypesById.get(key);
788
+ if (cached !== undefined)
789
+ return cached;
790
+ const result = getSimplifiedConditionalTypeWorker(c, t, writing);
791
+ c.cachedTypesById.set(key, result);
792
+ return result;
793
+ }
794
+ function getSimplifiedConditionalTypeWorker(c, t, writing) {
778
795
  const checkType = t.checkType;
779
796
  const extendsType = t.extendsType;
780
797
  const trueType = getTrueTypeFromConditionalType(c, t);
@@ -1052,7 +1069,7 @@ function getConstraintDeclarationForMappedType(t) {
1052
1069
  export function isMappedTypeWithKeyofConstraintDeclaration(c, t) {
1053
1070
  const constraint = getConstraintDeclarationForMappedType(t);
1054
1071
  return (constraint !== undefined &&
1055
- constraint.kind === 199 /* SyntaxKind.TypeOperator */ &&
1072
+ constraint.kind === 200 /* SyntaxKind.TypeOperator */ &&
1056
1073
  constraint.operator === 143 /* SyntaxKind.KeyOfKeyword */);
1057
1074
  }
1058
1075
  export function getModifiersTypeFromMappedType(c, t) {
@@ -1065,7 +1082,9 @@ export function getModifiersTypeFromMappedType(c, t) {
1065
1082
  else {
1066
1083
  const declaredType = getTypeFromMappedTypeNode(c, t.declaration);
1067
1084
  const constraint = getConstraintTypeFromMappedType(c, declaredType);
1068
- const extended = (constraint.flags & 524288 /* TypeFlags.TypeParameter */) !== 0 ? getConstraintOfTypeParameter(c, constraint) : constraint;
1085
+ const extended = (constraint.flags & 524288 /* TypeFlags.TypeParameter */) !== 0
1086
+ ? getConstraintOfTypeParameter(c, getNonDistributedTypeParameter(constraint))
1087
+ : constraint;
1069
1088
  side.modifiersType =
1070
1089
  extended !== undefined && (extended.flags & 2097152 /* TypeFlags.Index */) !== 0
1071
1090
  ? instantiateType(c, extended.target, t.mapper)
@@ -1088,11 +1107,12 @@ export function getActualTypeVariable(c, t) {
1088
1107
  return getActualTypeVariable(c, t.baseType);
1089
1108
  if ((t.flags & 33554432 /* TypeFlags.IndexedAccess */) !== 0) {
1090
1109
  const access = t;
1091
- if ((access.objectType.flags & 16777216 /* TypeFlags.Substitution */) !== 0 ||
1092
- (access.indexType.flags & 16777216 /* TypeFlags.Substitution */) !== 0)
1093
- return getIndexedAccessType(c, getActualTypeVariable(c, access.objectType), getActualTypeVariable(c, access.indexType));
1110
+ const objectType = getActualTypeVariable(c, access.objectType);
1111
+ const indexType = getActualTypeVariable(c, access.indexType);
1112
+ if (objectType !== access.objectType || indexType !== access.indexType)
1113
+ return getIndexedAccessType(c, objectType, indexType);
1094
1114
  }
1095
- return t;
1115
+ return getNonDistributedTypeParameter(t);
1096
1116
  }
1097
1117
  export function getMappedTypeNameTypeKind(c, t) {
1098
1118
  const nameType = getNameTypeFromMappedType(c, t);
@@ -1141,13 +1161,13 @@ export function resolveMappedTypeMembers(c, t) {
1141
1161
  !isOptional &&
1142
1162
  modifiersProp !== undefined &&
1143
1163
  (modifiersProp.flags & 16777216 /* SymbolFlags.Optional */) !== 0;
1144
- const lateFlag = modifiersProp !== undefined ? modifiersProp.checkFlags & 4096 /* CheckFlags.Late */ : 0;
1164
+ const lateFlag = modifiersProp !== undefined ? modifiersProp.checkFlags & 32768 /* CheckFlags.Late */ : 0;
1145
1165
  const prop = c.newSymbol(4 /* SymbolFlags.Property */ | (isOptional ? 16777216 /* SymbolFlags.Optional */ : 0), propName);
1146
1166
  prop.checkFlags =
1147
1167
  lateFlag |
1148
- 262144 /* CheckFlags.Mapped */ |
1168
+ 2097152 /* CheckFlags.Mapped */ |
1149
1169
  (isReadonly ? 8 /* CheckFlags.Readonly */ : 0) |
1150
- (stripOptional ? 524288 /* CheckFlags.StripOptional */ : 0);
1170
+ (stripOptional ? 4194304 /* CheckFlags.StripOptional */ : 0);
1151
1171
  const symbolId = getSymbolId(prop);
1152
1172
  c.symbolContainingTypes.set(symbolId, t);
1153
1173
  c.symbolNameTypes.set(symbolId, propNameType);
@@ -1205,7 +1225,7 @@ export function getTypeOfMappedSymbol(c, symbol) {
1205
1225
  (symbol.flags & 16777216 /* SymbolFlags.Optional */) !== 0 &&
1206
1226
  !maybeTypeOfKind(propType, 4 /* TypeFlags.Undefined */ | 16 /* TypeFlags.Void */))
1207
1227
  propType = getOptionalType(c, propType, true);
1208
- else if ((symbol.checkFlags & 524288 /* CheckFlags.StripOptional */) !== 0)
1228
+ else if ((symbol.checkFlags & 4194304 /* CheckFlags.StripOptional */) !== 0)
1209
1229
  propType = removeMissingOrUndefinedType(c, propType);
1210
1230
  if (popTypeResolution(c)) {
1211
1231
  if (c.symbolTypes.get(id) === undefined)
@@ -1214,7 +1234,7 @@ export function getTypeOfMappedSymbol(c, symbol) {
1214
1234
  else {
1215
1235
  if (c.symbolTypes.get(id) === undefined)
1216
1236
  c.symbolTypes.set(id, c.errorType);
1217
- c.error(c.currentNode, 759 /* Diagnostics.Type_of_property_0_circularly_references_itself_in_mapped_type_1 */, symbolToString(c, symbol), typeToString(c, mappedType));
1237
+ c.error(c.currentNode, 766 /* Diagnostics.Type_of_property_0_circularly_references_itself_in_mapped_type_1 */, symbolToString(c, symbol), typeToString(c, mappedType));
1218
1238
  }
1219
1239
  return c.symbolTypes.get(id);
1220
1240
  }
@@ -1329,7 +1349,7 @@ function instantiateMappedTypeTemplate(c, t, key, isOptional, mapper) {
1329
1349
  !maybeTypeOfKind(propType, 4 /* TypeFlags.Undefined */ | 16 /* TypeFlags.Void */))
1330
1350
  return getOptionalType(c, propType, true);
1331
1351
  if (c.strictNullChecks && (modifiers & 8 /* MappedTypeModifiers.ExcludeOptional */) !== 0 && isOptional)
1332
- return filterType(c, propType, (u) => (u.flags & 4 /* TypeFlags.Undefined */) === 0);
1352
+ return removeMissingOrUndefinedType(c, propType);
1333
1353
  return propType;
1334
1354
  }
1335
1355
  export function instantiateReverseMappedType(c, t, mapper) {
@@ -1375,33 +1395,48 @@ export function getConditionalTypeInstantiation(c, t, mapper, forConstraint, ali
1375
1395
  if (result === undefined) {
1376
1396
  const newMapper = newTypeMapper(root.outerTypeParameters, typeArguments);
1377
1397
  const checkType = root.checkType;
1378
- const distributionType = root.isDistributive ? getReducedType(c, newMapper.map(checkType)) : undefined;
1398
+ const distributionType = root.isDistributive ? getReducedType(c, getMappedType(checkType, newMapper)) : undefined;
1379
1399
  // Distributive conditional types distribute over unions.
1380
1400
  if (distributionType !== undefined &&
1381
1401
  checkType !== distributionType &&
1382
- (distributionType.flags & (134217728 /* TypeFlags.Union */ | 262144 /* TypeFlags.Never */)) !== 0)
1383
- result = mapTypeWithAlias(c, distributionType, (u) => getConditionalType(c, root, prependTypeMapping(checkType, u, newMapper), forConstraint, undefined), alias);
1402
+ (distributionType.flags & (134217728 /* TypeFlags.Union */ | 262144 /* TypeFlags.Never */)) !== 0) {
1403
+ const distributed = c.distributedConditionals;
1404
+ result = mapTypeWithAlias(c, distributionType, (u) => {
1405
+ const member = getConditionalType(c, root, prependTypeMapping(checkType, u, newMapper), forConstraint, undefined);
1406
+ // Sharing results (shared-results.ts) names a distributed member by the instantiation it is part of.
1407
+ if (distributed !== undefined && (member.flags & 67108864 /* TypeFlags.Conditional */) !== 0) {
1408
+ if (!distributed.has(member))
1409
+ distributed.set(member, new DistributedConditional(typeArguments.slice(), alias, tag, u));
1410
+ c.distributedByKey.set(distributedKey(root.node.id, typeArguments, alias, tag, u), member);
1411
+ }
1412
+ return member;
1413
+ }, alias);
1414
+ }
1384
1415
  else
1385
1416
  result = getConditionalType(c, root, newMapper, forConstraint, alias);
1386
1417
  root.instantiations.set(hash, typeArguments, alias, tag, result);
1418
+ // Sharing results names a conditional type made for another root (a tail or nested root) by this instantiation.
1419
+ const results = c.conditionalResults;
1420
+ if (results !== undefined && (result.flags & 67108864 /* TypeFlags.Conditional */) !== 0 && !results.has(result))
1421
+ results.set(result, new ConditionalResultKey(root, typeArguments.slice(), alias, tag));
1387
1422
  }
1388
1423
  return result;
1389
1424
  }
1390
1425
  function skipTypeParentheses(node) {
1391
- while (node.kind === 197 /* SyntaxKind.ParenthesizedType */)
1426
+ while (node.kind === 198 /* SyntaxKind.ParenthesizedType */)
1392
1427
  node = getType(node);
1393
1428
  return node;
1394
1429
  }
1395
1430
  function isSimpleTupleType(node) {
1396
- if (node.kind !== 190 /* SyntaxKind.TupleType */)
1431
+ if (node.kind !== 191 /* SyntaxKind.TupleType */)
1397
1432
  return false;
1398
1433
  const elements = getElements(node).nodes;
1399
1434
  if (elements.length === 0)
1400
1435
  return false;
1401
1436
  for (const e of elements) {
1402
- if (e.kind === 191 /* SyntaxKind.OptionalType */ || e.kind === 192 /* SyntaxKind.RestType */)
1437
+ if (e.kind === 192 /* SyntaxKind.OptionalType */ || e.kind === 193 /* SyntaxKind.RestType */)
1403
1438
  return false;
1404
- if (e.kind === 203 /* SyntaxKind.NamedTupleMember */ &&
1439
+ if (e.kind === 204 /* SyntaxKind.NamedTupleMember */ &&
1405
1440
  (getQuestionToken(e) !== undefined || getDotDotDotToken(e) !== undefined))
1406
1441
  return false;
1407
1442
  }
@@ -1434,7 +1469,7 @@ export function getConditionalType(c, root, mapper, forConstraint, alias) {
1434
1469
  // Loops over nested conditional types in the false branch and tail-recursive resolutions.
1435
1470
  for (;;) {
1436
1471
  if (tailCount === 1000) {
1437
- c.error(c.currentNode, 737 /* Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite */);
1472
+ c.error(c.currentNode, 744 /* Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite */);
1438
1473
  return c.errorType;
1439
1474
  }
1440
1475
  const checkType = instantiateType(c, getActualTypeVariable(c, root.checkType), mapper);
@@ -1619,7 +1654,7 @@ function computeReferenceArgs(c, root) {
1619
1654
  (target.symbol.flags & (32 /* SymbolFlags.Class */ | 64 /* SymbolFlags.Interface */)) === 0)
1620
1655
  return null;
1621
1656
  const node = skipTypeParentheses(conditionalNode(root).extendsType);
1622
- if (node.kind !== 184 /* SyntaxKind.TypeReference */)
1657
+ if (node.kind !== 185 /* SyntaxKind.TypeReference */)
1623
1658
  return null;
1624
1659
  const argNodes = node.typeArguments?.nodes ?? [];
1625
1660
  const typeArgs = getTypeArguments(c, declared);
@@ -1642,7 +1677,7 @@ function computeReferenceArgs(c, root) {
1642
1677
  }
1643
1678
  if (kind === 3 /* ReferenceArgKind.Other */) {
1644
1679
  const inner = skipTypeParentheses(argNode);
1645
- if (inner.kind === 196 /* SyntaxKind.InferType */) {
1680
+ if (inner.kind === 197 /* SyntaxKind.InferType */) {
1646
1681
  const tp = root.inferTypeParameters.find((t) => t.symbol.declaration === inner.typeParameter);
1647
1682
  if (tp !== undefined && declarationCount(tp.symbol) === 1 && !isReferencedInOtherArg(c, tp, argNodes, i)) {
1648
1683
  kind = 1 /* ReferenceArgKind.Infer */;
@@ -1690,7 +1725,7 @@ function getTailRecursionRoot(c, newType, newMapper) {
1690
1725
  for (const t of newRoot.outerTypeParameters)
1691
1726
  typeArguments.push(typeParamMapper.map(t));
1692
1727
  const newRootMapper = newTypeMapper(newRoot.outerTypeParameters, typeArguments);
1693
- const newCheckType = newRoot.isDistributive ? newRootMapper.map(newRoot.checkType) : undefined;
1728
+ const newCheckType = newRoot.isDistributive ? getMappedType(newRoot.checkType, newRootMapper) : undefined;
1694
1729
  if (newCheckType === undefined ||
1695
1730
  newCheckType === newRoot.checkType ||
1696
1731
  (newCheckType.flags & (134217728 /* TypeFlags.Union */ | 262144 /* TypeFlags.Never */)) === 0)
@@ -1776,7 +1811,7 @@ export function getConstraintOfDistributiveConditionalType(c, t) {
1776
1811
  }
1777
1812
  /** Whether `source` matches the pattern of `target`, with placeholders related by `compareTypes`. */
1778
1813
  export function isTypeMatchedByTemplateLiteralType(c, source, target, compareTypes) {
1779
- const inferences = inferTypesFromTemplateLiteralType(c, source, target);
1814
+ const inferences = inferTypesFromTemplateLiteralType(c, source, target, compareTypes);
1780
1815
  if (inferences === undefined)
1781
1816
  return false;
1782
1817
  const compare = compareTypes ?? ((s, t) => isTypeAssignableTo(c, s, t));
@@ -1840,3 +1875,15 @@ export function mappedTypeTarget(t) {
1840
1875
  const target = t.target;
1841
1876
  return target !== undefined ? target : t;
1842
1877
  }
1878
+ /** The key of the member of a conditional type instantiation's distribution for one constituent (shared-results.ts). */
1879
+ export function distributedKey(root, typeArguments, alias, tag, constituent) {
1880
+ let key = root + ':' + tag + ':' + constituent.id + ':';
1881
+ for (const t of typeArguments)
1882
+ key += t.id + ',';
1883
+ if (alias !== undefined) {
1884
+ key += '@' + getSymbolId(alias.symbol);
1885
+ for (const t of alias.typeArguments)
1886
+ key += ',' + t.id;
1887
+ }
1888
+ return key;
1889
+ }
@@ -120,8 +120,7 @@ export declare const enum ObjectFlags {
120
120
  IsClassInstanceClone = 67108864,
121
121
  IdenticalBaseTypeCalculated = 134217728,
122
122
  IdenticalBaseTypeExists = 268435456,
123
- UnresolvedMembers = 536870912,
124
- FromTypeNode = 1073741824,
123
+ FromTypeNode = 536870912,
125
124
  /**
126
125
  * The type keeps the state that is computed lazily in the checker's side tables instead of its
127
126
  * own fields, which stay unset (`sideOf`). Every type with `TSC_TS_SIDE_STATE=1`.
@@ -134,6 +133,9 @@ export declare const enum ObjectFlags {
134
133
  ContainsIntersections = 33554432,
135
134
  IsUnknownLikeUnionComputed = 67108864,
136
135
  IsUnknownLikeUnion = 134217728,
136
+ IsUniformEnumComputed = 268435456,
137
+ /** A primitive union in which no two literal constituents are comparable (`isUniformUnionType`). */
138
+ IsUniformEnum = 536870912,
137
139
  IsNeverIntersectionComputed = 33554432,
138
140
  IsNeverIntersection = 67108864,
139
141
  IsConstrainedTypeVariable = 134217728,
@@ -284,7 +286,9 @@ export declare const enum CachedTypeKind {
284
286
  RegularObjectLiteral = 14,
285
287
  PromisedTypeOfPromise = 15,
286
288
  Optional = 16,
287
- OptionalProperty = 17
289
+ OptionalProperty = 17,
290
+ SimplifiedConditionalForReading = 18,
291
+ SimplifiedConditionalForWriting = 19
288
292
  }
289
293
  export declare function cachedTypeKey(kind: CachedTypeKind, id: number): number;
290
294
  /** The `cachedTypesByPair` key of two type ids and four bits, or -1 when an id is too large to pack. */
@@ -509,6 +513,38 @@ export declare class MemberNames {
509
513
  readonly tableOrder: number[];
510
514
  constructor(names: string[], positions: Map<string, number>, tableOrder: number[]);
511
515
  }
516
+ /**
517
+ * The properties of the instantiations of one source without base types, as `getNamedMembers` orders them
518
+ * for `container`: the source positions of the named members in that order, and their names
519
+ * (`PropertyMembers`). The other members are skipped, so the named members are all of an instantiation's table.
520
+ */
521
+ export declare class NamedMemberOrder {
522
+ readonly container: Symbol | undefined;
523
+ readonly positions: number[];
524
+ readonly names: MemberNames;
525
+ constructor(container: Symbol | undefined, positions: number[], names: MemberNames);
526
+ }
527
+ /**
528
+ * What the pending instantiations of a declared members table share whatever their mapper: the members in
529
+ * table order, which of them are named (the others are skipped), and the members whose resolved type keeps
530
+ * them under any instantiation (`keepsSymbolTypeUnderInstantiation`), found so far.
531
+ */
532
+ export declare class DeclaredMemberPlan {
533
+ readonly table: SymbolTable;
534
+ /**
535
+ * Whether instantiations build the table eagerly: tsgo's table wouldn't be keyed by symbol names, or an
536
+ * own member could be replaced by an inherited one. The other fields are then incomplete.
537
+ */
538
+ readonly eager: boolean;
539
+ readonly members: Symbol[];
540
+ /** 1 for a named member, 0 for a skipped one, by position. */
541
+ readonly named: number[];
542
+ /** Bits by position: the member's type keeps it under instantiation. Set when found, never cleared. */
543
+ readonly keptByType: number[];
544
+ readonly hasOwnMembers: boolean;
545
+ readonly hasRequiredOwnMembers: boolean;
546
+ constructor(table: SymbolTable, eager: boolean, members: Symbol[], named: number[], hasOwnMembers: boolean, hasRequiredOwnMembers: boolean);
547
+ }
512
548
  /** A type with members: object types, unions and intersections. */
513
549
  export declare class StructuredType extends Type {
514
550
  membersValue: SymbolTable | undefined;
@@ -558,6 +594,10 @@ export declare class InterfaceType extends TypeReference {
558
594
  declaredIndexInfos: IndexInfo[];
559
595
  /** Positions of the declared members by name, for lazily instantiated members of instantiations. */
560
596
  declaredMemberPositions: Map<string, number> | undefined;
597
+ /** The property order of instantiations (`NamedMemberOrder`); null where it can't be cached. */
598
+ namedMemberOrder: NamedMemberOrder | null | undefined;
599
+ /** What pending instantiations of the declared members share (`DeclaredMemberPlan`). */
600
+ declaredMemberPlan: DeclaredMemberPlan | undefined;
561
601
  /** The member states of the last pending instantiation of the type's members (`sharedStates`). */
562
602
  lastMemberStates: number[] | undefined;
563
603
  /** The property names of the last instantiation whose members table is built on demand. */
@@ -674,9 +714,22 @@ export declare class TypeParameter extends Type {
674
714
  target: Type | undefined;
675
715
  mapper: TypeMapper | undefined;
676
716
  isThisType: boolean;
717
+ /**
718
+ * A type parameter as referenced inside a distributive conditional type on it, which stands for each
719
+ * constituent in turn; its constraint is the type parameter it was made from (`getDistributedTypeParameter`).
720
+ */
721
+ isDistributed: boolean;
677
722
  resolvedDefaultType: Type | undefined;
723
+ /** The distributed form of this type parameter, made on first use. */
724
+ distributedType: TypeParameter | undefined;
678
725
  constructor(id: number, symbol: Symbol | undefined);
679
726
  }
727
+ /** Whether `t` is the distributed form of a type parameter. */
728
+ export declare function isDistributedTypeParameter(t: Type): boolean;
729
+ /** The type parameter a distributed type parameter was made from; other types as they are. */
730
+ export declare function getNonDistributedTypeParameter(t: Type): Type;
731
+ /** What `mapper` maps `t` to, a distributed type parameter as the type parameter it was made from. */
732
+ export declare function getMappedType(t: Type, mapper: TypeMapper): Type;
680
733
  /** `keyof T`. */
681
734
  export declare class IndexType extends Type {
682
735
  readonly target: Type;
@@ -852,6 +905,11 @@ export declare const enum TypeMapperKind {
852
905
  }
853
906
  /** Maps type parameters to types. Subclasses replace tsgo's function mappers. */
854
907
  export declare abstract class TypeMapper {
908
+ /**
909
+ * A number for the mapper, unique among the mappers this thread creates (until it wraps at 2^31), so the
910
+ * stack of active mappers can be searched by id instead of by reference.
911
+ */
912
+ readonly id: number;
855
913
  abstract map(type: Type): Type;
856
914
  kind(): TypeMapperKind;
857
915
  /** Whether the mapper only maps a `this` type parameter. */
@@ -964,6 +1022,8 @@ export declare class SymbolLinks implements ProgramLifetime {
964
1022
  set typeParametersChecked(value: boolean);
965
1023
  get enumChecked(): boolean;
966
1024
  set enumChecked(value: boolean);
1025
+ get mergedExportsChecked(): boolean;
1026
+ set mergedExportsChecked(value: boolean);
967
1027
  get variances(): VarianceFlags[] | undefined;
968
1028
  set variances(value: VarianceFlags[] | undefined);
969
1029
  get lastAssignmentPos(): number;
@@ -1000,6 +1060,7 @@ export declare class RareSymbolLinks implements ProgramLifetime {
1000
1060
  indexSignaturesChecked: boolean;
1001
1061
  typeParametersChecked: boolean;
1002
1062
  enumChecked: boolean;
1063
+ mergedExportsChecked: boolean;
1003
1064
  variances: VarianceFlags[] | undefined;
1004
1065
  lastAssignmentPos: number;
1005
1066
  hasDefiniteAssignment: boolean;
@@ -1091,3 +1152,19 @@ export declare class RareNodeLinks implements ProgramLifetime {
1091
1152
  mentionsArguments: number;
1092
1153
  constructor();
1093
1154
  }
1155
+ /** A conditional type made as a member of a distribution: the instantiation's key, and the constituent it is for. */
1156
+ export declare class DistributedConditional {
1157
+ readonly typeArguments: Type[];
1158
+ readonly alias: TypeAlias | undefined;
1159
+ readonly tag: number;
1160
+ readonly constituent: Type;
1161
+ constructor(typeArguments: Type[], alias: TypeAlias | undefined, tag: number, constituent: Type);
1162
+ }
1163
+ /** The instantiation of a conditional type whose result is a conditional type: its root and key. */
1164
+ export declare class ConditionalResultKey {
1165
+ readonly root: ConditionalRoot;
1166
+ readonly typeArguments: Type[];
1167
+ readonly alias: TypeAlias | undefined;
1168
+ readonly tag: number;
1169
+ constructor(root: ConditionalRoot, typeArguments: Type[], alias: TypeAlias | undefined, tag: number);
1170
+ }