tsc-ts 0.0.10 → 0.1.0

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