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
@@ -227,7 +227,8 @@ export class Printer extends NameGeneratorHost {
227
227
  // Text of nodes
228
228
  isFileLevelUniqueName(name) {
229
229
  const file = this.currentSourceFile;
230
- return file === undefined || isFileLevelUniqueName(file, name);
230
+ // The names of the source file as parsed, not as transformed.
231
+ return file === undefined || isFileLevelUniqueName(this.context.mostOriginal(file), name);
231
232
  }
232
233
  getLiteralTextOfNode(node, sourceFile, flags) {
233
234
  if (node instanceof StringLiteral) {
@@ -273,10 +274,10 @@ export class Printer extends NameGeneratorHost {
273
274
  switch (node.kind) {
274
275
  case 79 /* SyntaxKind.Identifier */:
275
276
  case 80 /* SyntaxKind.PrivateIdentifier */:
276
- case 296 /* SyntaxKind.JsxNamespacedName */:
277
+ case 297 /* SyntaxKind.JsxNamespacedName */:
277
278
  // Its text either way: the source text, or the text of a node from elsewhere.
278
279
  if (this.textIsSourceText(node))
279
- return node.text;
280
+ return node instanceof Identifier ? node.text : node.text;
280
281
  if (!canUseSourceFile || !this.isInCurrentSourceFile(node)) {
281
282
  if (node instanceof Identifier)
282
283
  return node.text;
@@ -310,7 +311,8 @@ export class Printer extends NameGeneratorHost {
310
311
  return false;
311
312
  if ((node.flags & (8 /* NodeFlags.Reparsed */ | 4194304 /* NodeFlags.JSDoc */ | 268435456 /* NodeFlags.ReparserTransformedLiteral */)) !== 0)
312
313
  return false;
313
- const text = node.text;
314
+ // Natively an identifier's text is read through its name, and a private identifier's from its field.
315
+ const text = node instanceof Identifier ? node.text : node.text;
314
316
  const source = this.sourceText;
315
317
  const end = node.end;
316
318
  const start = end - text.length;
@@ -614,7 +616,7 @@ export class Printer extends NameGeneratorHost {
614
616
  }
615
617
  // Emit flags
616
618
  shouldEmitComments(node) {
617
- return !this.commentsDisabled && this.currentSourceFile !== undefined && node.kind !== 307 /* SyntaxKind.SourceFile */;
619
+ return !this.commentsDisabled && this.currentSourceFile !== undefined && node.kind !== 308 /* SyntaxKind.SourceFile */;
618
620
  }
619
621
  shouldWriteComment(comment) {
620
622
  return (!this.options.onlyPrintJSDocStyle ||
@@ -658,13 +660,13 @@ export class Printer extends NameGeneratorHost {
658
660
  shouldEmitSourceMaps(node) {
659
661
  return (!this.sourceMapsDisabled &&
660
662
  this.sourceMapSource !== undefined &&
661
- node.kind !== 307 /* SyntaxKind.SourceFile */ &&
663
+ node.kind !== 308 /* SyntaxKind.SourceFile */ &&
662
664
  (node.flags & 33554432 /* NodeFlags.JsonFile */) === 0);
663
665
  }
664
666
  shouldAllowTrailingComma(node) {
665
667
  return (this.currentSourceFile !== undefined &&
666
668
  this.currentSourceFile.scriptKind !== 6 /* ScriptKind.JSON */ &&
667
- node.kind === 211 /* SyntaxKind.ObjectLiteralExpression */);
669
+ node.kind === 212 /* SyntaxKind.ObjectLiteralExpression */);
668
670
  }
669
671
  hasCommentsAtPosition(pos) {
670
672
  if (this.currentSourceFile === undefined)
@@ -773,7 +775,10 @@ export class Printer extends NameGeneratorHost {
773
775
  const state = this.enterNode(node);
774
776
  this.emitEntityName(node.left);
775
777
  this.write1('.');
776
- this.emitIdentifierName(node.right);
778
+ if (node.right instanceof PrivateIdentifier)
779
+ this.emitPrivateIdentifier(node.right);
780
+ else
781
+ this.emitIdentifierName(node.right);
777
782
  this.exitNode(node, state);
778
783
  return true;
779
784
  }
@@ -839,7 +844,7 @@ export class Printer extends NameGeneratorHost {
839
844
  let allModifiers = true;
840
845
  let allDecorators = true;
841
846
  for (const n of nodes) {
842
- if (n.kind === 171 /* SyntaxKind.Decorator */)
847
+ if (n.kind === 172 /* SyntaxKind.Decorator */)
843
848
  allModifiers = false;
844
849
  else
845
850
  allDecorators = false;
@@ -862,7 +867,7 @@ export class Printer extends NameGeneratorHost {
862
867
  let pos = 0;
863
868
  while (start < nodes.length) {
864
869
  while (pos < nodes.length) {
865
- decorators = nodes[pos].kind === 171 /* SyntaxKind.Decorator */;
870
+ decorators = nodes[pos].kind === 172 /* SyntaxKind.Decorator */;
866
871
  if (!haveMode) {
867
872
  lastDecorators = decorators;
868
873
  haveMode = true;
@@ -928,7 +933,7 @@ export class Printer extends NameGeneratorHost {
928
933
  emitTypeParameters(parent, nodes) {
929
934
  if (nodes === undefined)
930
935
  return false;
931
- return this.emitList(2 /* ListItem.TypeParameter */, parent, nodes, 53776 /* ListFormat.TypeParameters */ | (parent.kind === 220 /* SyntaxKind.ArrowFunction */ ? 64 /* ListFormat.AllowTrailingComma */ : 0));
936
+ return this.emitList(2 /* ListItem.TypeParameter */, parent, nodes, 53776 /* ListFormat.TypeParameters */ | (parent.kind === 221 /* SyntaxKind.ArrowFunction */ ? 64 /* ListFormat.AllowTrailingComma */ : 0));
932
937
  }
933
938
  emitTypeAnnotation(node) {
934
939
  if (node === undefined)
@@ -1129,39 +1134,39 @@ export class Printer extends NameGeneratorHost {
1129
1134
  }
1130
1135
  emitClassElement(node) {
1131
1136
  switch (node.kind) {
1132
- case 173 /* SyntaxKind.PropertyDeclaration */:
1137
+ case 174 /* SyntaxKind.PropertyDeclaration */:
1133
1138
  if (node instanceof PropertyDeclaration)
1134
1139
  return this.emitPropertyDeclaration(node);
1135
1140
  break;
1136
- case 175 /* SyntaxKind.MethodDeclaration */:
1141
+ case 176 /* SyntaxKind.MethodDeclaration */:
1137
1142
  if (node instanceof MethodDeclaration)
1138
1143
  return this.emitMethodDeclaration(node);
1139
1144
  break;
1140
- case 176 /* SyntaxKind.ClassStaticBlockDeclaration */:
1145
+ case 177 /* SyntaxKind.ClassStaticBlockDeclaration */:
1141
1146
  if (node instanceof ClassStaticBlockDeclaration)
1142
1147
  return this.emitClassStaticBlockDeclaration(node);
1143
1148
  break;
1144
- case 177 /* SyntaxKind.Constructor */:
1149
+ case 178 /* SyntaxKind.Constructor */:
1145
1150
  if (node instanceof ConstructorDeclaration)
1146
1151
  return this.emitConstructor(node);
1147
1152
  break;
1148
- case 178 /* SyntaxKind.GetAccessor */:
1153
+ case 179 /* SyntaxKind.GetAccessor */:
1149
1154
  if (node instanceof GetAccessorDeclaration)
1150
1155
  return this.emitGetAccessor(node);
1151
1156
  break;
1152
- case 179 /* SyntaxKind.SetAccessor */:
1157
+ case 180 /* SyntaxKind.SetAccessor */:
1153
1158
  if (node instanceof SetAccessorDeclaration)
1154
1159
  return this.emitSetAccessor(node);
1155
1160
  break;
1156
- case 182 /* SyntaxKind.IndexSignature */:
1161
+ case 183 /* SyntaxKind.IndexSignature */:
1157
1162
  if (node instanceof IndexSignatureDeclaration)
1158
1163
  return this.emitIndexSignature(node);
1159
1164
  break;
1160
- case 241 /* SyntaxKind.SemicolonClassElement */:
1165
+ case 242 /* SyntaxKind.SemicolonClassElement */:
1161
1166
  return this.emitSimpleNode(node, ';');
1162
- case 347 /* SyntaxKind.NotEmittedStatement */:
1167
+ case 348 /* SyntaxKind.NotEmittedStatement */:
1163
1168
  return this.emitSimpleNode(node, '');
1164
- case 345 /* SyntaxKind.JSTypeAliasDeclaration */:
1169
+ case 346 /* SyntaxKind.JSTypeAliasDeclaration */:
1165
1170
  if (node instanceof TypeAliasDeclaration)
1166
1171
  return this.emitTypeAliasDeclaration(node);
1167
1172
  break;
@@ -1170,62 +1175,62 @@ export class Printer extends NameGeneratorHost {
1170
1175
  }
1171
1176
  emitTypeElement(node) {
1172
1177
  switch (node.kind) {
1173
- case 172 /* SyntaxKind.PropertySignature */:
1178
+ case 173 /* SyntaxKind.PropertySignature */:
1174
1179
  if (node instanceof PropertySignatureDeclaration)
1175
1180
  return this.emitPropertySignature(node);
1176
1181
  break;
1177
- case 174 /* SyntaxKind.MethodSignature */:
1182
+ case 175 /* SyntaxKind.MethodSignature */:
1178
1183
  if (node instanceof MethodSignatureDeclaration)
1179
1184
  return this.emitMethodSignature(node);
1180
1185
  break;
1181
- case 180 /* SyntaxKind.CallSignature */:
1186
+ case 181 /* SyntaxKind.CallSignature */:
1182
1187
  if (node instanceof CallSignatureDeclaration)
1183
1188
  return this.emitCallSignature(node);
1184
1189
  break;
1185
- case 181 /* SyntaxKind.ConstructSignature */:
1190
+ case 182 /* SyntaxKind.ConstructSignature */:
1186
1191
  if (node instanceof ConstructSignatureDeclaration)
1187
1192
  return this.emitConstructSignature(node);
1188
1193
  break;
1189
- case 178 /* SyntaxKind.GetAccessor */:
1194
+ case 179 /* SyntaxKind.GetAccessor */:
1190
1195
  if (node instanceof GetAccessorDeclaration)
1191
1196
  return this.emitGetAccessor(node);
1192
1197
  break;
1193
- case 179 /* SyntaxKind.SetAccessor */:
1198
+ case 180 /* SyntaxKind.SetAccessor */:
1194
1199
  if (node instanceof SetAccessorDeclaration)
1195
1200
  return this.emitSetAccessor(node);
1196
1201
  break;
1197
- case 182 /* SyntaxKind.IndexSignature */:
1202
+ case 183 /* SyntaxKind.IndexSignature */:
1198
1203
  if (node instanceof IndexSignatureDeclaration)
1199
1204
  return this.emitIndexSignature(node);
1200
1205
  break;
1201
- case 350 /* SyntaxKind.NotEmittedTypeElement */:
1206
+ case 351 /* SyntaxKind.NotEmittedTypeElement */:
1202
1207
  return this.emitSimpleNode(node, '');
1203
1208
  }
1204
1209
  throw new Error('Unexpected type element ' + node.kind);
1205
1210
  }
1206
1211
  emitObjectLiteralElement(node) {
1207
1212
  switch (node.kind) {
1208
- case 303 /* SyntaxKind.PropertyAssignment */:
1213
+ case 304 /* SyntaxKind.PropertyAssignment */:
1209
1214
  if (node instanceof PropertyAssignment)
1210
1215
  return this.emitPropertyAssignment(node);
1211
1216
  break;
1212
- case 304 /* SyntaxKind.ShorthandPropertyAssignment */:
1217
+ case 305 /* SyntaxKind.ShorthandPropertyAssignment */:
1213
1218
  if (node instanceof ShorthandPropertyAssignment)
1214
1219
  return this.emitShorthandPropertyAssignment(node);
1215
1220
  break;
1216
- case 305 /* SyntaxKind.SpreadAssignment */:
1221
+ case 306 /* SyntaxKind.SpreadAssignment */:
1217
1222
  if (node instanceof SpreadAssignment)
1218
1223
  return this.emitSpreadAssignment(node);
1219
1224
  break;
1220
- case 175 /* SyntaxKind.MethodDeclaration */:
1225
+ case 176 /* SyntaxKind.MethodDeclaration */:
1221
1226
  if (node instanceof MethodDeclaration)
1222
1227
  return this.emitMethodDeclaration(node);
1223
1228
  break;
1224
- case 178 /* SyntaxKind.GetAccessor */:
1229
+ case 179 /* SyntaxKind.GetAccessor */:
1225
1230
  if (node instanceof GetAccessorDeclaration)
1226
1231
  return this.emitGetAccessor(node);
1227
1232
  break;
1228
- case 179 /* SyntaxKind.SetAccessor */:
1233
+ case 180 /* SyntaxKind.SetAccessor */:
1229
1234
  if (node instanceof SetAccessorDeclaration)
1230
1235
  return this.emitSetAccessor(node);
1231
1236
  break;
@@ -1316,7 +1321,7 @@ export class Printer extends NameGeneratorHost {
1316
1321
  }
1317
1322
  /** The operand of a postfix type; a parsed `typeof X` operand keeps no parentheses. */
1318
1323
  emitPostfixTypeOperand(operand, parent) {
1319
- if (isParseTreeNode(parent) && operand.kind === 187 /* SyntaxKind.TypeQuery */)
1324
+ if (isParseTreeNode(parent) && operand.kind === 188 /* SyntaxKind.TypeQuery */)
1320
1325
  return this.emitTypeNode(operand, 5 /* TypePrecedence.TypeOperator */);
1321
1326
  return this.emitTypeNode(operand, 6 /* TypePrecedence.Postfix */);
1322
1327
  }
@@ -1414,11 +1419,11 @@ export class Printer extends NameGeneratorHost {
1414
1419
  if (questionToken.kind !== 57 /* SyntaxKind.QuestionToken */)
1415
1420
  this.write1('?');
1416
1421
  }
1417
- this.write1(': ');
1418
- // tsgo's printer fails on a mapped type without a type, too.
1419
- if (node.type === undefined)
1420
- throw new Error('Mapped type without a type');
1421
- this.emitTypeNodeOutsideExtends(node.type);
1422
+ // A mapped type written without a type, `{ [K in keyof T] }`, prints without one.
1423
+ if (node.type !== undefined) {
1424
+ this.write1(': ');
1425
+ this.emitTypeNodeOutsideExtends(node.type);
1426
+ }
1422
1427
  this.write1(';');
1423
1428
  if (node.members !== undefined && node.members.nodes.length > 0) {
1424
1429
  if (singleLine)
@@ -1521,15 +1526,15 @@ export class Printer extends NameGeneratorHost {
1521
1526
  case 146 /* SyntaxKind.NeverKeyword */:
1522
1527
  case 141 /* SyntaxKind.IntrinsicKeyword */:
1523
1528
  return this.emitTokenNode(node);
1524
- case 310 /* SyntaxKind.JSDocAllType */:
1529
+ case 311 /* SyntaxKind.JSDocAllType */:
1525
1530
  return this.emitSimpleNode(node, tokenToString(node.kind));
1526
- case 198 /* SyntaxKind.ThisType */:
1531
+ case 199 /* SyntaxKind.ThisType */:
1527
1532
  return this.emitSimpleNode(node, 'this');
1528
- case 183 /* SyntaxKind.TypePredicate */:
1533
+ case 184 /* SyntaxKind.TypePredicate */:
1529
1534
  if (node instanceof TypePredicateNode)
1530
1535
  return this.emitTypePredicate(node);
1531
1536
  break;
1532
- case 184 /* SyntaxKind.TypeReference */:
1537
+ case 185 /* SyntaxKind.TypeReference */:
1533
1538
  if (node instanceof TypeReferenceNode) {
1534
1539
  const state = this.enterNode(node);
1535
1540
  this.emitEntityName(node.typeName);
@@ -1538,15 +1543,15 @@ export class Printer extends NameGeneratorHost {
1538
1543
  return true;
1539
1544
  }
1540
1545
  break;
1541
- case 185 /* SyntaxKind.FunctionType */:
1546
+ case 186 /* SyntaxKind.FunctionType */:
1542
1547
  if (node instanceof FunctionTypeNode)
1543
1548
  return this.emitFunctionType(node);
1544
1549
  break;
1545
- case 186 /* SyntaxKind.ConstructorType */:
1550
+ case 187 /* SyntaxKind.ConstructorType */:
1546
1551
  if (node instanceof ConstructorTypeNode)
1547
1552
  return this.emitConstructorType(node);
1548
1553
  break;
1549
- case 187 /* SyntaxKind.TypeQuery */:
1554
+ case 188 /* SyntaxKind.TypeQuery */:
1550
1555
  if (node instanceof TypeQueryNode) {
1551
1556
  const state = this.enterNode(node);
1552
1557
  this.write1('typeof ');
@@ -1556,11 +1561,11 @@ export class Printer extends NameGeneratorHost {
1556
1561
  return true;
1557
1562
  }
1558
1563
  break;
1559
- case 188 /* SyntaxKind.TypeLiteral */:
1564
+ case 189 /* SyntaxKind.TypeLiteral */:
1560
1565
  if (node instanceof TypeLiteralNode)
1561
1566
  return this.emitTypeLiteral(node);
1562
1567
  break;
1563
- case 189 /* SyntaxKind.ArrayType */:
1568
+ case 190 /* SyntaxKind.ArrayType */:
1564
1569
  if (node instanceof ArrayTypeNode) {
1565
1570
  const state = this.enterNode(node);
1566
1571
  this.emitPostfixTypeOperand(node.elementType, node);
@@ -1570,11 +1575,11 @@ export class Printer extends NameGeneratorHost {
1570
1575
  return true;
1571
1576
  }
1572
1577
  break;
1573
- case 190 /* SyntaxKind.TupleType */:
1578
+ case 191 /* SyntaxKind.TupleType */:
1574
1579
  if (node instanceof TupleTypeNode)
1575
1580
  return this.emitTupleType(node);
1576
1581
  break;
1577
- case 191 /* SyntaxKind.OptionalType */:
1582
+ case 192 /* SyntaxKind.OptionalType */:
1578
1583
  if (node instanceof OptionalTypeNode) {
1579
1584
  const state = this.enterNode(node);
1580
1585
  this.emitPostfixTypeOperand(node.type, node);
@@ -1583,7 +1588,7 @@ export class Printer extends NameGeneratorHost {
1583
1588
  return true;
1584
1589
  }
1585
1590
  break;
1586
- case 192 /* SyntaxKind.RestType */:
1591
+ case 193 /* SyntaxKind.RestType */:
1587
1592
  if (node instanceof RestTypeNode) {
1588
1593
  const state = this.enterNode(node);
1589
1594
  this.write1('...');
@@ -1592,7 +1597,7 @@ export class Printer extends NameGeneratorHost {
1592
1597
  return true;
1593
1598
  }
1594
1599
  break;
1595
- case 193 /* SyntaxKind.UnionType */:
1600
+ case 194 /* SyntaxKind.UnionType */:
1596
1601
  if (node instanceof UnionTypeNode) {
1597
1602
  const state = this.enterNode(node);
1598
1603
  this.emitList(8 /* ListItem.UnionConstituent */, node, node.types, 516 /* ListFormat.UnionTypeConstituents */);
@@ -1600,7 +1605,7 @@ export class Printer extends NameGeneratorHost {
1600
1605
  return true;
1601
1606
  }
1602
1607
  break;
1603
- case 194 /* SyntaxKind.IntersectionType */:
1608
+ case 195 /* SyntaxKind.IntersectionType */:
1604
1609
  if (node instanceof IntersectionTypeNode) {
1605
1610
  const state = this.enterNode(node);
1606
1611
  this.emitList(8 /* ListItem.UnionConstituent */, node, node.types, 520 /* ListFormat.IntersectionTypeConstituents */);
@@ -1608,15 +1613,15 @@ export class Printer extends NameGeneratorHost {
1608
1613
  return true;
1609
1614
  }
1610
1615
  break;
1611
- case 195 /* SyntaxKind.ConditionalType */:
1616
+ case 196 /* SyntaxKind.ConditionalType */:
1612
1617
  if (node instanceof ConditionalTypeNode)
1613
1618
  return this.emitConditionalType(node);
1614
1619
  break;
1615
- case 196 /* SyntaxKind.InferType */:
1620
+ case 197 /* SyntaxKind.InferType */:
1616
1621
  if (node instanceof InferTypeNode)
1617
1622
  return this.emitInferType(node);
1618
1623
  break;
1619
- case 197 /* SyntaxKind.ParenthesizedType */:
1624
+ case 198 /* SyntaxKind.ParenthesizedType */:
1620
1625
  if (node instanceof ParenthesizedTypeNode) {
1621
1626
  const state = this.enterNode(node);
1622
1627
  this.write1('(');
@@ -1626,11 +1631,11 @@ export class Printer extends NameGeneratorHost {
1626
1631
  return true;
1627
1632
  }
1628
1633
  break;
1629
- case 199 /* SyntaxKind.TypeOperator */:
1634
+ case 200 /* SyntaxKind.TypeOperator */:
1630
1635
  if (node instanceof TypeOperatorNode)
1631
1636
  return this.emitTypeOperator(node);
1632
1637
  break;
1633
- case 200 /* SyntaxKind.IndexedAccessType */:
1638
+ case 201 /* SyntaxKind.IndexedAccessType */:
1634
1639
  if (node instanceof IndexedAccessTypeNode) {
1635
1640
  const state = this.enterNode(node);
1636
1641
  this.emitPostfixTypeOperand(node.objectType, node);
@@ -1641,11 +1646,11 @@ export class Printer extends NameGeneratorHost {
1641
1646
  return true;
1642
1647
  }
1643
1648
  break;
1644
- case 201 /* SyntaxKind.MappedType */:
1649
+ case 202 /* SyntaxKind.MappedType */:
1645
1650
  if (node instanceof MappedTypeNode)
1646
1651
  return this.emitMappedType(node);
1647
1652
  break;
1648
- case 202 /* SyntaxKind.LiteralType */:
1653
+ case 203 /* SyntaxKind.LiteralType */:
1649
1654
  if (node instanceof LiteralTypeNode) {
1650
1655
  const state = this.enterNode(node);
1651
1656
  this.emitExpression(node.literal, 0 /* OperatorPrecedence.Comma */);
@@ -1653,39 +1658,39 @@ export class Printer extends NameGeneratorHost {
1653
1658
  return true;
1654
1659
  }
1655
1660
  break;
1656
- case 203 /* SyntaxKind.NamedTupleMember */:
1661
+ case 204 /* SyntaxKind.NamedTupleMember */:
1657
1662
  if (node instanceof NamedTupleMember)
1658
1663
  return this.emitNamedTupleMember(node);
1659
1664
  break;
1660
- case 204 /* SyntaxKind.TemplateLiteralType */:
1665
+ case 205 /* SyntaxKind.TemplateLiteralType */:
1661
1666
  if (node instanceof TemplateLiteralTypeNode)
1662
1667
  return this.emitTemplateType(node);
1663
1668
  break;
1664
- case 205 /* SyntaxKind.TemplateLiteralTypeSpan */:
1669
+ case 206 /* SyntaxKind.TemplateLiteralTypeSpan */:
1665
1670
  if (node instanceof TemplateLiteralTypeSpan)
1666
1671
  return this.emitTemplateTypeSpan(node);
1667
1672
  break;
1668
- case 206 /* SyntaxKind.ImportType */:
1673
+ case 207 /* SyntaxKind.ImportType */:
1669
1674
  if (node instanceof ImportTypeNode)
1670
1675
  return this.emitImportType(node);
1671
1676
  break;
1672
- case 212 /* SyntaxKind.PropertyAccessExpression */:
1677
+ case 213 /* SyntaxKind.PropertyAccessExpression */:
1673
1678
  if (node instanceof PropertyAccessExpression)
1674
1679
  return this.emitPropertyAccessExpression(node);
1675
1680
  break;
1676
- case 234 /* SyntaxKind.ExpressionWithTypeArguments */:
1681
+ case 235 /* SyntaxKind.ExpressionWithTypeArguments */:
1677
1682
  if (node instanceof ExpressionWithTypeArguments)
1678
1683
  return this.emitExpressionWithTypeArguments(node);
1679
1684
  break;
1680
- case 312 /* SyntaxKind.JSDocNonNullableType */:
1685
+ case 313 /* SyntaxKind.JSDocNonNullableType */:
1681
1686
  if (node instanceof JSDocNonNullableType)
1682
1687
  return this.emitJSDocPrefixType(node, '!', node.type);
1683
1688
  break;
1684
- case 311 /* SyntaxKind.JSDocNullableType */:
1689
+ case 312 /* SyntaxKind.JSDocNullableType */:
1685
1690
  if (node instanceof JSDocNullableType)
1686
1691
  return this.emitJSDocPrefixType(node, '?', node.type);
1687
1692
  break;
1688
- case 313 /* SyntaxKind.JSDocOptionalType */:
1693
+ case 314 /* SyntaxKind.JSDocOptionalType */:
1689
1694
  if (node instanceof JSDocOptionalType) {
1690
1695
  const state = this.enterNode(node);
1691
1696
  this.emitTypeNode(node.type, 1 /* TypePrecedence.JSDoc */);
@@ -1694,7 +1699,7 @@ export class Printer extends NameGeneratorHost {
1694
1699
  return true;
1695
1700
  }
1696
1701
  break;
1697
- case 314 /* SyntaxKind.JSDocVariadicType */:
1702
+ case 315 /* SyntaxKind.JSDocVariadicType */:
1698
1703
  if (node instanceof JSDocVariadicType) {
1699
1704
  const state = this.enterNode(node);
1700
1705
  this.write1('...');
@@ -1716,7 +1721,7 @@ export class Printer extends NameGeneratorHost {
1716
1721
  // Binding patterns
1717
1722
  emitBindingPattern(node) {
1718
1723
  const state = this.enterNode(node);
1719
- const object = node.kind === 207 /* SyntaxKind.ObjectBindingPattern */;
1724
+ const object = node.kind === 208 /* SyntaxKind.ObjectBindingPattern */;
1720
1725
  this.write1(object ? '{' : '[');
1721
1726
  this.emitList(11 /* ListItem.BindingElement */, node, node.elements, object ? 525136 /* ListFormat.ObjectBindingPatternElements */ : 524880 /* ListFormat.ArrayBindingPatternElements */);
1722
1727
  this.write1(object ? '}' : ']');
@@ -1822,7 +1827,7 @@ export class Printer extends NameGeneratorHost {
1822
1827
  this.emitExpression(callee, 0 /* OperatorPrecedence.Comma */);
1823
1828
  return this.write1(')');
1824
1829
  }
1825
- if (parent.kind === 214 /* SyntaxKind.CallExpression */ &&
1830
+ if (parent.kind === 215 /* SyntaxKind.CallExpression */ &&
1826
1831
  isNewExpressionWithoutArguments(skipPartiallyEmittedExpressions(callee)))
1827
1832
  return this.emitExpression(callee, 22 /* OperatorPrecedence.Parentheses */);
1828
1833
  return this.emitExpression(callee, isOptionalChain(parent) ? 19 /* OperatorPrecedence.OptionalChain */ : 20 /* OperatorPrecedence.Member */);
@@ -1840,7 +1845,7 @@ export class Printer extends NameGeneratorHost {
1840
1845
  const state = this.enterNode(node);
1841
1846
  this.emitToken(104 /* SyntaxKind.NewKeyword */, node.pos, node);
1842
1847
  this.space();
1843
- if (skipPartiallyEmittedExpressions(node.expression).kind === 214 /* SyntaxKind.CallExpression */)
1848
+ if (skipPartiallyEmittedExpressions(node.expression).kind === 215 /* SyntaxKind.CallExpression */)
1844
1849
  this.emitExpression(node.expression, 22 /* OperatorPrecedence.Parentheses */);
1845
1850
  else
1846
1851
  this.emitExpression(node.expression, 20 /* OperatorPrecedence.Member */);
@@ -1889,7 +1894,7 @@ export class Printer extends NameGeneratorHost {
1889
1894
  emitConciseBody(node) {
1890
1895
  if (node instanceof Block)
1891
1896
  return this.emitFunctionBody(node);
1892
- if (getLeftmostExpression(node, false).kind === 211 /* SyntaxKind.ObjectLiteralExpression */) {
1897
+ if (getLeftmostExpression(node, false).kind === 212 /* SyntaxKind.ObjectLiteralExpression */) {
1893
1898
  const paren = this.context.factory.createParenthesizedExpression(node);
1894
1899
  paren.pos = node.pos;
1895
1900
  paren.end = node.end;
@@ -2150,7 +2155,7 @@ export class Printer extends NameGeneratorHost {
2150
2155
  const parseNode = this.context.parseNode(node);
2151
2156
  if (parseNode !== undefined &&
2152
2157
  parseNode.parent !== undefined &&
2153
- parseNode.parent.kind === 218 /* SyntaxKind.ParenthesizedExpression */)
2158
+ parseNode.parent.kind === 219 /* SyntaxKind.ParenthesizedExpression */)
2154
2159
  return true;
2155
2160
  }
2156
2161
  if (hasNewLineComment)
@@ -2248,35 +2253,35 @@ export class Printer extends NameGeneratorHost {
2248
2253
  if (node instanceof PrivateIdentifier)
2249
2254
  return this.emitPrivateIdentifier(node);
2250
2255
  break;
2251
- case 210 /* SyntaxKind.ArrayLiteralExpression */:
2256
+ case 211 /* SyntaxKind.ArrayLiteralExpression */:
2252
2257
  if (node instanceof ArrayLiteralExpression)
2253
2258
  return this.emitArrayLiteralExpression(node);
2254
2259
  break;
2255
- case 211 /* SyntaxKind.ObjectLiteralExpression */:
2260
+ case 212 /* SyntaxKind.ObjectLiteralExpression */:
2256
2261
  if (node instanceof ObjectLiteralExpression)
2257
2262
  return this.emitObjectLiteralExpression(node);
2258
2263
  break;
2259
- case 212 /* SyntaxKind.PropertyAccessExpression */:
2264
+ case 213 /* SyntaxKind.PropertyAccessExpression */:
2260
2265
  if (node instanceof PropertyAccessExpression)
2261
2266
  return this.emitPropertyAccessExpression(node);
2262
2267
  break;
2263
- case 213 /* SyntaxKind.ElementAccessExpression */:
2268
+ case 214 /* SyntaxKind.ElementAccessExpression */:
2264
2269
  if (node instanceof ElementAccessExpression)
2265
2270
  return this.emitElementAccessExpression(node);
2266
2271
  break;
2267
- case 214 /* SyntaxKind.CallExpression */:
2272
+ case 215 /* SyntaxKind.CallExpression */:
2268
2273
  if (node instanceof CallExpression)
2269
2274
  return this.emitCallExpression(node);
2270
2275
  break;
2271
- case 215 /* SyntaxKind.NewExpression */:
2276
+ case 216 /* SyntaxKind.NewExpression */:
2272
2277
  if (node instanceof NewExpression)
2273
2278
  return this.emitNewExpression(node);
2274
2279
  break;
2275
- case 216 /* SyntaxKind.TaggedTemplateExpression */:
2280
+ case 217 /* SyntaxKind.TaggedTemplateExpression */:
2276
2281
  if (node instanceof TaggedTemplateExpression)
2277
2282
  return this.emitTaggedTemplateExpression(node);
2278
2283
  break;
2279
- case 217 /* SyntaxKind.TypeAssertionExpression */:
2284
+ case 218 /* SyntaxKind.TypeAssertionExpression */:
2280
2285
  if (node instanceof TypeAssertion) {
2281
2286
  const state = this.enterNode(node);
2282
2287
  this.write1('<');
@@ -2287,77 +2292,77 @@ export class Printer extends NameGeneratorHost {
2287
2292
  return true;
2288
2293
  }
2289
2294
  break;
2290
- case 218 /* SyntaxKind.ParenthesizedExpression */:
2295
+ case 219 /* SyntaxKind.ParenthesizedExpression */:
2291
2296
  if (node instanceof ParenthesizedExpression)
2292
2297
  return this.emitParenthesizedExpression(node);
2293
2298
  break;
2294
- case 219 /* SyntaxKind.FunctionExpression */:
2299
+ case 220 /* SyntaxKind.FunctionExpression */:
2295
2300
  if (node instanceof FunctionExpression)
2296
2301
  return this.emitFunctionExpression(node);
2297
2302
  break;
2298
- case 220 /* SyntaxKind.ArrowFunction */:
2303
+ case 221 /* SyntaxKind.ArrowFunction */:
2299
2304
  if (node instanceof ArrowFunction)
2300
2305
  return this.emitArrowFunction(node);
2301
2306
  break;
2302
- case 221 /* SyntaxKind.DeleteExpression */:
2307
+ case 222 /* SyntaxKind.DeleteExpression */:
2303
2308
  if (node instanceof DeleteExpression)
2304
2309
  return this.emitKeywordUnary(node, 90 /* SyntaxKind.DeleteKeyword */, node.expression);
2305
2310
  break;
2306
- case 222 /* SyntaxKind.TypeOfExpression */:
2311
+ case 223 /* SyntaxKind.TypeOfExpression */:
2307
2312
  if (node instanceof TypeOfExpression)
2308
2313
  return this.emitKeywordUnary(node, 113 /* SyntaxKind.TypeOfKeyword */, node.expression);
2309
2314
  break;
2310
- case 223 /* SyntaxKind.VoidExpression */:
2315
+ case 224 /* SyntaxKind.VoidExpression */:
2311
2316
  if (node instanceof VoidExpression)
2312
2317
  return this.emitKeywordUnary(node, 115 /* SyntaxKind.VoidKeyword */, node.expression);
2313
2318
  break;
2314
- case 224 /* SyntaxKind.AwaitExpression */:
2319
+ case 225 /* SyntaxKind.AwaitExpression */:
2315
2320
  if (node instanceof AwaitExpression)
2316
2321
  return this.emitKeywordUnary(node, 134 /* SyntaxKind.AwaitKeyword */, node.expression);
2317
2322
  break;
2318
- case 225 /* SyntaxKind.PrefixUnaryExpression */:
2323
+ case 226 /* SyntaxKind.PrefixUnaryExpression */:
2319
2324
  if (node instanceof PrefixUnaryExpression)
2320
2325
  return this.emitPrefixUnaryExpression(node);
2321
2326
  break;
2322
- case 226 /* SyntaxKind.PostfixUnaryExpression */:
2327
+ case 227 /* SyntaxKind.PostfixUnaryExpression */:
2323
2328
  if (node instanceof PostfixUnaryExpression)
2324
2329
  return this.emitPostfixUnaryExpression(node);
2325
2330
  break;
2326
- case 227 /* SyntaxKind.BinaryExpression */:
2331
+ case 228 /* SyntaxKind.BinaryExpression */:
2327
2332
  if (node instanceof BinaryExpression)
2328
2333
  return this.emitBinaryExpression(node);
2329
2334
  break;
2330
- case 228 /* SyntaxKind.ConditionalExpression */:
2335
+ case 229 /* SyntaxKind.ConditionalExpression */:
2331
2336
  if (node instanceof ConditionalExpression)
2332
2337
  return this.emitConditionalExpression(node);
2333
2338
  break;
2334
- case 229 /* SyntaxKind.TemplateExpression */:
2339
+ case 230 /* SyntaxKind.TemplateExpression */:
2335
2340
  if (node instanceof TemplateExpression)
2336
2341
  return this.emitTemplateExpression(node);
2337
2342
  break;
2338
- case 230 /* SyntaxKind.YieldExpression */:
2343
+ case 231 /* SyntaxKind.YieldExpression */:
2339
2344
  if (node instanceof YieldExpression)
2340
2345
  return this.emitYieldExpression(node);
2341
2346
  break;
2342
- case 231 /* SyntaxKind.SpreadElement */:
2347
+ case 232 /* SyntaxKind.SpreadElement */:
2343
2348
  if (node instanceof SpreadElement)
2344
2349
  return this.emitSpreadElement(node);
2345
2350
  break;
2346
- case 232 /* SyntaxKind.ClassExpression */:
2351
+ case 233 /* SyntaxKind.ClassExpression */:
2347
2352
  if (node instanceof ClassExpression)
2348
2353
  return this.emitClassLike(node, node.modifiers, node.name, node.typeParameters, node.heritageClauses, node.members);
2349
2354
  break;
2350
- case 233 /* SyntaxKind.OmittedExpression */:
2355
+ case 234 /* SyntaxKind.OmittedExpression */:
2351
2356
  return this.emitSimpleNode(node, '');
2352
- case 235 /* SyntaxKind.AsExpression */:
2357
+ case 236 /* SyntaxKind.AsExpression */:
2353
2358
  if (node instanceof AsExpression)
2354
2359
  return this.emitTypeRelation(node, node.expression, 'as', node.type);
2355
2360
  break;
2356
- case 239 /* SyntaxKind.SatisfiesExpression */:
2361
+ case 240 /* SyntaxKind.SatisfiesExpression */:
2357
2362
  if (node instanceof SatisfiesExpression)
2358
2363
  return this.emitTypeRelation(node, node.expression, 'satisfies', node.type);
2359
2364
  break;
2360
- case 236 /* SyntaxKind.NonNullExpression */:
2365
+ case 237 /* SyntaxKind.NonNullExpression */:
2361
2366
  if (node instanceof NonNullExpression) {
2362
2367
  const state = this.enterNode(node);
2363
2368
  this.emitExpression(node.expression, 20 /* OperatorPrecedence.Member */);
@@ -2366,36 +2371,36 @@ export class Printer extends NameGeneratorHost {
2366
2371
  return true;
2367
2372
  }
2368
2373
  break;
2369
- case 234 /* SyntaxKind.ExpressionWithTypeArguments */:
2374
+ case 235 /* SyntaxKind.ExpressionWithTypeArguments */:
2370
2375
  if (node instanceof ExpressionWithTypeArguments)
2371
2376
  return this.emitExpressionWithTypeArguments(node);
2372
2377
  break;
2373
- case 237 /* SyntaxKind.MetaProperty */:
2378
+ case 238 /* SyntaxKind.MetaProperty */:
2374
2379
  if (node instanceof MetaProperty) {
2375
2380
  const state = this.enterNode(node);
2376
- this.emitToken(node.keywordToken, node.pos, node);
2377
- this.write1('.');
2381
+ const pos = this.emitToken(node.keywordToken, node.pos, node);
2382
+ this.emitToken(24 /* SyntaxKind.DotToken */, pos, node);
2378
2383
  this.emitIdentifierName(node.name);
2379
2384
  this.exitNode(node, state);
2380
2385
  return true;
2381
2386
  }
2382
2387
  break;
2383
- case 283 /* SyntaxKind.MissingDeclaration */:
2384
- case 347 /* SyntaxKind.NotEmittedStatement */:
2388
+ case 284 /* SyntaxKind.MissingDeclaration */:
2389
+ case 348 /* SyntaxKind.NotEmittedStatement */:
2385
2390
  return false;
2386
- case 285 /* SyntaxKind.JsxElement */:
2391
+ case 286 /* SyntaxKind.JsxElement */:
2387
2392
  if (node instanceof JsxElement)
2388
2393
  return this.emitJsxElement(node);
2389
2394
  break;
2390
- case 286 /* SyntaxKind.JsxSelfClosingElement */:
2395
+ case 287 /* SyntaxKind.JsxSelfClosingElement */:
2391
2396
  if (node instanceof JsxSelfClosingElement)
2392
2397
  return this.emitJsxSelfClosingElement(node);
2393
2398
  break;
2394
- case 289 /* SyntaxKind.JsxFragment */:
2399
+ case 290 /* SyntaxKind.JsxFragment */:
2395
2400
  if (node instanceof JsxFragment)
2396
2401
  return this.emitJsxFragment(node);
2397
2402
  break;
2398
- case 348 /* SyntaxKind.PartiallyEmittedExpression */:
2403
+ case 349 /* SyntaxKind.PartiallyEmittedExpression */:
2399
2404
  if (node instanceof PartiallyEmittedExpression)
2400
2405
  return this.emitPartiallyEmittedExpression(node);
2401
2406
  break;
@@ -2449,7 +2454,7 @@ export class Printer extends NameGeneratorHost {
2449
2454
  }
2450
2455
  else {
2451
2456
  const leftmost = getLeftmostExpression(expression, false).kind;
2452
- this.emitExpression(expression, leftmost === 219 /* SyntaxKind.FunctionExpression */ || leftmost === 211 /* SyntaxKind.ObjectLiteralExpression */
2457
+ this.emitExpression(expression, leftmost === 220 /* SyntaxKind.FunctionExpression */ || leftmost === 212 /* SyntaxKind.ObjectLiteralExpression */
2453
2458
  ? 22 /* OperatorPrecedence.Parentheses */
2454
2459
  : 0 /* OperatorPrecedence.Comma */);
2455
2460
  }
@@ -2533,14 +2538,14 @@ export class Printer extends NameGeneratorHost {
2533
2538
  const state = this.enterNode(node);
2534
2539
  const pos = this.emitToken(98 /* SyntaxKind.ForKeyword */, node.pos, node);
2535
2540
  this.space();
2536
- if (node.kind === 251 /* SyntaxKind.ForOfStatement */ && node.awaitModifier !== undefined) {
2541
+ if (node.kind === 252 /* SyntaxKind.ForOfStatement */ && node.awaitModifier !== undefined) {
2537
2542
  this.emitOptionalToken(node.awaitModifier);
2538
2543
  this.space();
2539
2544
  }
2540
2545
  this.emitToken(20 /* SyntaxKind.OpenParenToken */, pos, node);
2541
2546
  this.emitForInitializer(node.initializer);
2542
2547
  this.space();
2543
- this.emitToken(node.kind === 251 /* SyntaxKind.ForOfStatement */ ? 165 /* SyntaxKind.OfKeyword */ : 102 /* SyntaxKind.InKeyword */, node.initializer.end, node);
2548
+ this.emitToken(node.kind === 252 /* SyntaxKind.ForOfStatement */ ? 165 /* SyntaxKind.OfKeyword */ : 102 /* SyntaxKind.InKeyword */, node.initializer.end, node);
2544
2549
  this.space();
2545
2550
  this.emitExpression(node.expression, 0 /* OperatorPrecedence.Lowest */);
2546
2551
  this.emitToken(21 /* SyntaxKind.CloseParenToken */, node.expression.end, node);
@@ -2704,6 +2709,10 @@ export class Printer extends NameGeneratorHost {
2704
2709
  this.emitIdentifierOrString(body.name, false);
2705
2710
  body = body.body;
2706
2711
  }
2712
+ if (node.attributes !== undefined) {
2713
+ this.write1(' with ');
2714
+ this.emitTypeNode(node.attributes, 7 /* TypePrecedence.NonArray */);
2715
+ }
2707
2716
  if (body === undefined)
2708
2717
  this.write1(';');
2709
2718
  else if (body instanceof ModuleBlock) {
@@ -2811,15 +2820,19 @@ export class Printer extends NameGeneratorHost {
2811
2820
  this.exitNode(bindings, bindingsState);
2812
2821
  }
2813
2822
  else if (bindings instanceof NamedImports) {
2814
- const bindingsState = this.enterNode(bindings);
2815
- this.write1('{');
2816
- this.emitList(20 /* ListItem.ImportSpecifier */, bindings, bindings.elements, 525136 /* ListFormat.NamedImportsOrExportsElements */);
2817
- this.write1('}');
2818
- this.exitNode(bindings, bindingsState);
2823
+ this.emitNamedImports(bindings);
2819
2824
  }
2820
2825
  this.exitNode(node, state);
2821
2826
  return true;
2822
2827
  }
2828
+ emitNamedImports(node) {
2829
+ const state = this.enterNode(node);
2830
+ this.write1('{');
2831
+ this.emitList(20 /* ListItem.ImportSpecifier */, node, node.elements, 525136 /* ListFormat.NamedImportsOrExportsElements */);
2832
+ this.write1('}');
2833
+ this.exitNode(node, state);
2834
+ return true;
2835
+ }
2823
2836
  /** Import and export specifiers. */
2824
2837
  emitSpecifier(node, isTypeOnly, propertyName, name, binding) {
2825
2838
  const state = this.enterNode(node);
@@ -2845,7 +2858,7 @@ export class Printer extends NameGeneratorHost {
2845
2858
  this.emitExpression(node.expression, 3 /* OperatorPrecedence.Assignment */);
2846
2859
  else {
2847
2860
  const leftmost = getLeftmostExpression(node.expression, false).kind;
2848
- this.emitExpression(node.expression, leftmost === 232 /* SyntaxKind.ClassExpression */ || leftmost === 219 /* SyntaxKind.FunctionExpression */
2861
+ this.emitExpression(node.expression, leftmost === 233 /* SyntaxKind.ClassExpression */ || leftmost === 220 /* SyntaxKind.FunctionExpression */
2849
2862
  ? 22 /* OperatorPrecedence.Parentheses */
2850
2863
  : 3 /* OperatorPrecedence.Assignment */);
2851
2864
  }
@@ -2930,29 +2943,29 @@ export class Printer extends NameGeneratorHost {
2930
2943
  }
2931
2944
  emitStatement(node) {
2932
2945
  switch (node.kind) {
2933
- case 242 /* SyntaxKind.Block */:
2946
+ case 243 /* SyntaxKind.Block */:
2934
2947
  if (node instanceof Block)
2935
2948
  return this.emitBlock(node);
2936
2949
  break;
2937
- case 243 /* SyntaxKind.EmptyStatement */:
2950
+ case 244 /* SyntaxKind.EmptyStatement */:
2938
2951
  return this.emitSimpleNode(node, ';');
2939
- case 244 /* SyntaxKind.VariableStatement */:
2952
+ case 245 /* SyntaxKind.VariableStatement */:
2940
2953
  if (node instanceof VariableStatement)
2941
2954
  return this.emitVariableStatement(node);
2942
2955
  break;
2943
- case 245 /* SyntaxKind.ExpressionStatement */:
2956
+ case 246 /* SyntaxKind.ExpressionStatement */:
2944
2957
  if (node instanceof ExpressionStatement)
2945
2958
  return this.emitExpressionStatement(node);
2946
2959
  break;
2947
- case 246 /* SyntaxKind.IfStatement */:
2960
+ case 247 /* SyntaxKind.IfStatement */:
2948
2961
  if (node instanceof IfStatement)
2949
2962
  return this.emitIfStatement(node);
2950
2963
  break;
2951
- case 247 /* SyntaxKind.DoStatement */:
2964
+ case 248 /* SyntaxKind.DoStatement */:
2952
2965
  if (node instanceof DoStatement)
2953
2966
  return this.emitDoStatement(node);
2954
2967
  break;
2955
- case 248 /* SyntaxKind.WhileStatement */:
2968
+ case 249 /* SyntaxKind.WhileStatement */:
2956
2969
  if (node instanceof WhileStatement) {
2957
2970
  const state = this.enterNode(node);
2958
2971
  this.emitKeywordAndParenthesizedExpression(node, 116 /* SyntaxKind.WhileKeyword */, node.pos, node.expression);
@@ -2961,28 +2974,28 @@ export class Printer extends NameGeneratorHost {
2961
2974
  return true;
2962
2975
  }
2963
2976
  break;
2964
- case 249 /* SyntaxKind.ForStatement */:
2977
+ case 250 /* SyntaxKind.ForStatement */:
2965
2978
  if (node instanceof ForStatement)
2966
2979
  return this.emitForStatement(node);
2967
2980
  break;
2968
- case 250 /* SyntaxKind.ForInStatement */:
2969
- case 251 /* SyntaxKind.ForOfStatement */:
2981
+ case 251 /* SyntaxKind.ForInStatement */:
2982
+ case 252 /* SyntaxKind.ForOfStatement */:
2970
2983
  if (node instanceof ForInOrOfStatement)
2971
2984
  return this.emitForInOrOfStatement(node);
2972
2985
  break;
2973
- case 252 /* SyntaxKind.ContinueStatement */:
2986
+ case 253 /* SyntaxKind.ContinueStatement */:
2974
2987
  if (node instanceof ContinueStatement)
2975
2988
  return this.emitJumpStatement(node, 87 /* SyntaxKind.ContinueKeyword */, node.label, undefined);
2976
2989
  break;
2977
- case 253 /* SyntaxKind.BreakStatement */:
2990
+ case 254 /* SyntaxKind.BreakStatement */:
2978
2991
  if (node instanceof BreakStatement)
2979
2992
  return this.emitJumpStatement(node, 82 /* SyntaxKind.BreakKeyword */, node.label, undefined);
2980
2993
  break;
2981
- case 254 /* SyntaxKind.ReturnStatement */:
2994
+ case 255 /* SyntaxKind.ReturnStatement */:
2982
2995
  if (node instanceof ReturnStatement)
2983
2996
  return this.emitJumpStatement(node, 106 /* SyntaxKind.ReturnKeyword */, undefined, node.expression);
2984
2997
  break;
2985
- case 255 /* SyntaxKind.WithStatement */:
2998
+ case 256 /* SyntaxKind.WithStatement */:
2986
2999
  if (node instanceof WithStatement) {
2987
3000
  const state = this.enterNode(node);
2988
3001
  this.emitKeywordAndParenthesizedExpression(node, 117 /* SyntaxKind.WithKeyword */, node.pos, node.expression);
@@ -2991,7 +3004,7 @@ export class Printer extends NameGeneratorHost {
2991
3004
  return true;
2992
3005
  }
2993
3006
  break;
2994
- case 256 /* SyntaxKind.SwitchStatement */:
3007
+ case 257 /* SyntaxKind.SwitchStatement */:
2995
3008
  if (node instanceof SwitchStatement) {
2996
3009
  const state = this.enterNode(node);
2997
3010
  this.emitKeywordAndParenthesizedExpression(node, 108 /* SyntaxKind.SwitchKeyword */, node.pos, node.expression);
@@ -3001,7 +3014,7 @@ export class Printer extends NameGeneratorHost {
3001
3014
  return true;
3002
3015
  }
3003
3016
  break;
3004
- case 257 /* SyntaxKind.LabeledStatement */:
3017
+ case 258 /* SyntaxKind.LabeledStatement */:
3005
3018
  if (node instanceof LabeledStatement) {
3006
3019
  const state = this.enterNode(node);
3007
3020
  this.emitIdentifierName(node.label);
@@ -3012,7 +3025,7 @@ export class Printer extends NameGeneratorHost {
3012
3025
  return true;
3013
3026
  }
3014
3027
  break;
3015
- case 258 /* SyntaxKind.ThrowStatement */:
3028
+ case 259 /* SyntaxKind.ThrowStatement */:
3016
3029
  if (node instanceof ThrowStatement) {
3017
3030
  const state = this.enterNode(node);
3018
3031
  this.emitToken(110 /* SyntaxKind.ThrowKeyword */, node.pos, node);
@@ -3023,11 +3036,11 @@ export class Printer extends NameGeneratorHost {
3023
3036
  return true;
3024
3037
  }
3025
3038
  break;
3026
- case 259 /* SyntaxKind.TryStatement */:
3039
+ case 260 /* SyntaxKind.TryStatement */:
3027
3040
  if (node instanceof TryStatement)
3028
3041
  return this.emitTryStatement(node);
3029
3042
  break;
3030
- case 260 /* SyntaxKind.DebuggerStatement */:
3043
+ case 261 /* SyntaxKind.DebuggerStatement */:
3031
3044
  if (node instanceof DebuggerStatement) {
3032
3045
  const state = this.enterNode(node);
3033
3046
  this.emitToken(88 /* SyntaxKind.DebuggerKeyword */, node.pos, node);
@@ -3036,52 +3049,52 @@ export class Printer extends NameGeneratorHost {
3036
3049
  return true;
3037
3050
  }
3038
3051
  break;
3039
- case 347 /* SyntaxKind.NotEmittedStatement */:
3052
+ case 348 /* SyntaxKind.NotEmittedStatement */:
3040
3053
  return this.emitSimpleNode(node, '');
3041
- case 263 /* SyntaxKind.FunctionDeclaration */:
3054
+ case 264 /* SyntaxKind.FunctionDeclaration */:
3042
3055
  if (node instanceof FunctionDeclaration)
3043
3056
  return this.emitFunctionDeclaration(node);
3044
3057
  break;
3045
- case 264 /* SyntaxKind.ClassDeclaration */:
3058
+ case 265 /* SyntaxKind.ClassDeclaration */:
3046
3059
  if (node instanceof ClassDeclaration)
3047
3060
  return this.emitClassLike(node, node.modifiers, node.name, node.typeParameters, node.heritageClauses, node.members);
3048
3061
  break;
3049
- case 265 /* SyntaxKind.InterfaceDeclaration */:
3062
+ case 266 /* SyntaxKind.InterfaceDeclaration */:
3050
3063
  if (node instanceof InterfaceDeclaration)
3051
3064
  return this.emitInterfaceDeclaration(node);
3052
3065
  break;
3053
- case 266 /* SyntaxKind.TypeAliasDeclaration */:
3054
- case 345 /* SyntaxKind.JSTypeAliasDeclaration */:
3066
+ case 267 /* SyntaxKind.TypeAliasDeclaration */:
3067
+ case 346 /* SyntaxKind.JSTypeAliasDeclaration */:
3055
3068
  if (node instanceof TypeAliasDeclaration)
3056
3069
  return this.emitTypeAliasDeclaration(node);
3057
3070
  break;
3058
- case 267 /* SyntaxKind.EnumDeclaration */:
3071
+ case 268 /* SyntaxKind.EnumDeclaration */:
3059
3072
  if (node instanceof EnumDeclaration)
3060
3073
  return this.emitEnumDeclaration(node);
3061
3074
  break;
3062
- case 268 /* SyntaxKind.ModuleDeclaration */:
3075
+ case 269 /* SyntaxKind.ModuleDeclaration */:
3063
3076
  if (node instanceof ModuleDeclaration)
3064
3077
  return this.emitModuleDeclaration(node);
3065
3078
  break;
3066
- case 283 /* SyntaxKind.MissingDeclaration */:
3079
+ case 284 /* SyntaxKind.MissingDeclaration */:
3067
3080
  return false;
3068
- case 271 /* SyntaxKind.NamespaceExportDeclaration */:
3081
+ case 272 /* SyntaxKind.NamespaceExportDeclaration */:
3069
3082
  if (node instanceof NamespaceExportDeclaration)
3070
3083
  return this.emitNamespaceExportDeclaration(node);
3071
3084
  break;
3072
- case 272 /* SyntaxKind.ImportEqualsDeclaration */:
3085
+ case 273 /* SyntaxKind.ImportEqualsDeclaration */:
3073
3086
  if (node instanceof ImportEqualsDeclaration)
3074
3087
  return this.emitImportEqualsDeclaration(node);
3075
3088
  break;
3076
- case 273 /* SyntaxKind.ImportDeclaration */:
3089
+ case 274 /* SyntaxKind.ImportDeclaration */:
3077
3090
  if (node instanceof ImportDeclaration)
3078
3091
  return this.emitImportDeclaration(node);
3079
3092
  break;
3080
- case 278 /* SyntaxKind.ExportAssignment */:
3093
+ case 279 /* SyntaxKind.ExportAssignment */:
3081
3094
  if (node instanceof ExportAssignment)
3082
3095
  return this.emitExportAssignment(node);
3083
3096
  break;
3084
- case 279 /* SyntaxKind.ExportDeclaration */:
3097
+ case 280 /* SyntaxKind.ExportDeclaration */:
3085
3098
  if (node instanceof ExportDeclaration)
3086
3099
  return this.emitExportDeclaration(node);
3087
3100
  break;
@@ -3092,7 +3105,7 @@ export class Printer extends NameGeneratorHost {
3092
3105
  emitJsxElement(node) {
3093
3106
  const state = this.enterNode(node);
3094
3107
  this.emitJsxOpeningElement(node.openingElement);
3095
- this.emitList(23 /* ListItem.JsxChild */, node, node.children, 262144 /* ListFormat.JsxElementOrFragmentChildren */);
3108
+ this.emitList(24 /* ListItem.JsxChild */, node, node.children, 262144 /* ListFormat.JsxElementOrFragmentChildren */);
3096
3109
  this.emitJsxClosingElement(node.closingElement);
3097
3110
  this.exitNode(node, state);
3098
3111
  return true;
@@ -3111,7 +3124,7 @@ export class Printer extends NameGeneratorHost {
3111
3124
  emitJsxFragment(node) {
3112
3125
  const state = this.enterNode(node);
3113
3126
  this.emitSimpleNode(node.openingFragment, '<>');
3114
- this.emitList(23 /* ListItem.JsxChild */, node, node.children, 262144 /* ListFormat.JsxElementOrFragmentChildren */);
3127
+ this.emitList(24 /* ListItem.JsxChild */, node, node.children, 262144 /* ListFormat.JsxElementOrFragmentChildren */);
3115
3128
  this.emitSimpleNode(node.closingFragment, '</>');
3116
3129
  this.exitNode(node, state);
3117
3130
  return true;
@@ -3141,7 +3154,7 @@ export class Printer extends NameGeneratorHost {
3141
3154
  }
3142
3155
  emitJsxAttributes(node) {
3143
3156
  const state = this.enterNode(node);
3144
- this.emitList(24 /* ListItem.JsxAttributeLike */, node, node.properties, 262656 /* ListFormat.JsxElementAttributes */);
3157
+ this.emitList(25 /* ListItem.JsxAttributeLike */, node, node.properties, 262656 /* ListFormat.JsxElementAttributes */);
3145
3158
  this.exitNode(node, state);
3146
3159
  return true;
3147
3160
  }
@@ -3237,7 +3250,7 @@ export class Printer extends NameGeneratorHost {
3237
3250
  emitCaseOrDefaultClause(node) {
3238
3251
  const state = this.enterNode(node);
3239
3252
  let colonPos;
3240
- if (node.kind === 297 /* SyntaxKind.CaseClause */ && node.expression !== undefined) {
3253
+ if (node.kind === 298 /* SyntaxKind.CaseClause */ && node.expression !== undefined) {
3241
3254
  this.emitToken(83 /* SyntaxKind.CaseKeyword */, node.pos, node);
3242
3255
  this.space();
3243
3256
  this.emitExpression(node.expression, 0 /* OperatorPrecedence.Lowest */);
@@ -3269,7 +3282,7 @@ export class Printer extends NameGeneratorHost {
3269
3282
  this.space();
3270
3283
  this.emitToken(node.token, node.pos, node);
3271
3284
  this.space();
3272
- this.emitList(22 /* ListItem.ExpressionWithTypeArguments */, node, node.types, 528 /* ListFormat.HeritageClauseTypes */);
3285
+ this.emitList(23 /* ListItem.HeritageClauseElement */, node, node.types, 528 /* ListFormat.HeritageClauseTypes */);
3273
3286
  this.exitNode(node, state);
3274
3287
  return true;
3275
3288
  }
@@ -3494,9 +3507,15 @@ export class Printer extends NameGeneratorHost {
3494
3507
  if (node instanceof ExpressionWithTypeArguments)
3495
3508
  return this.emitExpressionWithTypeArguments(node);
3496
3509
  break;
3497
- case 23 /* ListItem.JsxChild */:
3510
+ case 23 /* ListItem.HeritageClauseElement */:
3511
+ if (node instanceof ExpressionWithTypeArguments)
3512
+ return this.emitExpressionWithTypeArguments(node);
3513
+ if (node.kind === 185 /* SyntaxKind.TypeReference */)
3514
+ return this.emitTypeNodeWorker(node);
3515
+ break;
3516
+ case 24 /* ListItem.JsxChild */:
3498
3517
  return this.emitJsxChild(node);
3499
- case 24 /* ListItem.JsxAttributeLike */:
3518
+ case 25 /* ListItem.JsxAttributeLike */:
3500
3519
  if (node instanceof JsxAttribute)
3501
3520
  return this.emitJsxAttribute(node);
3502
3521
  if (node instanceof JsxSpreadAttribute) {
@@ -3557,48 +3576,48 @@ export class Printer extends NameGeneratorHost {
3557
3576
  return false;
3558
3577
  let originalList = children;
3559
3578
  switch (original.kind) {
3560
- case 211 /* SyntaxKind.ObjectLiteralExpression */:
3579
+ case 212 /* SyntaxKind.ObjectLiteralExpression */:
3561
3580
  originalList = getProperties(original);
3562
3581
  break;
3563
- case 210 /* SyntaxKind.ArrayLiteralExpression */:
3564
- case 207 /* SyntaxKind.ObjectBindingPattern */:
3565
- case 208 /* SyntaxKind.ArrayBindingPattern */:
3566
- case 276 /* SyntaxKind.NamedImports */:
3567
- case 280 /* SyntaxKind.NamedExports */:
3582
+ case 211 /* SyntaxKind.ArrayLiteralExpression */:
3583
+ case 208 /* SyntaxKind.ObjectBindingPattern */:
3584
+ case 209 /* SyntaxKind.ArrayBindingPattern */:
3585
+ case 277 /* SyntaxKind.NamedImports */:
3586
+ case 281 /* SyntaxKind.NamedExports */:
3568
3587
  originalList = getElements(original);
3569
3588
  break;
3570
- case 214 /* SyntaxKind.CallExpression */:
3571
- case 215 /* SyntaxKind.NewExpression */:
3589
+ case 215 /* SyntaxKind.CallExpression */:
3590
+ case 216 /* SyntaxKind.NewExpression */:
3572
3591
  if (children === getTypeArguments(parent))
3573
3592
  originalList = getTypeArguments(original);
3574
3593
  else if (children === getArguments(parent))
3575
3594
  originalList = getArguments(original);
3576
3595
  break;
3577
- case 177 /* SyntaxKind.Constructor */:
3578
- case 175 /* SyntaxKind.MethodDeclaration */:
3579
- case 178 /* SyntaxKind.GetAccessor */:
3580
- case 179 /* SyntaxKind.SetAccessor */:
3581
- case 263 /* SyntaxKind.FunctionDeclaration */:
3582
- case 219 /* SyntaxKind.FunctionExpression */:
3583
- case 220 /* SyntaxKind.ArrowFunction */:
3584
- case 185 /* SyntaxKind.FunctionType */:
3585
- case 186 /* SyntaxKind.ConstructorType */:
3586
- case 180 /* SyntaxKind.CallSignature */:
3587
- case 181 /* SyntaxKind.ConstructSignature */:
3596
+ case 178 /* SyntaxKind.Constructor */:
3597
+ case 176 /* SyntaxKind.MethodDeclaration */:
3598
+ case 179 /* SyntaxKind.GetAccessor */:
3599
+ case 180 /* SyntaxKind.SetAccessor */:
3600
+ case 264 /* SyntaxKind.FunctionDeclaration */:
3601
+ case 220 /* SyntaxKind.FunctionExpression */:
3602
+ case 221 /* SyntaxKind.ArrowFunction */:
3603
+ case 186 /* SyntaxKind.FunctionType */:
3604
+ case 187 /* SyntaxKind.ConstructorType */:
3605
+ case 181 /* SyntaxKind.CallSignature */:
3606
+ case 182 /* SyntaxKind.ConstructSignature */:
3588
3607
  if (children === getTypeParameters(parent))
3589
3608
  originalList = getTypeParameters(original);
3590
3609
  else if (children === getParameters(parent))
3591
3610
  originalList = getParameters(original);
3592
3611
  break;
3593
- case 264 /* SyntaxKind.ClassDeclaration */:
3594
- case 232 /* SyntaxKind.ClassExpression */:
3595
- case 265 /* SyntaxKind.InterfaceDeclaration */:
3596
- case 266 /* SyntaxKind.TypeAliasDeclaration */:
3597
- case 345 /* SyntaxKind.JSTypeAliasDeclaration */:
3612
+ case 265 /* SyntaxKind.ClassDeclaration */:
3613
+ case 233 /* SyntaxKind.ClassExpression */:
3614
+ case 266 /* SyntaxKind.InterfaceDeclaration */:
3615
+ case 267 /* SyntaxKind.TypeAliasDeclaration */:
3616
+ case 346 /* SyntaxKind.JSTypeAliasDeclaration */:
3598
3617
  if (children === getTypeParameters(parent))
3599
3618
  originalList = getTypeParameters(original);
3600
3619
  break;
3601
- case 301 /* SyntaxKind.ImportAttributes */:
3620
+ case 302 /* SyntaxKind.ImportAttributes */:
3602
3621
  if (original instanceof ImportAttributes)
3603
3622
  originalList = original.attributes;
3604
3623
  break;
@@ -3713,126 +3732,130 @@ export class Printer extends NameGeneratorHost {
3713
3732
  if (node instanceof PrivateIdentifier)
3714
3733
  return this.emitPrivateIdentifier(node);
3715
3734
  break;
3716
- case 167 /* SyntaxKind.QualifiedName */:
3735
+ case 168 /* SyntaxKind.QualifiedName */:
3717
3736
  if (node instanceof QualifiedName)
3718
3737
  return this.emitQualifiedName(node);
3719
3738
  break;
3720
- case 168 /* SyntaxKind.ComputedPropertyName */:
3739
+ case 169 /* SyntaxKind.ComputedPropertyName */:
3721
3740
  if (node instanceof ComputedPropertyName)
3722
3741
  return this.emitComputedPropertyName(node);
3723
3742
  break;
3724
- case 169 /* SyntaxKind.TypeParameter */:
3743
+ case 170 /* SyntaxKind.TypeParameter */:
3725
3744
  if (node instanceof TypeParameterDeclaration)
3726
3745
  return this.emitTypeParameter(node);
3727
3746
  break;
3728
- case 170 /* SyntaxKind.Parameter */:
3747
+ case 171 /* SyntaxKind.Parameter */:
3729
3748
  if (node instanceof ParameterDeclaration)
3730
3749
  return this.emitParameter(node);
3731
3750
  break;
3732
- case 171 /* SyntaxKind.Decorator */:
3751
+ case 172 /* SyntaxKind.Decorator */:
3733
3752
  if (node instanceof Decorator)
3734
3753
  return this.emitDecorator(node);
3735
3754
  break;
3736
- case 172 /* SyntaxKind.PropertySignature */:
3737
- case 174 /* SyntaxKind.MethodSignature */:
3738
- case 180 /* SyntaxKind.CallSignature */:
3739
- case 181 /* SyntaxKind.ConstructSignature */:
3740
- case 350 /* SyntaxKind.NotEmittedTypeElement */:
3755
+ case 173 /* SyntaxKind.PropertySignature */:
3756
+ case 175 /* SyntaxKind.MethodSignature */:
3757
+ case 181 /* SyntaxKind.CallSignature */:
3758
+ case 182 /* SyntaxKind.ConstructSignature */:
3759
+ case 351 /* SyntaxKind.NotEmittedTypeElement */:
3741
3760
  return this.emitTypeElement(node);
3742
- case 173 /* SyntaxKind.PropertyDeclaration */:
3743
- case 175 /* SyntaxKind.MethodDeclaration */:
3744
- case 176 /* SyntaxKind.ClassStaticBlockDeclaration */:
3745
- case 177 /* SyntaxKind.Constructor */:
3746
- case 178 /* SyntaxKind.GetAccessor */:
3747
- case 179 /* SyntaxKind.SetAccessor */:
3748
- case 182 /* SyntaxKind.IndexSignature */:
3749
- case 241 /* SyntaxKind.SemicolonClassElement */:
3761
+ case 174 /* SyntaxKind.PropertyDeclaration */:
3762
+ case 176 /* SyntaxKind.MethodDeclaration */:
3763
+ case 177 /* SyntaxKind.ClassStaticBlockDeclaration */:
3764
+ case 178 /* SyntaxKind.Constructor */:
3765
+ case 179 /* SyntaxKind.GetAccessor */:
3766
+ case 180 /* SyntaxKind.SetAccessor */:
3767
+ case 183 /* SyntaxKind.IndexSignature */:
3768
+ case 242 /* SyntaxKind.SemicolonClassElement */:
3750
3769
  return this.emitClassElement(node);
3751
- case 207 /* SyntaxKind.ObjectBindingPattern */:
3752
- case 208 /* SyntaxKind.ArrayBindingPattern */:
3770
+ case 208 /* SyntaxKind.ObjectBindingPattern */:
3771
+ case 209 /* SyntaxKind.ArrayBindingPattern */:
3753
3772
  if (node instanceof BindingPattern)
3754
3773
  return this.emitBindingPattern(node);
3755
3774
  break;
3756
- case 209 /* SyntaxKind.BindingElement */:
3775
+ case 210 /* SyntaxKind.BindingElement */:
3757
3776
  if (node instanceof BindingElement)
3758
3777
  return this.emitBindingElement(node);
3759
3778
  break;
3760
- case 240 /* SyntaxKind.TemplateSpan */:
3779
+ case 241 /* SyntaxKind.TemplateSpan */:
3761
3780
  return this.emitListItem(14 /* ListItem.TemplateSpan */, node);
3762
- case 261 /* SyntaxKind.VariableDeclaration */:
3781
+ case 262 /* SyntaxKind.VariableDeclaration */:
3763
3782
  if (node instanceof VariableDeclaration)
3764
3783
  return this.emitVariableDeclaration(node);
3765
3784
  break;
3766
- case 262 /* SyntaxKind.VariableDeclarationList */:
3785
+ case 263 /* SyntaxKind.VariableDeclarationList */:
3767
3786
  if (node instanceof VariableDeclarationList)
3768
3787
  return this.emitVariableDeclarationList(node);
3769
3788
  break;
3770
- case 269 /* SyntaxKind.ModuleBlock */:
3789
+ case 270 /* SyntaxKind.ModuleBlock */:
3771
3790
  if (node instanceof ModuleBlock)
3772
3791
  return this.emitBlockLike(node, node.statements, false);
3773
3792
  break;
3774
- case 270 /* SyntaxKind.CaseBlock */:
3793
+ case 271 /* SyntaxKind.CaseBlock */:
3775
3794
  if (node instanceof CaseBlock)
3776
3795
  return this.emitBlockLike(node, node.clauses, true);
3777
3796
  break;
3778
- case 274 /* SyntaxKind.ImportClause */:
3797
+ case 275 /* SyntaxKind.ImportClause */:
3779
3798
  if (node instanceof ImportClause)
3780
3799
  return this.emitImportClause(node);
3781
3800
  break;
3782
- case 277 /* SyntaxKind.ImportSpecifier */:
3801
+ case 277 /* SyntaxKind.NamedImports */:
3802
+ if (node instanceof NamedImports)
3803
+ return this.emitNamedImports(node);
3804
+ break;
3805
+ case 278 /* SyntaxKind.ImportSpecifier */:
3783
3806
  return this.emitListItem(20 /* ListItem.ImportSpecifier */, node);
3784
- case 282 /* SyntaxKind.ExportSpecifier */:
3807
+ case 283 /* SyntaxKind.ExportSpecifier */:
3785
3808
  return this.emitListItem(21 /* ListItem.ExportSpecifier */, node);
3786
- case 301 /* SyntaxKind.ImportAttributes */:
3809
+ case 302 /* SyntaxKind.ImportAttributes */:
3787
3810
  if (node instanceof ImportAttributes)
3788
3811
  return this.emitImportAttributes(node);
3789
3812
  break;
3790
- case 302 /* SyntaxKind.ImportAttribute */:
3813
+ case 303 /* SyntaxKind.ImportAttribute */:
3791
3814
  if (node instanceof ImportAttribute)
3792
3815
  return this.emitImportAttribute(node);
3793
3816
  break;
3794
3817
  case 11 /* SyntaxKind.JsxText */:
3795
- case 295 /* SyntaxKind.JsxExpression */:
3818
+ case 296 /* SyntaxKind.JsxExpression */:
3796
3819
  return this.emitJsxChild(node);
3797
- case 287 /* SyntaxKind.JsxOpeningElement */:
3820
+ case 288 /* SyntaxKind.JsxOpeningElement */:
3798
3821
  if (node instanceof JsxOpeningElement)
3799
3822
  return this.emitJsxOpeningElement(node);
3800
3823
  break;
3801
- case 288 /* SyntaxKind.JsxClosingElement */:
3824
+ case 289 /* SyntaxKind.JsxClosingElement */:
3802
3825
  if (node instanceof JsxClosingElement)
3803
3826
  return this.emitJsxClosingElement(node);
3804
3827
  break;
3805
- case 292 /* SyntaxKind.JsxAttribute */:
3806
- case 294 /* SyntaxKind.JsxSpreadAttribute */:
3807
- return this.emitListItem(24 /* ListItem.JsxAttributeLike */, node);
3808
- case 293 /* SyntaxKind.JsxAttributes */:
3828
+ case 293 /* SyntaxKind.JsxAttribute */:
3829
+ case 295 /* SyntaxKind.JsxSpreadAttribute */:
3830
+ return this.emitListItem(25 /* ListItem.JsxAttributeLike */, node);
3831
+ case 294 /* SyntaxKind.JsxAttributes */:
3809
3832
  if (node instanceof JsxAttributes)
3810
3833
  return this.emitJsxAttributes(node);
3811
3834
  break;
3812
- case 296 /* SyntaxKind.JsxNamespacedName */:
3835
+ case 297 /* SyntaxKind.JsxNamespacedName */:
3813
3836
  return this.emitJsxName(node);
3814
- case 297 /* SyntaxKind.CaseClause */:
3815
- case 298 /* SyntaxKind.DefaultClause */:
3837
+ case 298 /* SyntaxKind.CaseClause */:
3838
+ case 299 /* SyntaxKind.DefaultClause */:
3816
3839
  if (node instanceof CaseOrDefaultClause)
3817
3840
  return this.emitCaseOrDefaultClause(node);
3818
3841
  break;
3819
- case 299 /* SyntaxKind.HeritageClause */:
3842
+ case 300 /* SyntaxKind.HeritageClause */:
3820
3843
  if (node instanceof HeritageClause)
3821
3844
  return this.emitHeritageClause(node);
3822
3845
  break;
3823
- case 300 /* SyntaxKind.CatchClause */:
3846
+ case 301 /* SyntaxKind.CatchClause */:
3824
3847
  if (node instanceof CatchClause)
3825
3848
  return this.emitCatchClause(node);
3826
3849
  break;
3827
- case 303 /* SyntaxKind.PropertyAssignment */:
3828
- case 304 /* SyntaxKind.ShorthandPropertyAssignment */:
3829
- case 305 /* SyntaxKind.SpreadAssignment */:
3850
+ case 304 /* SyntaxKind.PropertyAssignment */:
3851
+ case 305 /* SyntaxKind.ShorthandPropertyAssignment */:
3852
+ case 306 /* SyntaxKind.SpreadAssignment */:
3830
3853
  return this.emitObjectLiteralElement(node);
3831
- case 306 /* SyntaxKind.EnumMember */:
3854
+ case 307 /* SyntaxKind.EnumMember */:
3832
3855
  if (node instanceof EnumMember)
3833
3856
  return this.emitEnumMember(node);
3834
3857
  break;
3835
- case 307 /* SyntaxKind.SourceFile */:
3858
+ case 308 /* SyntaxKind.SourceFile */:
3836
3859
  if (node instanceof SourceFile)
3837
3860
  return this.emitSourceFileNode(node);
3838
3861
  break;
@@ -3858,7 +3881,7 @@ export class Printer extends NameGeneratorHost {
3858
3881
  this.pushCommentState(commentFreeNode, node.pos, node.end);
3859
3882
  this.containerPos = node.pos;
3860
3883
  this.containerEnd = node.end;
3861
- if (node.kind === 262 /* SyntaxKind.VariableDeclarationList */)
3884
+ if (node.kind === 263 /* SyntaxKind.VariableDeclarationList */)
3862
3885
  this.declarationListContainerEnd = node.end;
3863
3886
  return true;
3864
3887
  }
@@ -3936,7 +3959,7 @@ export class Printer extends NameGeneratorHost {
3936
3959
  inCommentFreeRange(node) {
3937
3960
  const pos = node.pos;
3938
3961
  const end = node.end;
3939
- if (pos < 0 || end <= pos || node.kind === 11 /* SyntaxKind.JsxText */ || node.kind === 347 /* SyntaxKind.NotEmittedStatement */)
3962
+ if (pos < 0 || end <= pos || node.kind === 11 /* SyntaxKind.JsxText */ || node.kind === 348 /* SyntaxKind.NotEmittedStatement */)
3940
3963
  return false;
3941
3964
  if (this.freeEnd < 0) {
3942
3965
  if (!this.startCommentFreeRange(pos, end))
@@ -4035,7 +4058,7 @@ export class Printer extends NameGeneratorHost {
4035
4058
  }
4036
4059
  emitCommentsAfterToken(pos, contextNode) {
4037
4060
  if (contextNode.end !== pos)
4038
- this.emitTrailingComments(pos, contextNode.kind === 295 /* SyntaxKind.JsxExpression */ ? 0 /* CommentSeparator.None */ : 1 /* CommentSeparator.Before */);
4061
+ this.emitTrailingComments(pos, contextNode.kind === 296 /* SyntaxKind.JsxExpression */ ? 0 /* CommentSeparator.None */ : 1 /* CommentSeparator.Before */);
4039
4062
  return true;
4040
4063
  }
4041
4064
  emitDetachedCommentsBeforeStatementList(node, pos) {
@@ -4068,12 +4091,12 @@ export class Printer extends NameGeneratorHost {
4068
4091
  const skipLeading = positionIsSynthesized(pos) || (flags & 128 /* EmitFlags.NoLeadingComments */) !== 0 || jsxText;
4069
4092
  const skipTrailing = positionIsSynthesized(end) || (flags & 256 /* EmitFlags.NoTrailingComments */) !== 0 || jsxText;
4070
4093
  if (!skipLeading)
4071
- this.emitLeadingComments(pos, node.kind === 347 /* SyntaxKind.NotEmittedStatement */);
4094
+ this.emitLeadingComments(pos, node.kind === 348 /* SyntaxKind.NotEmittedStatement */);
4072
4095
  if (!skipLeading || (pos >= 0 && (flags & 128 /* EmitFlags.NoLeadingComments */) !== 0))
4073
4096
  this.containerPos = pos;
4074
4097
  if (!skipTrailing || (end >= 0 && (flags & 256 /* EmitFlags.NoTrailingComments */) !== 0)) {
4075
4098
  this.containerEnd = end;
4076
- if (node.kind === 262 /* SyntaxKind.VariableDeclarationList */)
4099
+ if (node.kind === 263 /* SyntaxKind.VariableDeclarationList */)
4077
4100
  this.declarationListContainerEnd = end;
4078
4101
  }
4079
4102
  return true;
@@ -4085,7 +4108,7 @@ export class Printer extends NameGeneratorHost {
4085
4108
  this.containerPos = containerPos;
4086
4109
  this.containerEnd = containerEnd;
4087
4110
  this.declarationListContainerEnd = declarationListContainerEnd;
4088
- if (!skipTrailing && node.kind !== 347 /* SyntaxKind.NotEmittedStatement */)
4111
+ if (!skipTrailing && node.kind !== 348 /* SyntaxKind.NotEmittedStatement */)
4089
4112
  this.emitTrailingComments(end, 1 /* CommentSeparator.Before */);
4090
4113
  return true;
4091
4114
  }
@@ -4365,7 +4388,7 @@ export class Printer extends NameGeneratorHost {
4365
4388
  const flags = this.context.getEmitFlags(node);
4366
4389
  const pos = this.context.sourceMapPos(node);
4367
4390
  const end = this.context.sourceMapEnd(node);
4368
- if (node.kind !== 347 /* SyntaxKind.NotEmittedStatement */ &&
4391
+ if (node.kind !== 348 /* SyntaxKind.NotEmittedStatement */ &&
4369
4392
  (flags & 4 /* EmitFlags.NoLeadingSourceMap */) === 0 &&
4370
4393
  this.currentSourceFile !== undefined &&
4371
4394
  pos >= 0)
@@ -4383,7 +4406,7 @@ export class Printer extends NameGeneratorHost {
4383
4406
  stack.length = base;
4384
4407
  if ((flags & 16 /* EmitFlags.NoNestedSourceMaps */) !== 0)
4385
4408
  this.sourceMapsDisabled = false;
4386
- if (node.kind !== 347 /* SyntaxKind.NotEmittedStatement */ && (flags & 8 /* EmitFlags.NoTrailingSourceMap */) === 0 && end >= 0)
4409
+ if (node.kind !== 348 /* SyntaxKind.NotEmittedStatement */ && (flags & 8 /* EmitFlags.NoTrailingSourceMap */) === 0 && end >= 0)
4387
4410
  this.emitPos(end);
4388
4411
  return true;
4389
4412
  }
@@ -4519,14 +4542,14 @@ export class Printer extends NameGeneratorHost {
4519
4542
  return false;
4520
4543
  for (const node of nodes.nodes) {
4521
4544
  switch (node.kind) {
4522
- case 303 /* SyntaxKind.PropertyAssignment */:
4523
- case 304 /* SyntaxKind.ShorthandPropertyAssignment */:
4524
- case 173 /* SyntaxKind.PropertyDeclaration */:
4525
- case 172 /* SyntaxKind.PropertySignature */:
4526
- case 175 /* SyntaxKind.MethodDeclaration */:
4527
- case 174 /* SyntaxKind.MethodSignature */:
4528
- case 178 /* SyntaxKind.GetAccessor */:
4529
- case 179 /* SyntaxKind.SetAccessor */:
4545
+ case 304 /* SyntaxKind.PropertyAssignment */:
4546
+ case 305 /* SyntaxKind.ShorthandPropertyAssignment */:
4547
+ case 174 /* SyntaxKind.PropertyDeclaration */:
4548
+ case 173 /* SyntaxKind.PropertySignature */:
4549
+ case 176 /* SyntaxKind.MethodDeclaration */:
4550
+ case 175 /* SyntaxKind.MethodSignature */:
4551
+ case 179 /* SyntaxKind.GetAccessor */:
4552
+ case 180 /* SyntaxKind.SetAccessor */:
4530
4553
  this.generateNameIfNeeded(getName(node));
4531
4554
  }
4532
4555
  }
@@ -4650,17 +4673,17 @@ function getContainingNodeArray(node) {
4650
4673
  if (parent === undefined)
4651
4674
  return undefined;
4652
4675
  switch (node.kind) {
4653
- case 169 /* SyntaxKind.TypeParameter */:
4676
+ case 170 /* SyntaxKind.TypeParameter */:
4654
4677
  return getTypeParameters(parent);
4655
- case 170 /* SyntaxKind.Parameter */:
4678
+ case 171 /* SyntaxKind.Parameter */:
4656
4679
  return getParameters(parent);
4657
- case 205 /* SyntaxKind.TemplateLiteralTypeSpan */:
4680
+ case 206 /* SyntaxKind.TemplateLiteralTypeSpan */:
4658
4681
  return parent instanceof TemplateLiteralTypeNode ? parent.templateSpans : undefined;
4659
- case 240 /* SyntaxKind.TemplateSpan */:
4682
+ case 241 /* SyntaxKind.TemplateSpan */:
4660
4683
  return parent instanceof TemplateExpression ? parent.templateSpans : undefined;
4661
- case 171 /* SyntaxKind.Decorator */:
4684
+ case 172 /* SyntaxKind.Decorator */:
4662
4685
  return getModifiers(parent);
4663
- case 299 /* SyntaxKind.HeritageClause */:
4686
+ case 300 /* SyntaxKind.HeritageClause */:
4664
4687
  if (parent instanceof ClassDeclaration)
4665
4688
  return parent.heritageClauses;
4666
4689
  if (parent instanceof ClassExpression)
@@ -4670,11 +4693,11 @@ function getContainingNodeArray(node) {
4670
4693
  return undefined;
4671
4694
  }
4672
4695
  switch (parent.kind) {
4673
- case 188 /* SyntaxKind.TypeLiteral */:
4674
- case 265 /* SyntaxKind.InterfaceDeclaration */:
4675
- case 264 /* SyntaxKind.ClassDeclaration */:
4676
- case 232 /* SyntaxKind.ClassExpression */:
4677
- case 267 /* SyntaxKind.EnumDeclaration */:
4696
+ case 189 /* SyntaxKind.TypeLiteral */:
4697
+ case 266 /* SyntaxKind.InterfaceDeclaration */:
4698
+ case 265 /* SyntaxKind.ClassDeclaration */:
4699
+ case 233 /* SyntaxKind.ClassExpression */:
4700
+ case 268 /* SyntaxKind.EnumDeclaration */:
4678
4701
  if (parent instanceof TypeLiteralNode)
4679
4702
  return parent.members;
4680
4703
  if (parent instanceof InterfaceDeclaration)
@@ -4686,24 +4709,24 @@ function getContainingNodeArray(node) {
4686
4709
  if (parent instanceof EnumDeclaration)
4687
4710
  return parent.members;
4688
4711
  break;
4689
- case 193 /* SyntaxKind.UnionType */:
4712
+ case 194 /* SyntaxKind.UnionType */:
4690
4713
  if (parent instanceof UnionTypeNode)
4691
4714
  return parent.types;
4692
4715
  break;
4693
- case 194 /* SyntaxKind.IntersectionType */:
4716
+ case 195 /* SyntaxKind.IntersectionType */:
4694
4717
  if (parent instanceof IntersectionTypeNode)
4695
4718
  return parent.types;
4696
4719
  break;
4697
- case 210 /* SyntaxKind.ArrayLiteralExpression */:
4698
- case 190 /* SyntaxKind.TupleType */:
4699
- case 276 /* SyntaxKind.NamedImports */:
4700
- case 280 /* SyntaxKind.NamedExports */:
4720
+ case 211 /* SyntaxKind.ArrayLiteralExpression */:
4721
+ case 191 /* SyntaxKind.TupleType */:
4722
+ case 277 /* SyntaxKind.NamedImports */:
4723
+ case 281 /* SyntaxKind.NamedExports */:
4701
4724
  return getElements(parent);
4702
- case 211 /* SyntaxKind.ObjectLiteralExpression */:
4703
- case 293 /* SyntaxKind.JsxAttributes */:
4725
+ case 212 /* SyntaxKind.ObjectLiteralExpression */:
4726
+ case 294 /* SyntaxKind.JsxAttributes */:
4704
4727
  return getProperties(parent);
4705
- case 214 /* SyntaxKind.CallExpression */:
4706
- case 215 /* SyntaxKind.NewExpression */:
4728
+ case 215 /* SyntaxKind.CallExpression */:
4729
+ case 216 /* SyntaxKind.NewExpression */:
4707
4730
  if (isTypeNodeKind(node.kind))
4708
4731
  return getTypeArguments(parent);
4709
4732
  if (parent instanceof CallExpression && node !== parent.expression)
@@ -4711,26 +4734,26 @@ function getContainingNodeArray(node) {
4711
4734
  if (parent instanceof NewExpression && node !== parent.expression)
4712
4735
  return parent.arguments;
4713
4736
  break;
4714
- case 285 /* SyntaxKind.JsxElement */:
4737
+ case 286 /* SyntaxKind.JsxElement */:
4715
4738
  if (parent instanceof JsxElement)
4716
4739
  return parent.children;
4717
4740
  break;
4718
- case 289 /* SyntaxKind.JsxFragment */:
4741
+ case 290 /* SyntaxKind.JsxFragment */:
4719
4742
  if (parent instanceof JsxFragment)
4720
4743
  return parent.children;
4721
4744
  break;
4722
- case 287 /* SyntaxKind.JsxOpeningElement */:
4723
- case 286 /* SyntaxKind.JsxSelfClosingElement */:
4745
+ case 288 /* SyntaxKind.JsxOpeningElement */:
4746
+ case 287 /* SyntaxKind.JsxSelfClosingElement */:
4724
4747
  if (isTypeNodeKind(node.kind))
4725
4748
  return getTypeArguments(parent);
4726
4749
  break;
4727
- case 242 /* SyntaxKind.Block */:
4728
- case 269 /* SyntaxKind.ModuleBlock */:
4729
- case 297 /* SyntaxKind.CaseClause */:
4730
- case 298 /* SyntaxKind.DefaultClause */:
4731
- case 307 /* SyntaxKind.SourceFile */:
4750
+ case 243 /* SyntaxKind.Block */:
4751
+ case 270 /* SyntaxKind.ModuleBlock */:
4752
+ case 298 /* SyntaxKind.CaseClause */:
4753
+ case 299 /* SyntaxKind.DefaultClause */:
4754
+ case 308 /* SyntaxKind.SourceFile */:
4732
4755
  return getStatements(parent);
4733
- case 270 /* SyntaxKind.CaseBlock */:
4756
+ case 271 /* SyntaxKind.CaseBlock */:
4734
4757
  if (parent instanceof CaseBlock)
4735
4758
  return parent.clauses;
4736
4759
  break;