typescript 7.0.1-rc → 7.1.0-beta

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 (418) hide show
  1. package/NOTICE.txt +5 -36
  2. package/README.md +39 -14
  3. package/dist/api/async/api.d.ts +827 -123
  4. package/dist/api/async/api.d.ts.map +1 -1
  5. package/dist/api/async/api.js +2367 -340
  6. package/dist/api/async/api.js.map +1 -1
  7. package/dist/api/async/client.d.ts +35 -2
  8. package/dist/api/async/client.d.ts.map +1 -1
  9. package/dist/api/async/client.js +317 -59
  10. package/dist/api/async/client.js.map +1 -1
  11. package/dist/api/async/types.d.ts +199 -53
  12. package/dist/api/async/types.d.ts.map +1 -1
  13. package/dist/api/compilerOptions.generated.d.ts +123 -0
  14. package/dist/api/compilerOptions.generated.d.ts.map +1 -0
  15. package/dist/api/compilerOptions.generated.js +8 -0
  16. package/dist/api/compilerOptions.generated.js.map +1 -0
  17. package/dist/api/diagnosticFormatter.d.ts +9 -0
  18. package/dist/api/diagnosticFormatter.d.ts.map +1 -0
  19. package/dist/api/diagnosticFormatter.js +169 -0
  20. package/dist/api/diagnosticFormatter.js.map +1 -0
  21. package/dist/api/fs.d.ts +68 -13
  22. package/dist/api/fs.d.ts.map +1 -1
  23. package/dist/api/fs.js +62 -101
  24. package/dist/api/fs.js.map +1 -1
  25. package/dist/api/fsCallbacks.d.ts +27 -0
  26. package/dist/api/fsCallbacks.d.ts.map +1 -0
  27. package/dist/api/fsCallbacks.js +111 -0
  28. package/dist/api/fsCallbacks.js.map +1 -0
  29. package/dist/api/node/encoder.d.ts +3 -0
  30. package/dist/api/node/encoder.d.ts.map +1 -1
  31. package/dist/api/node/encoder.generated.js +2 -2
  32. package/dist/api/node/encoder.generated.js.map +1 -1
  33. package/dist/api/node/encoder.js +21 -33
  34. package/dist/api/node/encoder.js.map +1 -1
  35. package/dist/api/node/msgpack.d.ts.map +1 -1
  36. package/dist/api/node/msgpack.js +3 -3
  37. package/dist/api/node/msgpack.js.map +1 -1
  38. package/dist/api/node/node.d.ts +43 -10
  39. package/dist/api/node/node.d.ts.map +1 -1
  40. package/dist/api/node/node.generated.d.ts +20 -2
  41. package/dist/api/node/node.generated.d.ts.map +1 -1
  42. package/dist/api/node/node.generated.js +122 -52
  43. package/dist/api/node/node.generated.js.map +1 -1
  44. package/dist/api/node/node.infrastructure.d.ts +16 -3
  45. package/dist/api/node/node.infrastructure.d.ts.map +1 -1
  46. package/dist/api/node/node.infrastructure.js +20 -40
  47. package/dist/api/node/node.infrastructure.js.map +1 -1
  48. package/dist/api/node/node.js +269 -30
  49. package/dist/api/node/node.js.map +1 -1
  50. package/dist/api/node/protocol.d.ts +5 -2
  51. package/dist/api/node/protocol.d.ts.map +1 -1
  52. package/dist/api/node/protocol.generated.js +2 -2
  53. package/dist/api/node/protocol.generated.js.map +1 -1
  54. package/dist/api/node/protocol.js +5 -2
  55. package/dist/api/node/protocol.js.map +1 -1
  56. package/dist/api/node/wtf8.d.ts +10 -0
  57. package/dist/api/node/wtf8.d.ts.map +1 -0
  58. package/dist/api/node/wtf8.js +130 -0
  59. package/dist/api/node/wtf8.js.map +1 -0
  60. package/dist/api/options.d.ts +26 -6
  61. package/dist/api/options.d.ts.map +1 -1
  62. package/dist/api/options.js +21 -0
  63. package/dist/api/options.js.map +1 -1
  64. package/dist/api/path.d.ts +49 -39
  65. package/dist/api/path.d.ts.map +1 -1
  66. package/dist/api/path.js +409 -33
  67. package/dist/api/path.js.map +1 -1
  68. package/dist/api/prepareCompilerOptions.generated.d.ts +5 -0
  69. package/dist/api/prepareCompilerOptions.generated.d.ts.map +1 -0
  70. package/dist/api/prepareCompilerOptions.generated.js +24 -0
  71. package/dist/api/prepareCompilerOptions.generated.js.map +1 -0
  72. package/dist/api/proto.d.ts +58 -164
  73. package/dist/api/proto.d.ts.map +1 -1
  74. package/dist/api/proto.generated.d.ts +1419 -0
  75. package/dist/api/proto.generated.d.ts.map +1 -0
  76. package/dist/api/proto.generated.js +21 -0
  77. package/dist/api/proto.generated.js.map +1 -0
  78. package/dist/api/proto.js +28 -0
  79. package/dist/api/proto.js.map +1 -1
  80. package/dist/api/sourceFileCache.d.ts +51 -20
  81. package/dist/api/sourceFileCache.d.ts.map +1 -1
  82. package/dist/api/sourceFileCache.js +168 -37
  83. package/dist/api/sourceFileCache.js.map +1 -1
  84. package/dist/api/sync/api.d.ts +1553 -179
  85. package/dist/api/sync/api.d.ts.map +1 -1
  86. package/dist/api/sync/api.js +5086 -758
  87. package/dist/api/sync/api.js.map +1 -1
  88. package/dist/api/sync/client.d.ts +25 -2
  89. package/dist/api/sync/client.d.ts.map +1 -1
  90. package/dist/api/sync/client.js +132 -30
  91. package/dist/api/sync/client.js.map +1 -1
  92. package/dist/api/sync/generatorSupport.d.ts +32 -0
  93. package/dist/api/sync/generatorSupport.d.ts.map +1 -0
  94. package/dist/api/sync/generatorSupport.js +338 -0
  95. package/dist/api/sync/generatorSupport.js.map +1 -0
  96. package/dist/api/sync/types.d.ts +341 -68
  97. package/dist/api/sync/types.d.ts.map +1 -1
  98. package/dist/api/syncChannel.d.ts +7 -1
  99. package/dist/api/syncChannel.d.ts.map +1 -1
  100. package/dist/api/syncChannel.js +41 -3
  101. package/dist/api/syncChannel.js.map +1 -1
  102. package/dist/api/timing.d.ts +175 -0
  103. package/dist/api/timing.d.ts.map +1 -0
  104. package/dist/api/timing.js +149 -0
  105. package/dist/api/timing.js.map +1 -0
  106. package/dist/api/timingDump.d.ts +13 -0
  107. package/dist/api/timingDump.d.ts.map +1 -0
  108. package/dist/api/timingDump.js +38 -0
  109. package/dist/api/timingDump.js.map +1 -0
  110. package/dist/api/typedPaths.d.ts +3 -0
  111. package/dist/api/typedPaths.d.ts.map +1 -0
  112. package/dist/api/typedPaths.js +2 -0
  113. package/dist/api/typedPaths.js.map +1 -0
  114. package/dist/api/userPreferences.generated.d.ts +195 -0
  115. package/dist/api/userPreferences.generated.d.ts.map +1 -0
  116. package/dist/api/userPreferences.generated.js +3 -0
  117. package/dist/api/userPreferences.generated.js.map +1 -0
  118. package/dist/ast/ast.d.ts +125 -8
  119. package/dist/ast/ast.d.ts.map +1 -1
  120. package/dist/ast/ast.generated.d.ts +48 -42
  121. package/dist/ast/ast.generated.d.ts.map +1 -1
  122. package/dist/ast/ast.generated.js +1 -1
  123. package/dist/ast/ast.generated.js.map +1 -1
  124. package/dist/ast/ast.js +1 -0
  125. package/dist/ast/ast.js.map +1 -1
  126. package/dist/ast/astnav.d.ts +3 -2
  127. package/dist/ast/astnav.d.ts.map +1 -1
  128. package/dist/ast/astnav.js +148 -3
  129. package/dist/ast/astnav.js.map +1 -1
  130. package/dist/ast/factory.generated.d.ts +12 -150
  131. package/dist/ast/factory.generated.d.ts.map +1 -1
  132. package/dist/ast/factory.generated.js +2736 -8
  133. package/dist/ast/factory.generated.js.map +1 -1
  134. package/dist/ast/index.d.ts +7 -0
  135. package/dist/ast/index.d.ts.map +1 -1
  136. package/dist/ast/index.js +7 -0
  137. package/dist/ast/index.js.map +1 -1
  138. package/dist/ast/is.d.ts +3 -12
  139. package/dist/ast/is.d.ts.map +1 -1
  140. package/dist/ast/is.generated.d.ts +890 -2
  141. package/dist/ast/is.generated.d.ts.map +1 -1
  142. package/dist/ast/is.generated.js +303 -7
  143. package/dist/ast/is.generated.js.map +1 -1
  144. package/dist/ast/is.js +231 -1
  145. package/dist/ast/is.js.map +1 -1
  146. package/dist/ast/jsdoc.d.ts +12 -0
  147. package/dist/ast/jsdoc.d.ts.map +1 -0
  148. package/dist/ast/jsdoc.js +208 -0
  149. package/dist/ast/jsdoc.js.map +1 -0
  150. package/dist/ast/modifiers.d.ts +4 -0
  151. package/dist/ast/modifiers.d.ts.map +1 -0
  152. package/dist/ast/modifiers.js +41 -0
  153. package/dist/ast/modifiers.js.map +1 -0
  154. package/dist/ast/scanner.d.ts.map +1 -1
  155. package/dist/ast/scanner.js +2 -1
  156. package/dist/ast/scanner.js.map +1 -1
  157. package/dist/ast/spanMap.d.ts +88 -0
  158. package/dist/ast/spanMap.d.ts.map +1 -0
  159. package/dist/ast/spanMap.js +417 -0
  160. package/dist/ast/spanMap.js.map +1 -0
  161. package/dist/ast/utils.d.ts +25 -0
  162. package/dist/ast/utils.d.ts.map +1 -1
  163. package/dist/ast/utils.js +291 -0
  164. package/dist/ast/utils.js.map +1 -1
  165. package/dist/ast/visitor.d.ts +2 -0
  166. package/dist/ast/visitor.d.ts.map +1 -1
  167. package/dist/ast/visitor.generated.d.ts.map +1 -1
  168. package/dist/ast/visitor.generated.js +5 -4
  169. package/dist/ast/visitor.generated.js.map +1 -1
  170. package/dist/ast/visitor.js +40 -0
  171. package/dist/ast/visitor.js.map +1 -1
  172. package/dist/enums/caseSensitivity.d.ts +2 -0
  173. package/dist/enums/caseSensitivity.d.ts.map +1 -0
  174. package/dist/enums/caseSensitivity.enum.d.ts +5 -0
  175. package/dist/enums/caseSensitivity.enum.d.ts.map +1 -0
  176. package/dist/enums/caseSensitivity.enum.js +7 -0
  177. package/dist/enums/caseSensitivity.enum.js.map +1 -0
  178. package/dist/enums/caseSensitivity.js +7 -0
  179. package/dist/enums/caseSensitivity.js.map +1 -0
  180. package/dist/enums/checkFlags.d.ts +2 -0
  181. package/dist/enums/checkFlags.d.ts.map +1 -0
  182. package/dist/enums/checkFlags.enum.d.ts +34 -0
  183. package/dist/enums/checkFlags.enum.d.ts.map +1 -0
  184. package/dist/enums/checkFlags.enum.js +36 -0
  185. package/dist/enums/checkFlags.enum.js.map +1 -0
  186. package/dist/enums/checkFlags.js +36 -0
  187. package/dist/enums/checkFlags.js.map +1 -0
  188. package/dist/enums/completionItemKind.enum.js +1 -1
  189. package/dist/enums/completionItemKind.enum.js.map +1 -1
  190. package/dist/enums/completionItemKind.js +1 -1
  191. package/dist/enums/completionItemKind.js.map +1 -1
  192. package/dist/enums/diagnosticCategory.enum.js +1 -1
  193. package/dist/enums/diagnosticCategory.enum.js.map +1 -1
  194. package/dist/enums/diagnosticCategory.js +1 -1
  195. package/dist/enums/diagnosticCategory.js.map +1 -1
  196. package/dist/enums/diagnosticDirectivePolicy.d.ts +2 -0
  197. package/dist/enums/diagnosticDirectivePolicy.d.ts.map +1 -0
  198. package/dist/enums/diagnosticDirectivePolicy.enum.d.ts +5 -0
  199. package/dist/enums/diagnosticDirectivePolicy.enum.d.ts.map +1 -0
  200. package/dist/enums/diagnosticDirectivePolicy.enum.js +7 -0
  201. package/dist/enums/diagnosticDirectivePolicy.enum.js.map +1 -0
  202. package/dist/enums/diagnosticDirectivePolicy.js +7 -0
  203. package/dist/enums/diagnosticDirectivePolicy.js.map +1 -0
  204. package/dist/enums/elementFlags.enum.js +1 -1
  205. package/dist/enums/elementFlags.enum.js.map +1 -1
  206. package/dist/enums/elementFlags.js +1 -1
  207. package/dist/enums/elementFlags.js.map +1 -1
  208. package/dist/enums/emitOnly.d.ts +2 -0
  209. package/dist/enums/emitOnly.d.ts.map +1 -0
  210. package/dist/enums/emitOnly.enum.d.ts +6 -0
  211. package/dist/enums/emitOnly.enum.d.ts.map +1 -0
  212. package/dist/enums/emitOnly.enum.js +8 -0
  213. package/dist/enums/emitOnly.enum.js.map +1 -0
  214. package/dist/enums/emitOnly.js +8 -0
  215. package/dist/enums/emitOnly.js.map +1 -0
  216. package/dist/enums/indexKind.d.ts +2 -0
  217. package/dist/enums/indexKind.d.ts.map +1 -0
  218. package/dist/enums/indexKind.enum.d.ts +5 -0
  219. package/dist/enums/indexKind.enum.d.ts.map +1 -0
  220. package/dist/enums/indexKind.enum.js +7 -0
  221. package/dist/enums/indexKind.enum.js.map +1 -0
  222. package/dist/enums/indexKind.js +7 -0
  223. package/dist/enums/indexKind.js.map +1 -0
  224. package/dist/enums/internalSymbolName.d.ts +2 -0
  225. package/dist/enums/internalSymbolName.d.ts.map +1 -0
  226. package/dist/enums/internalSymbolName.enum.d.ts +23 -0
  227. package/dist/enums/internalSymbolName.enum.d.ts.map +1 -0
  228. package/dist/enums/internalSymbolName.enum.js +25 -0
  229. package/dist/enums/internalSymbolName.enum.js.map +1 -0
  230. package/dist/enums/internalSymbolName.js +25 -0
  231. package/dist/enums/internalSymbolName.js.map +1 -0
  232. package/dist/enums/jsDeclarationKind.d.ts +2 -0
  233. package/dist/enums/jsDeclarationKind.d.ts.map +1 -0
  234. package/dist/enums/jsDeclarationKind.enum.d.ts +10 -0
  235. package/dist/enums/jsDeclarationKind.enum.d.ts.map +1 -0
  236. package/dist/enums/jsDeclarationKind.enum.js +12 -0
  237. package/dist/enums/jsDeclarationKind.enum.js.map +1 -0
  238. package/dist/enums/jsDeclarationKind.js +12 -0
  239. package/dist/enums/jsDeclarationKind.js.map +1 -0
  240. package/dist/enums/jsxEmit.d.ts +2 -0
  241. package/dist/enums/jsxEmit.d.ts.map +1 -0
  242. package/dist/enums/jsxEmit.enum.d.ts +9 -0
  243. package/dist/enums/jsxEmit.enum.d.ts.map +1 -0
  244. package/dist/enums/jsxEmit.enum.js +11 -0
  245. package/dist/enums/jsxEmit.enum.js.map +1 -0
  246. package/dist/enums/jsxEmit.js +11 -0
  247. package/dist/enums/jsxEmit.js.map +1 -0
  248. package/dist/enums/modifierFlags.enum.js +1 -1
  249. package/dist/enums/modifierFlags.enum.js.map +1 -1
  250. package/dist/enums/modifierFlags.js +1 -1
  251. package/dist/enums/modifierFlags.js.map +1 -1
  252. package/dist/enums/moduleDetectionKind.d.ts +2 -0
  253. package/dist/enums/moduleDetectionKind.d.ts.map +1 -0
  254. package/dist/enums/moduleDetectionKind.enum.d.ts +7 -0
  255. package/dist/enums/moduleDetectionKind.enum.d.ts.map +1 -0
  256. package/dist/enums/moduleDetectionKind.enum.js +9 -0
  257. package/dist/enums/moduleDetectionKind.enum.js.map +1 -0
  258. package/dist/enums/moduleDetectionKind.js +9 -0
  259. package/dist/enums/moduleDetectionKind.js.map +1 -0
  260. package/dist/enums/moduleKind.d.ts +2 -0
  261. package/dist/enums/moduleKind.d.ts.map +1 -0
  262. package/dist/enums/moduleKind.enum.d.ts +17 -0
  263. package/dist/enums/moduleKind.enum.d.ts.map +1 -0
  264. package/dist/enums/moduleKind.enum.js +19 -0
  265. package/dist/enums/moduleKind.enum.js.map +1 -0
  266. package/dist/enums/moduleKind.js +19 -0
  267. package/dist/enums/moduleKind.js.map +1 -0
  268. package/dist/enums/moduleResolutionKind.d.ts +2 -0
  269. package/dist/enums/moduleResolutionKind.d.ts.map +1 -0
  270. package/dist/enums/moduleResolutionKind.enum.d.ts +9 -0
  271. package/dist/enums/moduleResolutionKind.enum.d.ts.map +1 -0
  272. package/dist/enums/moduleResolutionKind.enum.js +11 -0
  273. package/dist/enums/moduleResolutionKind.enum.js.map +1 -0
  274. package/dist/enums/moduleResolutionKind.js +11 -0
  275. package/dist/enums/moduleResolutionKind.js.map +1 -0
  276. package/dist/enums/newLineKind.d.ts +2 -0
  277. package/dist/enums/newLineKind.d.ts.map +1 -0
  278. package/dist/enums/newLineKind.enum.d.ts +6 -0
  279. package/dist/enums/newLineKind.enum.d.ts.map +1 -0
  280. package/dist/enums/newLineKind.enum.js +8 -0
  281. package/dist/enums/newLineKind.enum.js.map +1 -0
  282. package/dist/enums/newLineKind.js +8 -0
  283. package/dist/enums/newLineKind.js.map +1 -0
  284. package/dist/enums/nodeBuilderFlags.enum.js +1 -1
  285. package/dist/enums/nodeBuilderFlags.enum.js.map +1 -1
  286. package/dist/enums/nodeBuilderFlags.js +1 -1
  287. package/dist/enums/nodeBuilderFlags.js.map +1 -1
  288. package/dist/enums/nodeFlags.enum.js +1 -1
  289. package/dist/enums/nodeFlags.enum.js.map +1 -1
  290. package/dist/enums/nodeFlags.js +1 -1
  291. package/dist/enums/nodeFlags.js.map +1 -1
  292. package/dist/enums/objectFlags.enum.d.ts +3 -2
  293. package/dist/enums/objectFlags.enum.d.ts.map +1 -1
  294. package/dist/enums/objectFlags.enum.js +4 -3
  295. package/dist/enums/objectFlags.enum.js.map +1 -1
  296. package/dist/enums/objectFlags.js +4 -3
  297. package/dist/enums/objectFlags.js.map +1 -1
  298. package/dist/enums/outerExpressionKinds.enum.d.ts +5 -1
  299. package/dist/enums/outerExpressionKinds.enum.d.ts.map +1 -1
  300. package/dist/enums/outerExpressionKinds.enum.js +5 -1
  301. package/dist/enums/outerExpressionKinds.enum.js.map +1 -1
  302. package/dist/enums/outerExpressionKinds.js +5 -1
  303. package/dist/enums/outerExpressionKinds.js.map +1 -1
  304. package/dist/enums/scriptKind.d.ts.map +1 -1
  305. package/dist/enums/scriptKind.enum.d.ts +1 -3
  306. package/dist/enums/scriptKind.enum.d.ts.map +1 -1
  307. package/dist/enums/scriptKind.enum.js +1 -2
  308. package/dist/enums/scriptKind.enum.js.map +1 -1
  309. package/dist/enums/scriptKind.js +1 -2
  310. package/dist/enums/scriptKind.js.map +1 -1
  311. package/dist/enums/scriptTarget.d.ts.map +1 -1
  312. package/dist/enums/scriptTarget.enum.d.ts +1 -0
  313. package/dist/enums/scriptTarget.enum.d.ts.map +1 -1
  314. package/dist/enums/scriptTarget.enum.js +2 -0
  315. package/dist/enums/scriptTarget.enum.js.map +1 -1
  316. package/dist/enums/scriptTarget.js +2 -0
  317. package/dist/enums/scriptTarget.js.map +1 -1
  318. package/dist/enums/signatureFlags.enum.js +1 -1
  319. package/dist/enums/signatureFlags.enum.js.map +1 -1
  320. package/dist/enums/signatureFlags.js +1 -1
  321. package/dist/enums/signatureFlags.js.map +1 -1
  322. package/dist/enums/signatureKind.enum.js +1 -1
  323. package/dist/enums/signatureKind.enum.js.map +1 -1
  324. package/dist/enums/signatureKind.js +1 -1
  325. package/dist/enums/signatureKind.js.map +1 -1
  326. package/dist/enums/spanMapFeature.d.ts +2 -0
  327. package/dist/enums/spanMapFeature.d.ts.map +1 -0
  328. package/dist/enums/spanMapFeature.enum.d.ts +25 -0
  329. package/dist/enums/spanMapFeature.enum.d.ts.map +1 -0
  330. package/dist/enums/spanMapFeature.enum.js +27 -0
  331. package/dist/enums/spanMapFeature.enum.js.map +1 -0
  332. package/dist/enums/spanMapFeature.js +27 -0
  333. package/dist/enums/spanMapFeature.js.map +1 -0
  334. package/dist/enums/spanMapFidelity.d.ts +2 -0
  335. package/dist/enums/spanMapFidelity.d.ts.map +1 -0
  336. package/dist/enums/spanMapFidelity.enum.d.ts +7 -0
  337. package/dist/enums/spanMapFidelity.enum.d.ts.map +1 -0
  338. package/dist/enums/spanMapFidelity.enum.js +9 -0
  339. package/dist/enums/spanMapFidelity.enum.js.map +1 -0
  340. package/dist/enums/spanMapFidelity.js +9 -0
  341. package/dist/enums/spanMapFidelity.js.map +1 -0
  342. package/dist/enums/spanMapKind.d.ts +2 -0
  343. package/dist/enums/spanMapKind.d.ts.map +1 -0
  344. package/dist/enums/spanMapKind.enum.d.ts +6 -0
  345. package/dist/enums/spanMapKind.enum.d.ts.map +1 -0
  346. package/dist/enums/spanMapKind.enum.js +8 -0
  347. package/dist/enums/spanMapKind.enum.js.map +1 -0
  348. package/dist/enums/spanMapKind.js +8 -0
  349. package/dist/enums/spanMapKind.js.map +1 -0
  350. package/dist/enums/symbolFlags.enum.d.ts +1 -2
  351. package/dist/enums/symbolFlags.enum.d.ts.map +1 -1
  352. package/dist/enums/symbolFlags.enum.js +2 -3
  353. package/dist/enums/symbolFlags.enum.js.map +1 -1
  354. package/dist/enums/symbolFlags.js +2 -3
  355. package/dist/enums/symbolFlags.js.map +1 -1
  356. package/dist/enums/symbolOwnerKind.d.ts +2 -0
  357. package/dist/enums/symbolOwnerKind.d.ts.map +1 -0
  358. package/dist/enums/symbolOwnerKind.enum.d.ts +5 -0
  359. package/dist/enums/symbolOwnerKind.enum.d.ts.map +1 -0
  360. package/dist/enums/symbolOwnerKind.enum.js +7 -0
  361. package/dist/enums/symbolOwnerKind.enum.js.map +1 -0
  362. package/dist/enums/symbolOwnerKind.js +7 -0
  363. package/dist/enums/symbolOwnerKind.js.map +1 -0
  364. package/dist/enums/syntaxKind.enum.d.ts +198 -197
  365. package/dist/enums/syntaxKind.enum.d.ts.map +1 -1
  366. package/dist/enums/syntaxKind.enum.js +199 -198
  367. package/dist/enums/syntaxKind.enum.js.map +1 -1
  368. package/dist/enums/syntaxKind.js +199 -198
  369. package/dist/enums/syntaxKind.js.map +1 -1
  370. package/dist/enums/tokenFlags.enum.js +1 -1
  371. package/dist/enums/tokenFlags.enum.js.map +1 -1
  372. package/dist/enums/tokenFlags.js +1 -1
  373. package/dist/enums/tokenFlags.js.map +1 -1
  374. package/dist/enums/typeFlags.enum.js +1 -1
  375. package/dist/enums/typeFlags.enum.js.map +1 -1
  376. package/dist/enums/typeFlags.js +1 -1
  377. package/dist/enums/typeFlags.js.map +1 -1
  378. package/dist/enums/typeFormatFlags.d.ts +2 -0
  379. package/dist/enums/typeFormatFlags.d.ts.map +1 -0
  380. package/dist/enums/typeFormatFlags.enum.d.ts +29 -0
  381. package/dist/enums/typeFormatFlags.enum.d.ts.map +1 -0
  382. package/dist/enums/typeFormatFlags.enum.js +31 -0
  383. package/dist/enums/typeFormatFlags.enum.js.map +1 -0
  384. package/dist/enums/typeFormatFlags.js +31 -0
  385. package/dist/enums/typeFormatFlags.js.map +1 -0
  386. package/dist/enums/typePredicateKind.enum.js +1 -1
  387. package/dist/enums/typePredicateKind.enum.js.map +1 -1
  388. package/dist/enums/typePredicateKind.js +1 -1
  389. package/dist/enums/typePredicateKind.js.map +1 -1
  390. package/dist/internal/utils.d.ts +23 -0
  391. package/dist/internal/utils.d.ts.map +1 -0
  392. package/dist/internal/utils.js +25 -0
  393. package/dist/internal/utils.js.map +1 -0
  394. package/dist/vscode/extensionApi.d.ts +101 -0
  395. package/dist/vscode/extensionApi.d.ts.map +1 -0
  396. package/dist/vscode/extensionApi.js +2 -0
  397. package/dist/vscode/extensionApi.js.map +1 -0
  398. package/dist/vscode/moduleLoader.d.ts +14 -0
  399. package/dist/vscode/moduleLoader.d.ts.map +1 -0
  400. package/dist/vscode/moduleLoader.js +36 -0
  401. package/dist/vscode/moduleLoader.js.map +1 -0
  402. package/dist/vscode/protocol.generated.d.ts +2886 -0
  403. package/dist/vscode/protocol.generated.d.ts.map +1 -0
  404. package/dist/vscode/protocol.generated.js +4 -0
  405. package/dist/vscode/protocol.generated.js.map +1 -0
  406. package/lib/getExePath.js +8 -5
  407. package/lib/tsc.js +1 -1
  408. package/lib/version.cjs +3 -0
  409. package/lib/version.d.cts +2 -0
  410. package/package.json +48 -41
  411. package/schemas/jsconfig.schema.json +2207 -0
  412. package/schemas/tsconfig.schema.json +2206 -0
  413. package/vendor/vscode-jsonrpc/lib/node/main.js +1 -1
  414. package/vendor/vscode-jsonrpc/package.json +1 -1
  415. package/dist/api/objectRegistry.d.ts +0 -40
  416. package/dist/api/objectRegistry.d.ts.map +0 -1
  417. package/dist/api/objectRegistry.js +0 -61
  418. package/dist/api/objectRegistry.js.map +0 -1
@@ -1,161 +1,624 @@
1
- /// <reference path="../node/node.d.ts" preserve="true" />
1
+ import { CheckFlags } from "#enums/checkFlags";
2
2
  import { CompletionItemKind } from "#enums/completionItemKind";
3
3
  import { DiagnosticCategory } from "#enums/diagnosticCategory";
4
4
  import { ElementFlags } from "#enums/elementFlags";
5
+ import { EmitOnly } from "#enums/emitOnly";
6
+ import { IndexKind } from "#enums/indexKind";
7
+ import { JsxEmit } from "#enums/jsxEmit";
8
+ import { ModuleKind } from "#enums/moduleKind";
9
+ import { ModuleResolutionKind } from "#enums/moduleResolutionKind";
5
10
  import { NodeBuilderFlags } from "#enums/nodeBuilderFlags";
6
11
  import { ObjectFlags } from "#enums/objectFlags";
12
+ import { ScriptKind } from "#enums/scriptKind";
7
13
  import { SignatureFlags } from "#enums/signatureFlags";
8
14
  import { SignatureKind } from "#enums/signatureKind";
9
15
  import { SymbolFlags } from "#enums/symbolFlags";
16
+ import { SymbolOwnerKind } from "#enums/symbolOwnerKind";
10
17
  import { TypeFlags } from "#enums/typeFlags";
18
+ import { TypeFormatFlags } from "#enums/typeFormatFlags";
11
19
  import { TypePredicateKind } from "#enums/typePredicateKind";
12
- import { type Expression, type Identifier, ModifierFlags, type Node, type Path, type SourceFile, type SyntaxKind, type TypeNode } from "../../ast/index.ts";
13
- import { type ObjectFactories, ObjectRegistry } from "../objectRegistry.ts";
20
+ import { type __String, type CallLikeExpression, type Declaration, type Expression, type FileReference, type Identifier, ModifierFlags, type NamedTupleMember, type Node, type ParameterDeclaration, type PathKey, type RootedDirectoryPath, type RootedFilePath, type SourceFile, type StringLiteralLikeNode, type SyntaxKind, type TypeNode } from "../../ast/index.ts";
14
21
  import type { APIOptions, LSPConnectionOptions } from "../options.ts";
15
- import type { ConfigResponse, DocumentIdentifier, DocumentPosition, LSPUpdateSnapshotParams, ProjectResponse, SignatureResponse, SymbolResponse, TypeResponse, UpdateSnapshotParams, UpdateSnapshotResponse } from "../proto.ts";
16
- import { SourceFileCache } from "../sourceFileCache.ts";
22
+ import type { BuildResponse, CleanBuildResponse, CompactSymbolReference, CompilerOptions, CompletionPreferences, ConfiguredProjectId, CreateBuildOrchestratorResponse, CreateProgramOptions as ProtocolCreateProgramOptions, CreateSnapshotParams as ProtocolCreateSnapshotParams, CreateSnapshotProgramParams as ProtocolCreateSnapshotProgramParams, CreateSnapshotResponse, CreateSourceFileOptions, Diagnostic, DocumentIdentifier, DocumentPosition, FileNotifications, InferredProjectId, LanguageServerSnapshotChanges as ProtocolLanguageServerSnapshotChanges, ModuleResolutionEntry, ModuleResolutionSpec, PackageId, ParsedCommandLine, ProjectId, ProjectReference, ProjectResponse, ProtocolSymbolResponse, RawCompilerOptions, ReadConfigFileResponse, ReconfigureSnapshotProgramParams as ProtocolReconfigureSnapshotProgramParams, ResolutionMode, ResolvedModule, ResolvedTypeReferenceDirective, ResolveModuleNameResult, SignaturePropertyMethod, SignatureResponse, SourceFileMetadata, StaticModuleResolution, SymbolPropertyMethod, SymbolResponse, SymbolsPropertyMethod, SyntheticProjectId, TextEdit, TypeAcquisition, TypePropertyMethod, TypeResponse, TypesPropertyMethod, UserPreferences } from "../proto.ts";
23
+ import { type CachedSourceFile } from "../sourceFileCache.ts";
24
+ import type { RequestTiming, TimingAccumulators, TimingInfo } from "../timing.ts";
17
25
  import { Client, type ClientSocketOptions, type ClientSpawnOptions } from "./client.ts";
18
- import type { AssertsIdentifierTypePredicate, AssertsThisTypePredicate, CompletionEntry, CompletionInfo, CompletionOptions, ConditionalType, Diagnostic, FreshableType, IdentifierTypePredicate, IndexedAccessType, IndexInfo, IndexType, InterfaceType, IntersectionType, IntrinsicType, LiteralType, ObjectType, StringMappingType, SubstitutionType, TemplateLiteralType, ThisTypePredicate, TupleType, Type, TypeParameter, TypePredicate, TypePredicateBase, TypeReference, UnionOrIntersectionType, UnionType } from "./types.ts";
19
- export { CompletionItemKind, DiagnosticCategory, ElementFlags, ModifierFlags, NodeBuilderFlags, ObjectFlags, SignatureFlags, SignatureKind, SymbolFlags, TypeFlags, TypePredicateKind };
20
- export type { APIOptions, ClientSocketOptions, ClientSpawnOptions, DocumentIdentifier, DocumentPosition, LSPConnectionOptions };
21
- export type { AssertsIdentifierTypePredicate, AssertsThisTypePredicate, CompletionEntry, CompletionInfo, CompletionOptions, ConditionalType, Diagnostic, FreshableType, IdentifierTypePredicate, IndexedAccessType, IndexInfo, IndexType, InterfaceType, IntersectionType, IntrinsicType, LiteralType, ObjectType, StringMappingType, SubstitutionType, TemplateLiteralType, ThisTypePredicate, TupleType, Type, TypeParameter, TypePredicate, TypePredicateBase, TypeReference, UnionOrIntersectionType, UnionType };
26
+ import type { AssertsIdentifierTypePredicate, AssertsThisTypePredicate, BigIntLiteralType, BooleanLiteralType, CompletionEntry, CompletionInfo, CompletionOptions, ConditionalType, EmitOutput, EmitOutputFile, EmitResult, FormatDiagnosticsHost, FreshableType, GenericType, GetImportEditsForSymbolsOptions, IdentifierTypePredicate, ImportAdderAction as APIImportAdderAction, IndexedAccessType, IndexInfo, IndexType, InterfaceType, IntersectionType, IntrinsicType, JSDocTagInfo, LiteralType, MappedType, NumberLiteralType, ObjectType, StringLiteralType, StringMappingType, StructuredType, SubstitutionType, TemplateLiteralType, ThisTypePredicate, TupleType, TupleTypeReference, Type, TypeParameter, TypePredicate, TypePredicateBase, TypeReference, UnionOrIntersectionType, UnionType } from "./types.ts";
27
+ export { formatDiagnostics, formatDiagnosticsWithColorAndContext } from "../diagnosticFormatter.ts";
22
28
  export { documentURIToFileName, fileNameToDocumentURI } from "../path.ts";
23
- export declare class API<FromLSP extends boolean = false> {
24
- private client;
25
- private sourceFileCache;
29
+ export { CheckFlags, CompletionItemKind, DiagnosticCategory, ElementFlags, EmitOnly, IndexKind, JsxEmit, ModifierFlags, ModuleKind, ModuleResolutionKind, NodeBuilderFlags, ObjectFlags, ScriptKind, SignatureFlags, SignatureKind, SymbolFlags, SymbolOwnerKind, TypeFlags, TypeFormatFlags, TypePredicateKind };
30
+ export type { APIImportAdderAction as ImportAdderAction, APIOptions, AssertsIdentifierTypePredicate, AssertsThisTypePredicate, BigIntLiteralType, BooleanLiteralType, ClientSocketOptions, ClientSpawnOptions, CompilerOptions, CompletionEntry, CompletionInfo, CompletionOptions, CompletionPreferences, ConditionalType, ConfiguredProjectId, CreateSourceFileOptions, Diagnostic, DocumentIdentifier, DocumentPosition, EmitOutput, EmitOutputFile, EmitResult, FileNotifications, FormatDiagnosticsHost, FreshableType, GenericType, GetImportEditsForSymbolsOptions, IdentifierTypePredicate, IndexedAccessType, IndexInfo, IndexType, InferredProjectId, InterfaceType, IntersectionType, IntrinsicType, JSDocTagInfo, LiteralType, LSPConnectionOptions, MappedType, ModuleResolutionEntry, ModuleResolutionSpec, NumberLiteralType, ObjectType, PackageId, ParsedCommandLine, ProjectId, ProjectReference, RawCompilerOptions, ReadConfigFileResponse, RequestTiming, ResolutionMode, ResolvedModule, ResolvedTypeReferenceDirective, ResolveModuleNameResult, SourceFileMetadata, StaticModuleResolution, StringLiteralType, StringMappingType, StructuredType, SubstitutionType, SyntheticProjectId, TemplateLiteralType, TextEdit, ThisTypePredicate, TimingAccumulators, TimingInfo, TupleType, TupleTypeReference, Type, TypeAcquisition, TypeParameter, TypePredicate, TypePredicateBase, TypeReference, UnionOrIntersectionType, UnionType, UserPreferences, };
31
+ export interface ModuleResolverOptions {
32
+ moduleResolutions?: ModuleResolutionSpec | undefined;
33
+ resolveModuleName?: ResolveModuleNameCallback | undefined;
34
+ }
35
+ export interface ResolveModuleNameCallbackOptions {
36
+ snapshot: Snapshot | InProgressSnapshot | undefined;
37
+ }
38
+ declare const inProgressSnapshotBrand: unique symbol;
39
+ export type InProgressSnapshot = number & {
40
+ readonly [inProgressSnapshotBrand]: never;
41
+ };
42
+ export type ResolveModuleNameCallback = (moduleName: string, containingDirectory: string, resolutionMode: ResolutionMode | undefined, options: ResolveModuleNameCallbackOptions) => StaticModuleResolution | undefined | Promise<StaticModuleResolution | undefined>;
43
+ export type CreateProgramOptions = Omit<ProtocolCreateProgramOptions, "moduleResolver" | "projectReferences"> & {
44
+ moduleResolver?: ModuleResolver | undefined;
45
+ projectReferences?: readonly (Omit<ProjectReference, "path"> & {
46
+ path: string;
47
+ })[] | undefined;
48
+ };
49
+ export type CreateSnapshotProgramParams = Omit<ProtocolCreateSnapshotProgramParams, "options"> & {
50
+ options?: CreateProgramOptions | undefined;
51
+ };
52
+ export type ReconfigureSnapshotProgramParams = Omit<ProtocolReconfigureSnapshotProgramParams, "options"> & {
53
+ options?: CreateProgramOptions | undefined;
54
+ };
55
+ export type CreateSnapshotParams = Omit<ProtocolCreateSnapshotParams, "createPrograms" | "reconfigurePrograms"> & {
56
+ createPrograms?: readonly CreateSnapshotProgramParams[] | undefined;
57
+ reconfigurePrograms?: readonly ReconfigureSnapshotProgramParams[] | undefined;
58
+ };
59
+ export type LanguageServerSnapshotChanges = Omit<ProtocolLanguageServerSnapshotChanges, "createPrograms" | "reconfigurePrograms"> & {
60
+ createPrograms?: readonly CreateSnapshotProgramParams[] | undefined;
61
+ reconfigurePrograms?: readonly ReconfigureSnapshotProgramParams[] | undefined;
62
+ };
63
+ export interface TranspileOptions {
64
+ compilerOptions?: RawCompilerOptions | undefined;
65
+ fileName?: string | undefined;
66
+ reportDiagnostics?: boolean | undefined;
67
+ }
68
+ export interface TranspileOutput {
69
+ outputText: string;
70
+ diagnostics?: readonly Diagnostic[] | undefined;
71
+ sourceMapText?: string | undefined;
72
+ }
73
+ export declare class API<FromLSP extends boolean = false> implements FormatDiagnosticsHost {
26
74
  private toPath;
75
+ private readonly decoder;
76
+ private currentDirectory;
77
+ private caseSensitivity;
27
78
  private initialized;
79
+ private initializing;
28
80
  private activeSnapshots;
29
- private latestSnapshot;
30
- readonly internal: InternalAPI;
31
- constructor(options: APIOptions | LSPConnectionOptions);
81
+ private activeBuildOrchestrators;
82
+ private activeSourceFileLeases;
83
+ readonly printer: Printer;
84
+ readonly debug: DebugHandlers;
85
+ constructor(options?: APIOptions | LSPConnectionOptions);
86
+ /**
87
+ * Looks up a remote declaration's binder symbol. Throws for synthesized or configuration ASTs.
88
+ */
89
+ getSymbol(declaration: Declaration): Promise<Symbol>;
90
+ private fetchDeclarationSymbol;
32
91
  /**
33
92
  * Create an API instance from an existing LSP connection's API session.
34
93
  * Use this when connecting to an API pipe provided by an LSP server via custom/initializeAPISession.
35
94
  */
36
95
  static fromLSPConnection(options: LSPConnectionOptions): Promise<API<true>>;
96
+ batchContext(): {
97
+ [globalThis.Symbol.dispose](): void;
98
+ };
37
99
  private ensureInitialized;
38
- parseConfigFile(file: DocumentIdentifier): Promise<ConfigResponse>;
39
- updateSnapshot(params?: FromLSP extends true ? LSPUpdateSnapshotParams : UpdateSnapshotParams): Promise<Snapshot>;
100
+ private initializeWorker;
101
+ getCurrentDirectory(): RootedDirectoryPath;
102
+ getCanonicalFileName(fileName: string): string;
103
+ private getCaseSensitivity;
104
+ getNewLine(): string;
105
+ parseConfigFile(file: DocumentIdentifier): Promise<ParsedCommandLine>;
106
+ parseCommandLine(commandLine: readonly string[]): Promise<ParsedCommandLine>;
107
+ readConfigFile(file: DocumentIdentifier): Promise<ReadConfigFileResponse>;
108
+ parseJsonConfigFileContent(json: any, options: {
109
+ configDirectory: string;
110
+ configFileName?: never;
111
+ } | {
112
+ configFileName: DocumentIdentifier;
113
+ configDirectory?: never;
114
+ }): Promise<ParsedCommandLine>;
115
+ /**
116
+ * Create and retain a source file independently of a program.
117
+ * Dispose the returned lease when the source file no longer needs to remain available remotely.
118
+ */
119
+ createSourceFile(fileName: string, sourceText: string, options?: CreateSourceFileOptions): Promise<RetainedSourceFile>;
120
+ /**
121
+ * Read, create, and retain a source file independently of a program.
122
+ * Dispose the returned lease when the source file no longer needs to remain available remotely.
123
+ */
124
+ createSourceFileFromFile(file: DocumentIdentifier, options?: CreateSourceFileOptions): Promise<RetainedSourceFile>;
125
+ /**
126
+ * Retain an ordinary remote source file independently of the snapshot or lease that produced it.
127
+ */
128
+ retainSourceFile(sourceFile: SourceFile): Promise<RetainedSourceFile>;
129
+ private retainSourceFileResponse;
130
+ private addSourceFileLease;
131
+ transpileModule(input: string, options?: TranspileOptions): Promise<TranspileOutput>;
132
+ transpileModuleFromFile(file: DocumentIdentifier, options?: TranspileOptions): Promise<TranspileOutput>;
133
+ transpileDeclaration(input: string, options?: TranspileOptions): Promise<TranspileOutput>;
134
+ transpileDeclarationFromFile(file: DocumentIdentifier, options?: TranspileOptions): Promise<TranspileOutput>;
135
+ createSnapshot<const CreatePrograms extends CreateSnapshotParams["createPrograms"] = undefined, const OpenFiles extends CreateSnapshotParams["openFiles"] = undefined>(params: SnapshotOperationParams<CreateSnapshotParams, CreatePrograms, OpenFiles>): Promise<SnapshotForOperationResults<CreatePrograms, OpenFiles>>;
136
+ createSnapshot(): Promise<Snapshot>;
137
+ private updateSnapshot;
138
+ private prepareCreateSnapshotParams;
139
+ private prepareLanguageServerSnapshotChanges;
140
+ private createSnapshotUpdater;
141
+ /**
142
+ * Returns the language server's current canonical snapshot after atomically
143
+ * adopting any supplied API-driven changes. Only available on LSP-connected APIs.
144
+ */
145
+ getCurrentLanguageServerSnapshot<const CreatePrograms extends LanguageServerSnapshotChanges["createPrograms"] = undefined, const OpenFiles extends LanguageServerSnapshotChanges["openFiles"] = undefined>(...args: FromLSP extends true ? [changes: SnapshotOperationParams<LanguageServerSnapshotChanges, CreatePrograms, OpenFiles>, baseSnapshot?: Snapshot] : [changes: never, baseSnapshot?: never]): Promise<SnapshotForOperationResults<CreatePrograms, OpenFiles>>;
146
+ getCurrentLanguageServerSnapshot(...args: FromLSP extends true ? [changes?: LanguageServerSnapshotChanges, baseSnapshot?: Snapshot] : [changes: never, baseSnapshot?: never]): Promise<Snapshot>;
147
+ [globalThis.Symbol.asyncDispose](): Promise<void>;
40
148
  close(): Promise<void>;
149
+ createModuleResolver(compilerOptions: RawCompilerOptions, options?: ModuleResolverOptions): Promise<ModuleResolver>;
41
150
  clearSourceFileCache(): void;
151
+ runWithTemporaryFileUpdate(baseSnapshot: Snapshot, file: DocumentIdentifier, newText: string, cb: (newSnapshot: Snapshot) => void | Promise<void>): Promise<void>;
152
+ /**
153
+ * Returns a snapshot of collected timing information for requests made
154
+ * through this API instance: client-measured round-trip latency and bytes
155
+ * transferred, folded together with the server's own per-request processing
156
+ * time and an estimated transport overhead (round-trip minus server time).
157
+ *
158
+ * Fetching the snapshot issues a lightweight request to the server to
159
+ * retrieve its timing collection. Collection must be enabled via the
160
+ * `collectTiming` option or `TS_API_TIMING_DIR` environment variable; when
161
+ * it is not, the returned snapshot has `enabled: false` and zeroed totals.
162
+ */
163
+ getTimingInfo(): Promise<TimingInfo>;
164
+ /** Clears all accumulated timing totals and recent-request history, on both the client and the server. */
165
+ resetTimingInfo(): Promise<void>;
166
+ /** Creates a program from current filesystem state. */
167
+ createProgram(rootFiles: readonly DocumentIdentifier[], compilerOptions: RawCompilerOptions, createProgramOptions?: CreateProgramOptions): Promise<Program>;
42
168
  }
43
- export declare class InternalAPI {
169
+ type EnsureInitialized = () => Promise<void>;
170
+ /** Returns whether a node is backed by a remote compiler response. */
171
+ export declare function isRemoteNode(node: Node): boolean;
172
+ /** Looks up a remote declaration's binder symbol through its API. Throws for non-remote declarations. */
173
+ export declare function getSymbol(declaration: Declaration): Promise<Symbol>;
174
+ /** An independently retained source file and its disposable remote-lifetime lease. */
175
+ export declare class RetainedSourceFile {
176
+ readonly sourceFile: SourceFile;
177
+ private readonly lease;
178
+ private readonly onDispose;
179
+ private disposed;
180
+ private disposePromise;
181
+ constructor(sourceFile: SourceFile, lease: number, onDispose: () => void);
182
+ [globalThis.Symbol.asyncDispose](): Promise<void>;
183
+ dispose(): Promise<void>;
184
+ private disposeWorker;
185
+ }
186
+ export declare class DebugHandlers {
44
187
  private client;
45
188
  private ensureInitialized;
46
- /** @internal */
47
- constructor(client: Client, ensureInitialized: () => Promise<void>);
189
+ constructor(client: Client, ensureInitialized: EnsureInitialized);
48
190
  startCPUProfile(dir: string): Promise<void>;
49
- stopCPUProfile(): Promise<string>;
50
- saveHeapProfile(dir: string): Promise<string>;
191
+ stopCPUProfile(): Promise<RootedFilePath>;
192
+ saveHeapProfile(dir: string): Promise<RootedFilePath>;
193
+ }
194
+ type SnapshotUpdater = (params: CreateSnapshotParams) => Promise<Snapshot>;
195
+ export interface SnapshotOperation {
196
+ readonly createdPrograms?: readonly Program<SyntheticProjectId>[] | undefined;
197
+ readonly openedFiles?: readonly SnapshotOpenedFileOperation[] | undefined;
198
+ }
199
+ export interface SnapshotOpenedFileOperation {
200
+ readonly project: Project;
51
201
  }
202
+ /** Replaces every element of a tuple while preserving its length and index structure. */
203
+ type MapTupleTo<Tuple extends readonly unknown[], Result> = {
204
+ readonly [Index in keyof Tuple]: Result;
205
+ };
206
+ /**
207
+ * Keeps `Tuple` as an inference target while contextually typing each element from
208
+ * `Elements`. The mapped intersection supplies nested completions and excess-property
209
+ * checks without widening an inferred tuple to an array.
210
+ */
211
+ type ContextualizeTuple<Tuple extends readonly unknown[] | undefined, Elements extends readonly unknown[] | undefined> = Tuple & {
212
+ readonly [Index in keyof Tuple]: NonNullable<Elements>[number];
213
+ };
214
+ /** Substitutes the operation arrays with contextually typed, tuple-preserving versions. */
215
+ type SnapshotOperationParams<Params extends {
216
+ createPrograms?: readonly unknown[] | undefined;
217
+ openFiles?: readonly unknown[] | undefined;
218
+ }, CreatePrograms extends Params["createPrograms"], OpenFiles extends Params["openFiles"]> = Omit<Params, "createPrograms" | "openFiles"> & {
219
+ createPrograms?: ContextualizeTuple<CreatePrograms, Params["createPrograms"]> | undefined;
220
+ openFiles?: ContextualizeTuple<OpenFiles, Params["openFiles"]> | undefined;
221
+ };
222
+ /**
223
+ * Refines a snapshot's operation results to required tuples when the corresponding
224
+ * operation arrays were supplied, preserving their lengths for indexed access.
225
+ */
226
+ type SnapshotForOperationResults<CreatePrograms extends readonly unknown[] | undefined, OpenFiles extends readonly unknown[] | undefined> = Snapshot & {
227
+ readonly operation: SnapshotOperation & (CreatePrograms extends readonly unknown[] ? {
228
+ readonly createdPrograms: MapTupleTo<CreatePrograms, Program<SyntheticProjectId>>;
229
+ } : unknown) & (OpenFiles extends readonly unknown[] ? {
230
+ readonly openedFiles: MapTupleTo<OpenFiles, SnapshotOpenedFileOperation>;
231
+ } : unknown);
232
+ };
233
+ /** Derives the refined snapshot result type from a complete operation parameter type. */
234
+ export type SnapshotForOperation<Params extends CreateSnapshotParams> = SnapshotForOperationResults<Params extends {
235
+ createPrograms: infer CreatePrograms extends readonly unknown[];
236
+ } ? CreatePrograms : undefined, Params extends {
237
+ openFiles: infer OpenFiles extends readonly unknown[];
238
+ } ? OpenFiles : undefined>;
52
239
  export declare class Snapshot {
53
240
  readonly id: number;
241
+ readonly operation: SnapshotOperation;
54
242
  private projectMap;
55
243
  private toPath;
56
- private client;
57
- private objectRegistry;
244
+ private readonly api;
58
245
  private disposed;
246
+ private disposePromise;
59
247
  private onDispose;
60
- constructor(data: UpdateSnapshotResponse, client: Client, sourceFileCache: SourceFileCache, toPath: (fileName: string) => Path, onDispose: () => void);
248
+ private snapshotRegistry;
249
+ private projectDataMap;
250
+ private updateSnapshot;
251
+ private get client();
252
+ constructor(data: CreateSnapshotResponse, toPath: (fileName: string, basePath?: string) => PathKey, api: API<boolean>, onDispose: () => void, updateSnapshot: SnapshotUpdater, baseSnapshot?: Snapshot);
61
253
  getProjects(): readonly Project[];
62
- getProject(configFileName: string): Project | undefined;
254
+ getConfiguredProject(configFileName: string): Project<ConfiguredProjectId> | undefined;
255
+ getProject<Id extends ProjectId>(projectId: Id): Project<Id> | undefined;
256
+ getProgram<Id extends ProjectId>(projectId: Id): Program<Id> | undefined;
257
+ update<const CreatePrograms extends CreateSnapshotParams["createPrograms"] = undefined, const OpenFiles extends CreateSnapshotParams["openFiles"] = undefined>(params: SnapshotOperationParams<CreateSnapshotParams, CreatePrograms, OpenFiles>): Promise<SnapshotForOperationResults<CreatePrograms, OpenFiles>>;
258
+ update(params: CreateSnapshotParams): Promise<Snapshot>;
259
+ /**
260
+ * Gets the default project for a given file from the configured projects and
261
+ * inferred project already loaded in the snapshot. Synthetic projects are not
262
+ * considered. Files that have been opened with `openFiles` are guaranteed to
263
+ * have a result.
264
+ */
63
265
  getDefaultProjectForFile(file: DocumentIdentifier): Promise<Project | undefined>;
64
- [globalThis.Symbol.dispose](): void;
266
+ [globalThis.Symbol.asyncDispose](): Promise<void>;
65
267
  dispose(): Promise<void>;
268
+ private disposeWorker;
66
269
  isDisposed(): boolean;
67
270
  private ensureNotDisposed;
271
+ private requireProject;
68
272
  }
69
- declare class SnapshotObjectRegistry extends ObjectRegistry<Symbol, TypeObject, Signature> {
70
- private client;
273
+ export declare class ModuleResolver {
274
+ readonly id: number;
275
+ private readonly client;
276
+ private readonly disposeCallback;
277
+ private disposed;
278
+ constructor(id: number, client: Client, disposeCallback: (() => void) | undefined);
279
+ resolveModuleName(moduleName: string, containingDirectory: DocumentIdentifier, resolutionMode?: ResolutionMode, options?: {
280
+ snapshot?: Snapshot | InProgressSnapshot | undefined;
281
+ }): Promise<ResolveModuleNameResult>;
282
+ [globalThis.Symbol.asyncDispose](): Promise<void>;
283
+ dispose(): Promise<void>;
284
+ }
285
+ declare class SnapshotObjectRegistry {
286
+ private readonly symbols;
287
+ private readonly projectRegistries;
288
+ private readonly snapshotId;
289
+ constructor(snapshotId: number);
290
+ addProjectRegistry(registry: ProjectObjectRegistry): void;
291
+ getOrCreateSymbol(data: SymbolResponse): Symbol;
292
+ getSymbol(id: number): Symbol | undefined;
293
+ clear(): void;
294
+ }
295
+ declare class ProjectObjectRegistry {
71
296
  private snapshotId;
72
- constructor(factories: ObjectFactories<Symbol, TypeObject, Signature>, client: Client, snapshotId: number);
73
- fetchType<T extends Type>(source: Symbol | Signature | Type, method: string, handle: number | undefined): Promise<T>;
74
- fetchSymbol(source: Symbol | Signature | Type, method: string, handle: number | undefined): Promise<Symbol>;
75
- fetchSignature(source: Symbol | Signature | Type, method: string, handle: number | undefined): Promise<Signature>;
76
- fetchTypes(source: Symbol | Signature | Type, method: string, handles?: readonly number[]): Promise<readonly Type[]>;
77
- fetchSymbols(source: Symbol | Signature | Type, method: string, handles?: readonly number[]): Promise<readonly Symbol[]>;
297
+ readonly project: Project;
298
+ private snapshotRegistry;
299
+ private types;
300
+ private signatures;
301
+ private disposed;
302
+ private get client();
303
+ private get sourceFileCache();
304
+ constructor(snapshotId: number, project: Project, snapshotRegistry: SnapshotObjectRegistry);
305
+ getOrCreateSymbol(data: ProtocolSymbolResponse): Symbol;
306
+ /** Find an already-interned symbol and retain its file record for this registry. */
307
+ getCachedSymbol(reference: CompactSymbolReference): Symbol | undefined;
308
+ getOrCreateType(data: TypeResponse): TypeObject;
309
+ getType(id: number): TypeObject | undefined;
310
+ createNodeHandle<T extends Node>(handle: string): NodeHandle<T>;
311
+ getOrCreateSignature(data: SignatureResponse): Signature;
312
+ getSignature(id: number): Signature | undefined;
313
+ clear(): void;
314
+ private ensureNotDisposed;
315
+ fetchOptionalType<T extends Type>(source: Symbol | Signature | Type, method: TypePropertyMethod, handle: number | false | undefined): Promise<T | undefined>;
316
+ fetchType<T extends Type>(source: Symbol | Signature | Type, method: TypePropertyMethod, handle: number | false | undefined): Promise<T>;
317
+ fetchSymbol(source: Symbol | Signature | Type, method: SymbolPropertyMethod, reference: CompactSymbolReference | undefined): Promise<Symbol>;
318
+ fetchSignature(source: Symbol | Signature | Type, method: SignaturePropertyMethod, handle: number | undefined): Promise<Signature>;
319
+ fetchTypes(source: Symbol | Signature | Type, method: TypesPropertyMethod, handles?: readonly number[]): Promise<readonly Type[]>;
320
+ fetchSymbols(source: Symbol | Signature | Type, method: SymbolsPropertyMethod, references?: readonly CompactSymbolReference[]): Promise<readonly Symbol[]>;
321
+ private fetchSymbolsFromServer;
322
+ fetchBaseTypes(source: Type): Promise<readonly Type[]>;
323
+ fetchPropertiesOfType(source: Type): Promise<readonly Symbol[]>;
324
+ fetchApparentPropertiesOfType(source: Type): Promise<readonly Symbol[]>;
325
+ fetchPropertyOfType(source: Type, name: string): Promise<Symbol | undefined>;
326
+ fetchSignaturesOfType(source: Type, kind: SignatureKind): Promise<readonly Signature[]>;
327
+ fetchIndexInfosOfType(source: Type): Promise<readonly IndexInfo[]>;
328
+ fetchTypeParameterAtPosition(source: Signature, pos: number): Promise<Type>;
78
329
  }
79
- export declare class Project {
80
- readonly id: string;
81
- readonly configFileName: string;
82
- readonly compilerOptions: Record<string, unknown>;
83
- readonly rootFiles: readonly string[];
84
- readonly program: Program;
330
+ export declare class Project<Id extends ProjectId = ProjectId> {
331
+ readonly id: Id;
332
+ readonly configFileName: RootedFilePath | undefined;
333
+ readonly currentDirectory: RootedDirectoryPath;
334
+ readonly dirty: boolean;
335
+ readonly parsedCommandLine: ParsedCommandLine;
336
+ readonly program: Program<Id>;
85
337
  readonly checker: Checker;
86
- readonly emitter: Emitter;
87
- private client;
88
- constructor(data: ProjectResponse, snapshotId: number, client: Client, objectRegistry: SnapshotObjectRegistry, sourceFileCache: SourceFileCache, toPath: (fileName: string) => Path);
338
+ readonly languageService: LanguageService;
339
+ constructor(data: ProjectResponse, snapshotId: number, toPath: (fileName: string, basePath?: string) => PathKey, api: API<boolean>, snapshotRegistry: SnapshotObjectRegistry);
340
+ dispose(): void;
89
341
  }
90
- export declare class Program {
342
+ export declare class LanguageService {
91
343
  private snapshotId;
92
- private projectId;
93
- private client;
94
- private sourceFileCache;
95
- private toPath;
96
- private decoder;
97
- constructor(snapshotId: number, projectId: string, client: Client, sourceFileCache: SourceFileCache, toPath: (fileName: string) => Path);
344
+ private project;
345
+ private objectRegistry;
346
+ private get client();
347
+ constructor(snapshotId: number, project: Project, objectRegistry: ProjectObjectRegistry);
348
+ getImportAdderEdits(file: DocumentIdentifier, actions: readonly APIImportAdderAction[]): Promise<readonly TextEdit[]>;
349
+ getImportEditsForSymbols(file: DocumentIdentifier, symbols: readonly Symbol[], options?: GetImportEditsForSymbolsOptions): Promise<readonly TextEdit[]>;
350
+ getReferencedSymbolsForNode(node: Node, position: number): Promise<ReferencedSymbolEntry[]>;
351
+ getSignatureUsage(signatureDecl: Node): Promise<SignatureUsage[]>;
352
+ getCompletionsAtPosition(document: string, position: number, options?: CompletionOptions): Promise<CompletionInfo | undefined>;
353
+ /**
354
+ * Format a synthesized node with the correct indentation for insertion at a
355
+ * specific position in an existing source file.
356
+ *
357
+ * @param node The synthesized AST node to format.
358
+ * @param file The target file where the node will be inserted.
359
+ * @param position The UTF-16 code-unit offset in the target file for insertion.
360
+ * @returns The formatted text of the node, indented for the insertion position.
361
+ */
362
+ formatNodeForInsertion(node: Node, file: DocumentIdentifier, position: number): Promise<string>;
363
+ }
364
+ export declare class Program<Id extends ProjectId = ProjectId> implements FormatDiagnosticsHost {
365
+ readonly id: Id;
366
+ private readonly project;
367
+ private readonly toPath;
368
+ private readonly decoder;
369
+ private readonly sourceFileMetadataCache;
370
+ private ownedSnapshot;
371
+ private disposePromise;
372
+ private get client();
373
+ private get sourceFileCache();
374
+ constructor(snapshotId: number, project: Project<Id>, toPath: (fileName: string, basePath?: string) => PathKey);
375
+ getCurrentDirectory(): RootedDirectoryPath;
376
+ getCanonicalFileName(fileName: string): string;
377
+ getNewLine(): string;
378
+ [globalThis.Symbol.asyncDispose](): Promise<void>;
379
+ dispose(): Promise<void>;
380
+ private disposeWorker;
381
+ getCompilerOptions(): CompilerOptions;
98
382
  getSourceFile(file: DocumentIdentifier): Promise<SourceFile | undefined>;
99
383
  /**
100
- * Get syntactic (parse) diagnostics for a specific file or all files.
101
- * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files.
384
+ * Returns the source file for an already-canonical path.
385
+ */
386
+ getSourceFileByPath(path: PathKey): Promise<SourceFile | undefined>;
387
+ private getSourceFileWorker;
388
+ getResolvedModule(file: DocumentIdentifier, moduleName: string, mode: ModuleKind): Promise<ResolvedModule | undefined>;
389
+ getModeForUsageLocation(file: DocumentIdentifier, usage: StringLiteralLikeNode): Promise<ModuleKind>;
390
+ getModeForResolutionAtIndex(file: DocumentIdentifier, index: number): Promise<ModuleKind>;
391
+ getResolvedModuleFromModuleSpecifier(moduleSpecifier: StringLiteralLikeNode, sourceFile?: DocumentIdentifier): Promise<ResolvedModule | undefined>;
392
+ getResolvedTypeReferenceDirective(file: DocumentIdentifier, typeDirectiveName: string, mode: ModuleKind): Promise<ResolvedTypeReferenceDirective | undefined>;
393
+ getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(typeReferenceDirective: FileReference, sourceFile: DocumentIdentifier): Promise<ResolvedTypeReferenceDirective | undefined>;
394
+ getSourceFileNames(): Promise<readonly RootedFilePath[]>;
395
+ /**
396
+ * Returns program-stored metadata for the given source file, or `undefined` if the file
397
+ * is not part of the program. Metadata is fetched lazily per file and cached on this
398
+ * `Program` instance.
399
+ */
400
+ getSourceFileMetadata(file: DocumentIdentifier): Promise<SourceFileMetadata | undefined>;
401
+ /**
402
+ * Returns program-stored metadata for the source file at the given path, or `undefined`
403
+ * if the file is not part of the program. Like {@link getSourceFileMetadata}, but skips
404
+ * the file name to path conversion. Metadata is fetched lazily per file and cached on
405
+ * this `Program` instance.
406
+ */
407
+ getSourceFileMetadataByPath(path: PathKey): Promise<SourceFileMetadata | undefined>;
408
+ private fetchSourceFileMetadata;
409
+ private pathKeyForFileName;
410
+ /**
411
+ * Returns whether the given source file was loaded as part of an external library
412
+ * (e.g. a dependency resolved from `node_modules`). The underlying program metadata is
413
+ * fetched lazily per file and cached on this `Program` instance.
414
+ */
415
+ isSourceFileFromExternalLibrary(file: SourceFile): Promise<boolean>;
416
+ /**
417
+ * Returns whether the given source file is a default library file (e.g. `lib.d.ts`).
418
+ * The underlying program metadata is fetched lazily per file and cached on this
419
+ * `Program` instance.
420
+ */
421
+ isSourceFileDefaultLibrary(file: SourceFile): Promise<boolean>;
422
+ /**
423
+ * Get all config source file names associated with this program's project config.
424
+ * Includes the root config file and any extended config files.
102
425
  */
103
- getSyntacticDiagnostics(file?: DocumentIdentifier): Promise<readonly Diagnostic[]>;
426
+ getConfigFileNames(): Promise<readonly RootedFilePath[]>;
104
427
  /**
105
- * Get semantic (type-check) diagnostics for a specific file or all files.
106
- * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files.
428
+ * Get a config source file by file name/URI.
429
+ * This can return the project's root tsconfig file or one of its extended config files.
107
430
  */
108
- getSemanticDiagnostics(file?: DocumentIdentifier): Promise<readonly Diagnostic[]>;
431
+ getConfigSourceFile(file: DocumentIdentifier): Promise<SourceFile | undefined>;
109
432
  /**
110
- * Get suggestion diagnostics for a specific file or all files.
111
- * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files.
433
+ * Get syntactic (parse) diagnostics for specific files or all files.
434
+ * @param file - Optional file(s) to get diagnostics for. If omitted, returns diagnostics for all files.
112
435
  */
113
- getSuggestionDiagnostics(file?: DocumentIdentifier): Promise<readonly Diagnostic[]>;
436
+ getSyntacticDiagnostics(file?: DocumentIdentifier | readonly DocumentIdentifier[]): Promise<readonly Diagnostic[]>;
114
437
  /**
115
- * Get declaration emit diagnostics for a specific file or all files.
116
- * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files.
438
+ * Get binder diagnostics for specific files or all files.
439
+ * @param file - Optional file(s) to get diagnostics for. If omitted, returns diagnostics for all files.
117
440
  */
118
- getDeclarationDiagnostics(file?: DocumentIdentifier): Promise<readonly Diagnostic[]>;
441
+ getBindDiagnostics(file?: DocumentIdentifier | readonly DocumentIdentifier[]): Promise<readonly Diagnostic[]>;
442
+ /**
443
+ * Get semantic (type-check) diagnostics for specific files or all files.
444
+ * @param file - Optional file(s) to get diagnostics for. If omitted, returns diagnostics for all files.
445
+ */
446
+ getSemanticDiagnostics(file?: DocumentIdentifier | readonly DocumentIdentifier[]): Promise<readonly Diagnostic[]>;
447
+ /**
448
+ * Get suggestion diagnostics for specific files or all files.
449
+ * @param file - Optional file(s) to get diagnostics for. If omitted, returns diagnostics for all files.
450
+ */
451
+ getSuggestionDiagnostics(file?: DocumentIdentifier | readonly DocumentIdentifier[]): Promise<readonly Diagnostic[]>;
452
+ /**
453
+ * Get declaration emit diagnostics for specific files or all files.
454
+ * @param file - Optional file(s) to get diagnostics for. If omitted, returns diagnostics for all files.
455
+ */
456
+ getDeclarationDiagnostics(file?: DocumentIdentifier | readonly DocumentIdentifier[]): Promise<readonly Diagnostic[]>;
457
+ /**
458
+ * Get program-wide diagnostics for the project, including compiler options diagnostics.
459
+ */
460
+ getProgramDiagnostics(): Promise<readonly Diagnostic[]>;
461
+ /**
462
+ * Get global (non-file-specific) semantic diagnostics for the project.
463
+ */
464
+ getGlobalDiagnostics(): Promise<readonly Diagnostic[]>;
119
465
  /**
120
466
  * Get config file parsing diagnostics for the project.
121
467
  */
122
468
  getConfigFileParsingDiagnostics(): Promise<readonly Diagnostic[]>;
469
+ /**
470
+ * Emits files to the configured filesystem. Layer and host filesystems are
471
+ * written through; full filesystems remain immutable and return emitted
472
+ * files in {@link EmitResult.fileSystem}.
473
+ */
474
+ emit(emitOnly?: EmitOnly): Promise<EmitResult>;
475
+ /**
476
+ * Emits files and returns their contents without writing to the filesystem.
477
+ */
478
+ emitToString(emitOnly?: EmitOnly): Promise<EmitOutput>;
479
+ /**
480
+ * Gets JavaScript output for selected files regardless of project `noEmit`, `emitDeclarationOnly`, and `noEmitOnError` settings.
481
+ */
482
+ getJavaScriptEmit(files: readonly DocumentIdentifier[]): Promise<EmitOutput>;
483
+ /**
484
+ * Gets declaration output for selected files regardless of project `noEmit`, `declaration`, `emitDeclarationOnly`, and `noEmitOnError` settings.
485
+ */
486
+ getDeclarationEmit(files: readonly DocumentIdentifier[]): Promise<EmitOutput>;
487
+ getProject(): Project<Id>;
488
+ }
489
+ export interface BuildOrchestratorOptions {
490
+ cwd?: string | undefined;
491
+ dry?: boolean;
492
+ force?: boolean;
493
+ verbose?: boolean;
494
+ stopBuildOnErrors?: boolean;
495
+ overrideCompilerOptions?: OverrideCompilerOptions;
496
+ }
497
+ export interface OverrideCompilerOptions {
498
+ incremental?: boolean;
499
+ assumeChangesOnlyAffectDirectDependencies?: boolean;
500
+ declaration?: boolean;
501
+ declarationMap?: boolean;
502
+ emitDeclarationOnly?: boolean;
503
+ sourceMap?: boolean;
504
+ inlineSourceMap?: boolean;
505
+ traceResolution?: boolean;
506
+ }
507
+ export declare class BuildOrchestrator {
508
+ private client;
509
+ private id;
510
+ private disposed;
511
+ private disposePromise;
512
+ private onDispose;
513
+ constructor(client: Client, orchestratorResponse: CreateBuildOrchestratorResponse, onDispose: () => void);
514
+ [globalThis.Symbol.asyncDispose](): Promise<void>;
515
+ dispose(): Promise<void>;
516
+ private disposeWorker;
517
+ build(project?: string): Promise<BuildResponse>;
518
+ buildReferences(project: string): Promise<BuildResponse>;
519
+ clean(project?: string): Promise<CleanBuildResponse>;
520
+ cleanReferences(project?: string): Promise<CleanBuildResponse>;
521
+ isDisposed(): boolean;
522
+ private ensureNotDisposed;
123
523
  }
124
524
  export declare class Checker {
125
525
  private snapshotId;
126
- private projectId;
127
- private client;
526
+ private project;
128
527
  private objectRegistry;
129
- constructor(snapshotId: number, projectId: string, client: Client, objectRegistry: SnapshotObjectRegistry);
528
+ private wellKnownSymbols;
529
+ private wellKnownSignatures;
530
+ private get client();
531
+ constructor(snapshotId: number, project: Project, objectRegistry: ProjectObjectRegistry);
532
+ dispose(): void;
533
+ /** Get the merged symbol, or the original symbol if it has not been merged. */
534
+ getMergedSymbol(symbol: Symbol): Promise<Symbol>;
535
+ /**
536
+ * Get a node's merged symbol. For a declaration, prefer
537
+ * {@link Checker.getSymbolOfDeclaration} for a non-nullable result.
538
+ */
539
+ getSymbolOfNode(node: Node): Promise<Symbol | undefined>;
540
+ /** Get a declaration's merged symbol. */
541
+ getSymbolOfDeclaration(node: Declaration): Promise<Symbol>;
542
+ /** Get a symbol's merged parent, if any. */
543
+ getParentOfSymbol(symbol: Symbol): Promise<Symbol | undefined>;
130
544
  getSymbolAtLocation(node: Node): Promise<Symbol | undefined>;
131
545
  getSymbolAtLocation(nodes: readonly Node[]): Promise<(Symbol | undefined)[]>;
132
546
  getSymbolAtPosition(file: DocumentIdentifier, position: number): Promise<Symbol | undefined>;
133
547
  getSymbolAtPosition(file: DocumentIdentifier, positions: readonly number[]): Promise<(Symbol | undefined)[]>;
134
- getTypeOfSymbol(symbol: Symbol): Promise<Type | undefined>;
135
- getTypeOfSymbol(symbols: readonly Symbol[]): Promise<(Type | undefined)[]>;
136
- getDeclaredTypeOfSymbol(symbol: Symbol): Promise<Type | undefined>;
548
+ getSymbolOfSourceFile(file: DocumentIdentifier): Promise<Symbol | undefined>;
549
+ getSymbolOfSourceFile(files: readonly DocumentIdentifier[]): Promise<(Symbol | undefined)[]>;
550
+ /**
551
+ * Get the type of a symbol. Always returns a type; for symbols whose type
552
+ * cannot be determined the checker yields the error type (use
553
+ * {@link Type.isErrorType} to detect it).
554
+ */
555
+ getTypeOfSymbol(symbol: Symbol): Promise<Type>;
556
+ getTypeOfSymbol(symbols: readonly Symbol[]): Promise<Type[]>;
557
+ /**
558
+ * Get the declared type of a symbol. Always returns a type; for symbols whose
559
+ * declared type cannot be determined the checker yields the error type (use
560
+ * {@link Type.isErrorType} to detect it).
561
+ */
562
+ getDeclaredTypeOfSymbol(symbol: Symbol): Promise<Type>;
563
+ /**
564
+ * Get the type of a symbol, excluding the missing type when
565
+ * `exactOptionalPropertyTypes: true` is set; for symbols whose
566
+ * type cannot be determined the checker yields the error type
567
+ * (use {@link Type.isErrorType} to detect it).
568
+ */
569
+ getNonMissingTypeOfSymbol(symbol: Symbol): Promise<Type>;
137
570
  getReferencesToSymbolInFile(file: DocumentIdentifier, symbol: Symbol): Promise<NodeHandle[]>;
138
- getReferencedSymbolsForNode(node: Node, position: number): Promise<ReferencedSymbolEntry[]>;
139
- getSignatureUsage(signatureDecl: Node): Promise<SignatureUsage[]>;
140
- getCompletionsAtPosition(document: string, position: number, options?: CompletionOptions): Promise<CompletionInfo | undefined>;
141
- getTypeAtLocation(node: Node): Promise<Type | undefined>;
142
- getTypeAtLocation(nodes: readonly Node[]): Promise<(Type | undefined)[]>;
571
+ /**
572
+ * Get the type at a node location. Always returns a type; for nodes whose
573
+ * type cannot be determined the checker yields the error type (use
574
+ * {@link Type.isErrorType} to detect it).
575
+ */
576
+ getTypeAtLocation(node: Node): Promise<Type>;
577
+ getTypeAtLocation(nodes: readonly Node[]): Promise<Type[]>;
143
578
  getSignaturesOfType(type: Type, kind: SignatureKind): Promise<readonly Signature[]>;
144
- getResolvedSignature(node: Node): Promise<Signature | undefined>;
579
+ /**
580
+ * Get the resolved signature of a call-like expression. Always returns a
581
+ * signature; when a call cannot be resolved the checker yields the unknown
582
+ * signature (use {@link Checker.isUnknownSignature} to detect it).
583
+ */
584
+ getResolvedSignature(node: Node): Promise<Signature>;
145
585
  getTypeAtPosition(file: DocumentIdentifier, position: number): Promise<Type | undefined>;
146
586
  getTypeAtPosition(file: DocumentIdentifier, positions: readonly number[]): Promise<(Type | undefined)[]>;
147
587
  resolveName(name: string, meaning: SymbolFlags, location?: Node | DocumentPosition, excludeGlobals?: boolean): Promise<Symbol | undefined>;
588
+ /**
589
+ * Returns all symbols with the given meaning that are visible at `location`.
590
+ */
591
+ getSymbolsInScope(location: Node | DocumentPosition, meaning: SymbolFlags): Promise<readonly Symbol[]>;
148
592
  getResolvedSymbol(node: Identifier): Promise<Symbol | undefined>;
149
593
  getContextualType(node: Expression): Promise<Type | undefined>;
150
- getBaseTypeOfLiteralType(type: Type): Promise<Type | undefined>;
151
- getNonNullableType(type: Type): Promise<Type | undefined>;
152
- getTypeFromTypeNode(node: TypeNode): Promise<Type | undefined>;
153
- getWidenedType(type: Type): Promise<Type | undefined>;
154
- getParameterType(signature: Signature, index: number): Promise<Type | undefined>;
594
+ getContextualTypeForArgumentAtIndex(node: CallLikeExpression, argIndex: number): Promise<Type | undefined>;
595
+ getAwaitedType(type: Type): Promise<Type | undefined>;
596
+ /** Get the base type of a literal type (e.g. `number` for `42`). Always returns a type. */
597
+ getBaseTypeOfLiteralType(type: Type): Promise<Type>;
598
+ /** Get the type with `null` and `undefined` removed. Always returns a type. */
599
+ getNonNullableType(type: Type): Promise<Type>;
600
+ /**
601
+ * Get the type for a type node. Always returns a type; for type nodes whose
602
+ * type cannot be determined the checker yields the error type (use
603
+ * {@link Type.isErrorType} to detect it).
604
+ */
605
+ getTypeFromTypeNode(node: TypeNode): Promise<Type>;
606
+ /** Get the widened type. Always returns a type. */
607
+ getWidenedType(type: Type): Promise<Type>;
608
+ /**
609
+ * Get the type of the parameter at the given index in a signature. Always
610
+ * returns a type; an out-of-range index yields the `any` type.
611
+ */
612
+ getParameterType(signature: Signature, index: number): Promise<Type>;
155
613
  isArrayLikeType(type: Type): Promise<boolean>;
156
614
  isTypeAssignableTo(source: Type, target: Type): Promise<boolean>;
157
615
  getShorthandAssignmentValueSymbol(node: Node): Promise<Symbol | undefined>;
158
- getTypeOfSymbolAtLocation(symbol: Symbol, location: Node): Promise<Type | undefined>;
616
+ /**
617
+ * Get the type of a symbol as narrowed at a specific location. Always returns
618
+ * a type; for symbols whose type cannot be determined the checker yields the
619
+ * error type (use {@link Type.isErrorType} to detect it).
620
+ */
621
+ getTypeOfSymbolAtLocation(symbol: Symbol, location: Node): Promise<Type>;
159
622
  private getIntrinsicType;
160
623
  getAnyType(): Promise<Type>;
161
624
  getStringType(): Promise<Type>;
@@ -168,46 +631,155 @@ export declare class Checker {
168
631
  getUnknownType(): Promise<Type>;
169
632
  getBigIntType(): Promise<Type>;
170
633
  getESSymbolType(): Promise<Type>;
634
+ getNonPrimitiveType(): Promise<Type>;
171
635
  typeToTypeNode(type: Type, enclosingDeclaration?: Node, flags?: number): Promise<TypeNode | undefined>;
172
636
  signatureToSignatureDeclaration(signature: Signature, kind: SyntaxKind, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): Promise<Node | undefined>;
173
- typeToString(type: Type, enclosingDeclaration?: Node, flags?: number): Promise<string>;
637
+ typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): Promise<string>;
174
638
  isContextSensitive(node: Node): Promise<boolean>;
175
- getReturnTypeOfSignature(signature: Signature): Promise<Type | undefined>;
176
- getRestTypeOfSignature(signature: Signature): Promise<Type | undefined>;
639
+ isArrayType(type: Type): Promise<boolean>;
640
+ isTupleType(type: Type): Promise<boolean>;
641
+ isTupleTypeTarget(type: Type): Promise<boolean>;
642
+ /**
643
+ * The following symbols are considered read-only:
644
+ * - Properties with a `readonly` modifier
645
+ * - Variables declared with `const`
646
+ * - Get accessors without matching set accessors
647
+ * - Enum members
648
+ * - `Object.defineProperty` assignments with `writable: false` or no setter
649
+ * - Unions and intersections of the above
650
+ */
651
+ isReadonlySymbol(symbol: Symbol): Promise<boolean>;
652
+ /** Get the return type of a signature. Always returns a type. */
653
+ getReturnTypeOfSignature(signature: Signature): Promise<Type>;
654
+ /**
655
+ * Get the rest type of a signature. Always returns a type; a signature with
656
+ * no rest parameter yields the `any` type.
657
+ */
658
+ getRestTypeOfSignature(signature: Signature): Promise<Type>;
177
659
  getTypePredicateOfSignature(signature: Signature): Promise<TypePredicate | undefined>;
178
- getBaseTypes(type: Type): Promise<readonly Type[]>;
660
+ /**
661
+ * Get the base types of a class or interface type. A type with no base types
662
+ * yields an empty array.
663
+ */
664
+ getBaseTypes(type: InterfaceType): Promise<readonly Type[]>;
665
+ /** Get the apparent type of a type. Always returns a type. */
666
+ getApparentType(type: Type): Promise<Type>;
667
+ /** Get the reduced type of a type. Always returns a type. */
668
+ getReducedType(type: Type): Promise<Type>;
179
669
  getPropertiesOfType(type: Type): Promise<readonly Symbol[]>;
180
670
  getIndexInfosOfType(type: Type): Promise<readonly IndexInfo[]>;
181
- getConstraintOfTypeParameter(type: Type): Promise<Type | undefined>;
182
- getTypeArguments(type: Type): Promise<readonly Type[]>;
671
+ getIndexInfoOfType(type: Type, kind: IndexKind): Promise<IndexInfo | undefined>;
672
+ getIndexTypeOfType(type: Type, kind: IndexKind): Promise<Type | undefined>;
673
+ getTypeOfPropertyOfType(type: Type, propertyName: string): Promise<Type | undefined>;
674
+ /**
675
+ * Get the constraint of a type parameter (the `T` in `<U extends T>`), or
676
+ * undefined if it has none.
677
+ */
678
+ getConstraintOfTypeParameter(type: TypeParameter): Promise<Type | undefined>;
679
+ getDefaultFromTypeParameter(type: TypeParameter): Promise<Type | undefined>;
680
+ getBaseConstraintOfType(type: Type): Promise<Type | undefined>;
681
+ getPropertyOfType(type: Type, name: string): Promise<Symbol | undefined>;
682
+ getConstantValue(node: Node): Promise<string | number | undefined>;
683
+ /** Get the signature of a function-like declaration. Always returns a signature. */
684
+ getSignatureFromDeclaration(node: Node): Promise<Signature>;
685
+ getExportSpecifierLocalTargetSymbol(node: Node): Promise<Symbol | undefined>;
686
+ /**
687
+ * Follow all aliases to get the original symbol. Always returns a symbol; for
688
+ * an unresolved alias the checker yields the unknown symbol (use
689
+ * {@link Checker.isUnknownSymbol} to detect it).
690
+ */
691
+ getAliasedSymbol(symbol: Symbol): Promise<Symbol>;
692
+ /**
693
+ * Get the fully qualified name of a symbol, walking up its parent chain
694
+ * (e.g. `"/path/to/module".Namespace.Name`).
695
+ */
696
+ getFullyQualifiedName(symbol: Symbol): Promise<string>;
697
+ getImmediateAliasedSymbol(symbol: Symbol): Promise<Symbol | undefined>;
698
+ /**
699
+ * Get the target symbol if instantiated, or the provided symbol otherwise.
700
+ */
701
+ getTargetSymbol(symbol: Symbol): Promise<Symbol>;
702
+ getExportSymbolOfSymbol(symbol: Symbol): Promise<Symbol>;
703
+ /**
704
+ * Fetch (once, then cache) the handle ids of the per-checker singleton
705
+ * symbols (unknown, undefined, arguments). These ids are stable for the life
706
+ * of the project's checker, so identity checks against them are local after
707
+ * the first call.
708
+ */
709
+ private getWellKnownSymbols;
710
+ /**
711
+ * Returns `true` if the symbol is the checker's "unknown" symbol (e.g. the
712
+ * result of {@link Checker.getAliasedSymbol} on an unresolved alias).
713
+ */
714
+ isUnknownSymbol(symbol: Symbol): Promise<boolean>;
715
+ /**
716
+ * Returns `true` if the symbol is the checker's "undefined" symbol.
717
+ */
718
+ isUndefinedSymbol(symbol: Symbol): Promise<boolean>;
719
+ /**
720
+ * Returns `true` if the symbol is the checker's "arguments" symbol.
721
+ */
722
+ isArgumentsSymbol(symbol: Symbol): Promise<boolean>;
723
+ /**
724
+ * Fetch (once, then cache) the handle id of the per-checker unknown
725
+ * signature. This id is stable for the life of the project's checker, so
726
+ * identity checks against it are local after the first call.
727
+ */
728
+ private getWellKnownSignatures;
729
+ /**
730
+ * Returns `true` if the signature is the checker's "unknown" signature (e.g.
731
+ * the result of {@link Checker.getResolvedSignature} on a call that cannot be
732
+ * resolved).
733
+ */
734
+ isUnknownSignature(signature: Signature): Promise<boolean>;
735
+ getExportsOfModule(symbol: Symbol): Promise<readonly Symbol[]>;
736
+ getMemberInModuleExports(symbol: Symbol, name: string): Promise<Symbol | undefined>;
737
+ getJsDocTagsOfSymbol(symbol: Symbol): Promise<readonly JSDocTagInfo[]>;
738
+ getDocumentationCommentOfSymbol(symbol: Symbol): Promise<string>;
739
+ /**
740
+ * Get the type arguments of a type reference (e.g. the `string` in `Array<string>`).
741
+ */
742
+ getTypeArguments(type: TypeReference): Promise<readonly Type[]>;
183
743
  }
184
744
  export interface PrintNodeOptions {
185
- preserveSourceNewlines?: boolean;
186
- neverAsciiEscape?: boolean;
187
- terminateUnterminatedLiterals?: boolean;
745
+ preserveSourceNewlines?: boolean | undefined;
746
+ neverAsciiEscape?: boolean | undefined;
747
+ terminateUnterminatedLiterals?: boolean | undefined;
188
748
  }
189
- export declare class Emitter {
749
+ export declare class Printer {
190
750
  private client;
191
751
  constructor(client: Client);
192
752
  printNode(node: Node, options?: PrintNodeOptions): Promise<string>;
753
+ printFile(sourceFile: SourceFile, options?: PrintNodeOptions): Promise<string>;
193
754
  }
194
- export declare class NodeHandle {
755
+ export declare class NodeHandle<out T extends Node = Node> {
756
+ /**
757
+ * The project this handle was produced in, used as the default for {@link resolve}.
758
+ * Node handles are only meaningful within a project's program, so the producing project
759
+ * is remembered so callers don't have to pass it explicitly.
760
+ */
761
+ private readonly canonicalProject;
762
+ /** The owning source file of a file-owned symbol's declaration. */
763
+ private readonly fileOwner;
195
764
  readonly index: number;
196
765
  readonly kind: SyntaxKind;
197
- readonly path: Path;
198
- constructor(handle: string);
766
+ readonly path: PathKey;
767
+ constructor(handle: string, canonicalProject: Project | undefined, fileOwner?: SourceFileOwner);
199
768
  /**
200
- * Resolve this handle to the actual AST node by fetching the source file
201
- * from the given project and looking up the node by index.
769
+ * Resolve this handle to the actual AST node by fetching the source file from a project
770
+ * and looking up the node by index. If no project is passed, the project that produced
771
+ * the handle is used. Declarations of file-owned symbols identify an exact source file and
772
+ * resolve through it, independently of any project.
202
773
  */
203
- resolve(project: Project): Promise<Node | undefined>;
774
+ resolve(project?: Project | undefined): Promise<T | undefined>;
775
+ private fetchOwnerFile;
204
776
  }
205
777
  /** A symbol definition paired with all of its reference nodes. */
206
778
  export interface ReferencedSymbolEntry {
207
779
  /** The node handle for the symbol's definition. */
208
780
  definition: NodeHandle;
209
781
  /** The resolved symbol for the definition, if available. */
210
- symbol?: Symbol;
782
+ symbol?: Symbol | undefined;
211
783
  /** The node handles for each reference to the symbol. */
212
784
  references: NodeHandle[];
213
785
  }
@@ -216,44 +788,78 @@ export interface SignatureUsage {
216
788
  /** The node handle for the name reference. */
217
789
  name: NodeHandle;
218
790
  /** The node handle for the call expression, if the reference is invoked. */
219
- call?: NodeHandle;
791
+ call?: NodeHandle | undefined;
220
792
  }
793
+ /** A cached source-file record and its owning API. */
794
+ interface SourceFileOwner {
795
+ readonly record: CachedSourceFile<Symbol>;
796
+ readonly api: API<boolean>;
797
+ }
798
+ type SymbolStorage = {
799
+ readonly kind: typeof SymbolOwnerKind.File;
800
+ readonly owner: SourceFileOwner;
801
+ } | {
802
+ readonly kind: typeof SymbolOwnerKind.Snapshot;
803
+ readonly registry: ProjectObjectRegistry;
804
+ };
221
805
  export declare class Symbol {
222
- private objectRegistry;
223
- readonly id: number;
806
+ private readonly storage;
807
+ get id(): number;
808
+ /** The escaped (`__String`) name, used as the key in member/export tables. */
809
+ readonly escapedName: __String;
810
+ /** The display name (escaped underscores removed). */
224
811
  readonly name: string;
225
812
  readonly flags: SymbolFlags;
226
- readonly checkFlags: number;
227
- readonly declarations: readonly NodeHandle[];
228
- readonly valueDeclaration: NodeHandle | undefined;
229
- readonly parent: number;
230
- readonly exportSymbol: number;
231
- constructor(data: SymbolResponse, objectRegistry: SnapshotObjectRegistry);
813
+ readonly checkFlags: CheckFlags;
814
+ readonly declarations: readonly NodeHandle<Declaration>[];
815
+ readonly valueDeclaration: NodeHandle<Declaration> | undefined;
816
+ private readonly parent;
817
+ private readonly exportSymbol;
818
+ private membersCache;
819
+ private exportsCache;
820
+ constructor(data: SymbolResponse, storage: SymbolStorage);
232
821
  getParent(): Promise<Symbol | undefined>;
233
- getMembers(): Promise<readonly Symbol[]>;
234
- getExports(): Promise<readonly Symbol[]>;
822
+ /**
823
+ * Get this symbol's members keyed by escaped name. The result is cached on
824
+ * the symbol, so repeated calls do not round-trip to the server.
825
+ */
826
+ getMembers(): Promise<ReadonlyMap<__String, Symbol>>;
827
+ /**
828
+ * Get this symbol's exports keyed by escaped name. The result is cached on
829
+ * the symbol, so repeated calls do not round-trip to the server.
830
+ */
831
+ getExports(): Promise<ReadonlyMap<__String, Symbol>>;
832
+ private fetchSymbolTable;
235
833
  getExportSymbol(): Promise<Symbol>;
834
+ getJsDocTags(checker: Checker): Promise<readonly JSDocTagInfo[]>;
835
+ getDocumentationComment(checker: Checker): Promise<string>;
836
+ private fetchSymbol;
837
+ private fetchSymbols;
838
+ private internFileSymbol;
236
839
  }
237
840
  declare class TypeObject implements Type {
238
841
  private objectRegistry;
239
842
  readonly id: number;
240
843
  readonly flags: TypeFlags;
241
844
  readonly objectFlags: ObjectFlags;
242
- readonly symbol: number;
243
- readonly value: string | number | boolean;
845
+ readonly symbol: CompactSymbolReference;
846
+ readonly value: string | number | boolean | bigint;
244
847
  readonly intrinsicName: string;
245
848
  readonly isThisType: boolean;
246
849
  readonly freshType: number;
247
850
  readonly regularType: number;
248
851
  readonly target: number;
852
+ private readonly tupleType;
249
853
  readonly typeParameters: readonly number[];
250
854
  readonly outerTypeParameters: readonly number[];
251
855
  readonly localTypeParameters: readonly number[];
856
+ readonly thisType: number;
252
857
  readonly aliasTypeArguments: readonly number[];
253
- readonly aliasSymbol: number;
858
+ readonly aliasSymbol: CompactSymbolReference;
254
859
  readonly elementFlags: readonly ElementFlags[];
255
860
  readonly fixedLength: number;
256
861
  readonly readonly: boolean;
862
+ readonly labeledElementDeclarations?: readonly (NodeHandle<NamedTupleMember | ParameterDeclaration> | undefined)[];
257
863
  readonly texts: readonly string[];
258
864
  readonly objectType: number;
259
865
  readonly indexType: number;
@@ -261,38 +867,136 @@ declare class TypeObject implements Type {
261
867
  readonly extendsType: number;
262
868
  readonly baseType: number;
263
869
  readonly substConstraint: number;
264
- constructor(data: TypeResponse, objectRegistry: SnapshotObjectRegistry);
870
+ readonly typeParameter: number;
871
+ readonly constraintType: number;
872
+ readonly nameType: number;
873
+ readonly templateType: number;
874
+ private trueType;
875
+ private falseType;
876
+ private constraint;
877
+ private default;
878
+ private nonNullableType;
879
+ private apparentType;
880
+ private reducedType;
881
+ private properties;
882
+ private apparentProperties;
883
+ private callSignatures;
884
+ private constructSignatures;
885
+ private indexInfos;
886
+ private baseTypes;
887
+ private types;
888
+ private stringIndexType;
889
+ private numberIndexType;
890
+ constructor(data: TypeResponse, objectRegistry: ProjectObjectRegistry);
265
891
  getSymbol(): Promise<Symbol | undefined>;
892
+ getProperties(): Promise<readonly Symbol[]>;
893
+ getProperty(propertyName: string): Promise<Symbol | undefined>;
894
+ getApparentProperties(): Promise<readonly Symbol[]>;
895
+ getCallSignatures(): Promise<readonly Signature[]>;
896
+ getConstructSignatures(): Promise<readonly Signature[]>;
897
+ getNonNullableType(): Promise<Type>;
898
+ getStringIndexType(): Promise<Type | undefined>;
899
+ private getStringIndexTypeWorker;
900
+ getNumberIndexType(): Promise<Type | undefined>;
901
+ private getNumberIndexTypeWorker;
902
+ getApparentType(): Promise<Type>;
903
+ getReducedType(): Promise<Type>;
904
+ getIndexInfos(): Promise<readonly IndexInfo[]>;
266
905
  getAliasSymbol(): Promise<Symbol | undefined>;
267
906
  getTarget(): Promise<Type>;
268
907
  getFreshType(): Promise<FreshableType | undefined>;
269
908
  getRegularType(): Promise<FreshableType | undefined>;
270
- getTypes(): Promise<readonly Type[]>;
271
- getTypeParameters(): Promise<readonly Type[]>;
272
- getOuterTypeParameters(): Promise<readonly Type[]>;
273
- getLocalTypeParameters(): Promise<readonly Type[]>;
909
+ getTypes(): Promise<readonly Type[] | undefined>;
910
+ getTypeParameters(): Promise<readonly TypeParameter[]>;
911
+ getOuterTypeParameters(): Promise<readonly TypeParameter[]>;
912
+ getLocalTypeParameters(): Promise<readonly TypeParameter[]>;
913
+ getThisType(): Promise<TypeParameter | undefined>;
274
914
  getAliasTypeArguments(): Promise<readonly Type[]>;
915
+ getTypeParameter(): Promise<TypeParameter>;
916
+ getConstraintType(): Promise<Type>;
917
+ getNameType(): Promise<Type | undefined>;
918
+ getTemplateType(): Promise<Type>;
275
919
  getObjectType(): Promise<Type>;
276
920
  getIndexType(): Promise<Type>;
277
921
  getCheckType(): Promise<Type>;
278
922
  getExtendsType(): Promise<Type>;
279
923
  getBaseType(): Promise<Type>;
280
- getConstraint(): Promise<Type>;
924
+ getConstraint(): Promise<Type | undefined>;
925
+ getDefault(): Promise<Type | undefined>;
926
+ getTrueType(): Promise<Type>;
927
+ getFalseType(): Promise<Type>;
928
+ /**
929
+ * Get the base types of this type. Returns `undefined` for any type that is
930
+ * not a class or interface.
931
+ */
932
+ getBaseTypes(): Promise<readonly Type[] | undefined>;
933
+ isClassOrInterface(): this is InterfaceType;
934
+ isUnionType(): this is UnionType;
935
+ isIntersectionType(): this is IntersectionType;
936
+ isObjectType(): this is ObjectType;
937
+ isIntrinsicType(): this is IntrinsicType;
938
+ isErrorType(): boolean;
939
+ isLiteralType(): this is LiteralType;
940
+ isStringLiteralType(): this is StringLiteralType;
941
+ isNumberLiteralType(): this is NumberLiteralType;
942
+ isBigIntLiteralType(): this is BigIntLiteralType;
943
+ isBooleanLiteralType(): this is BooleanLiteralType;
944
+ isTypeReference(): this is TypeReference;
945
+ isTupleType(): this is TupleTypeReference;
946
+ isTupleTypeTarget(): this is TupleType;
947
+ isIndexType(): this is IndexType;
948
+ isIndexedAccessType(): this is IndexedAccessType;
949
+ isConditionalType(): this is ConditionalType;
950
+ isSubstitutionType(): this is SubstitutionType;
951
+ isTemplateLiteralType(): this is TemplateLiteralType;
952
+ isStringMappingType(): this is StringMappingType;
953
+ isTypeParameter(): this is TypeParameter;
954
+ isMappedType(): this is MappedType;
281
955
  }
956
+ export declare function isUnionType(type: Type): type is UnionType;
957
+ export declare function isIntersectionType(type: Type): type is IntersectionType;
958
+ export declare function isObjectType(type: Type): type is ObjectType;
959
+ export declare function isClassOrInterfaceType(type: Type): type is InterfaceType;
960
+ export declare function isIntrinsicType(type: Type): type is IntrinsicType;
961
+ /**
962
+ * Whether this is the error type — the placeholder the checker produces when a
963
+ * type cannot be determined (e.g. an unresolved reference). It is an intrinsic
964
+ * type named `"error"` (this covers both the singleton error type and the
965
+ * per-alias error types manufactured for unresolved type alias references).
966
+ */
967
+ export declare function isErrorType(type: Type): boolean;
968
+ export declare function isLiteralType(type: Type): type is LiteralType;
969
+ export declare function isStringLiteralType(type: Type): type is StringLiteralType;
970
+ export declare function isNumberLiteralType(type: Type): type is NumberLiteralType;
971
+ export declare function isBigIntLiteralType(type: Type): type is BigIntLiteralType;
972
+ export declare function isBooleanLiteralType(type: Type): type is BooleanLiteralType;
973
+ export declare function isTypeReference(type: Type): type is TypeReference;
974
+ export declare function isTupleType(type: Type): type is TupleTypeReference;
975
+ export declare function isTupleTypeTarget(type: Type): type is TupleType;
976
+ export declare function isIndexType(type: Type): type is IndexType;
977
+ export declare function isIndexedAccessType(type: Type): type is IndexedAccessType;
978
+ export declare function isConditionalType(type: Type): type is ConditionalType;
979
+ export declare function isSubstitutionType(type: Type): type is SubstitutionType;
980
+ export declare function isTemplateLiteralType(type: Type): type is TemplateLiteralType;
981
+ export declare function isStringMappingType(type: Type): type is StringMappingType;
982
+ export declare function isTypeParameter(type: Type): type is TypeParameter;
282
983
  export declare class Signature {
283
984
  private flags;
284
985
  private objectRegistry;
285
986
  readonly id: number;
286
- readonly declaration?: NodeHandle | undefined;
987
+ readonly declaration?: NodeHandle<Declaration> | undefined;
287
988
  readonly typeParameters?: readonly number[] | undefined;
288
- readonly parameters: readonly number[];
289
- readonly thisParameter?: number | undefined;
989
+ readonly parameters: readonly CompactSymbolReference[];
990
+ readonly thisParameter?: CompactSymbolReference | undefined;
290
991
  readonly target?: number | undefined;
291
- constructor(data: SignatureResponse, objectRegistry: SnapshotObjectRegistry);
292
- getTypeParameters(): Promise<readonly Type[]>;
992
+ private returnType;
993
+ constructor(data: SignatureResponse, project: Project, objectRegistry: ProjectObjectRegistry);
994
+ getTypeParameters(): Promise<readonly TypeParameter[]>;
293
995
  getParameters(): Promise<readonly Symbol[]>;
294
996
  getThisParameter(): Promise<Symbol | undefined>;
295
997
  getTarget(): Promise<Signature | undefined>;
998
+ getReturnType(): Promise<Type>;
999
+ getTypeParameterAtPosition(pos: number): Promise<Type>;
296
1000
  get hasRestParameter(): boolean;
297
1001
  get isConstruct(): boolean;
298
1002
  get isAbstract(): boolean;