@zzzen/pyright-internal 1.1.254

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 (1215) hide show
  1. package/dist/analyzer/aliasDeclarationUtils.d.ts +9 -0
  2. package/dist/analyzer/aliasDeclarationUtils.js +128 -0
  3. package/dist/analyzer/aliasDeclarationUtils.js.map +1 -0
  4. package/dist/analyzer/analysis.d.ts +18 -0
  5. package/dist/analyzer/analysis.js +81 -0
  6. package/dist/analyzer/analysis.js.map +1 -0
  7. package/dist/analyzer/analyzerFileInfo.d.ts +39 -0
  8. package/dist/analyzer/analyzerFileInfo.js +17 -0
  9. package/dist/analyzer/analyzerFileInfo.js.map +1 -0
  10. package/dist/analyzer/analyzerNodeInfo.d.ts +32 -0
  11. package/dist/analyzer/analyzerNodeInfo.js +138 -0
  12. package/dist/analyzer/analyzerNodeInfo.js.map +1 -0
  13. package/dist/analyzer/backgroundAnalysisProgram.d.ts +54 -0
  14. package/dist/analyzer/backgroundAnalysisProgram.js +222 -0
  15. package/dist/analyzer/backgroundAnalysisProgram.js.map +1 -0
  16. package/dist/analyzer/binder.d.ts +149 -0
  17. package/dist/analyzer/binder.js +3195 -0
  18. package/dist/analyzer/binder.js.map +1 -0
  19. package/dist/analyzer/checker.d.ts +116 -0
  20. package/dist/analyzer/checker.js +3828 -0
  21. package/dist/analyzer/checker.js.map +1 -0
  22. package/dist/analyzer/circularDependency.d.ts +7 -0
  23. package/dist/analyzer/circularDependency.js +51 -0
  24. package/dist/analyzer/circularDependency.js.map +1 -0
  25. package/dist/analyzer/codeFlowEngine.d.ts +21 -0
  26. package/dist/analyzer/codeFlowEngine.js +1132 -0
  27. package/dist/analyzer/codeFlowEngine.js.map +1 -0
  28. package/dist/analyzer/codeFlowTypes.d.ts +82 -0
  29. package/dist/analyzer/codeFlowTypes.js +134 -0
  30. package/dist/analyzer/codeFlowTypes.js.map +1 -0
  31. package/dist/analyzer/codeFlowUtils.d.ts +2 -0
  32. package/dist/analyzer/codeFlowUtils.js +348 -0
  33. package/dist/analyzer/codeFlowUtils.js.map +1 -0
  34. package/dist/analyzer/commentUtils.d.ts +4 -0
  35. package/dist/analyzer/commentUtils.js +131 -0
  36. package/dist/analyzer/commentUtils.js.map +1 -0
  37. package/dist/analyzer/constraintSolver.d.ts +7 -0
  38. package/dist/analyzer/constraintSolver.js +605 -0
  39. package/dist/analyzer/constraintSolver.js.map +1 -0
  40. package/dist/analyzer/constructorTransform.d.ts +4 -0
  41. package/dist/analyzer/constructorTransform.js +219 -0
  42. package/dist/analyzer/constructorTransform.js.map +1 -0
  43. package/dist/analyzer/dataClasses.d.ts +9 -0
  44. package/dist/analyzer/dataClasses.js +762 -0
  45. package/dist/analyzer/dataClasses.js.map +1 -0
  46. package/dist/analyzer/declaration.d.ts +90 -0
  47. package/dist/analyzer/declaration.js +42 -0
  48. package/dist/analyzer/declaration.js.map +1 -0
  49. package/dist/analyzer/declarationUtils.d.ts +12 -0
  50. package/dist/analyzer/declarationUtils.js +212 -0
  51. package/dist/analyzer/declarationUtils.js.map +1 -0
  52. package/dist/analyzer/docStringConversion.d.ts +2 -0
  53. package/dist/analyzer/docStringConversion.js +699 -0
  54. package/dist/analyzer/docStringConversion.js.map +1 -0
  55. package/dist/analyzer/docStringUtils.d.ts +3 -0
  56. package/dist/analyzer/docStringUtils.js +103 -0
  57. package/dist/analyzer/docStringUtils.js.map +1 -0
  58. package/dist/analyzer/functionTransform.d.ts +4 -0
  59. package/dist/analyzer/functionTransform.js +96 -0
  60. package/dist/analyzer/functionTransform.js.map +1 -0
  61. package/dist/analyzer/importResolver.d.ts +97 -0
  62. package/dist/analyzer/importResolver.js +1617 -0
  63. package/dist/analyzer/importResolver.js.map +1 -0
  64. package/dist/analyzer/importResult.d.ts +33 -0
  65. package/dist/analyzer/importResult.js +11 -0
  66. package/dist/analyzer/importResult.js.map +1 -0
  67. package/dist/analyzer/importStatementUtils.d.ts +46 -0
  68. package/dist/analyzer/importStatementUtils.js +618 -0
  69. package/dist/analyzer/importStatementUtils.js.map +1 -0
  70. package/dist/analyzer/namedTuples.d.ts +5 -0
  71. package/dist/analyzer/namedTuples.js +342 -0
  72. package/dist/analyzer/namedTuples.js.map +1 -0
  73. package/dist/analyzer/packageTypeReport.d.ts +52 -0
  74. package/dist/analyzer/packageTypeReport.js +45 -0
  75. package/dist/analyzer/packageTypeReport.js.map +1 -0
  76. package/dist/analyzer/packageTypeVerifier.d.ts +37 -0
  77. package/dist/analyzer/packageTypeVerifier.js +908 -0
  78. package/dist/analyzer/packageTypeVerifier.js.map +1 -0
  79. package/dist/analyzer/parentDirectoryCache.d.ts +23 -0
  80. package/dist/analyzer/parentDirectoryCache.js +71 -0
  81. package/dist/analyzer/parentDirectoryCache.js.map +1 -0
  82. package/dist/analyzer/parseTreeCleaner.d.ts +8 -0
  83. package/dist/analyzer/parseTreeCleaner.js +51 -0
  84. package/dist/analyzer/parseTreeCleaner.js.map +1 -0
  85. package/dist/analyzer/parseTreeUtils.d.ts +98 -0
  86. package/dist/analyzer/parseTreeUtils.js +1753 -0
  87. package/dist/analyzer/parseTreeUtils.js.map +1 -0
  88. package/dist/analyzer/parseTreeWalker.d.ts +81 -0
  89. package/dist/analyzer/parseTreeWalker.js +437 -0
  90. package/dist/analyzer/parseTreeWalker.js.map +1 -0
  91. package/dist/analyzer/patternMatching.d.ts +6 -0
  92. package/dist/analyzer/patternMatching.js +866 -0
  93. package/dist/analyzer/patternMatching.js.map +1 -0
  94. package/dist/analyzer/program.d.ts +158 -0
  95. package/dist/analyzer/program.js +1902 -0
  96. package/dist/analyzer/program.js.map +1 -0
  97. package/dist/analyzer/properties.d.ts +10 -0
  98. package/dist/analyzer/properties.js +368 -0
  99. package/dist/analyzer/properties.js.map +1 -0
  100. package/dist/analyzer/protocols.d.ts +8 -0
  101. package/dist/analyzer/protocols.js +409 -0
  102. package/dist/analyzer/protocols.js.map +1 -0
  103. package/dist/analyzer/pyTypedUtils.d.ts +6 -0
  104. package/dist/analyzer/pyTypedUtils.js +42 -0
  105. package/dist/analyzer/pyTypedUtils.js.map +1 -0
  106. package/dist/analyzer/pythonPathUtils.d.ts +14 -0
  107. package/dist/analyzer/pythonPathUtils.js +173 -0
  108. package/dist/analyzer/pythonPathUtils.js.map +1 -0
  109. package/dist/analyzer/scope.d.ts +39 -0
  110. package/dist/analyzer/scope.js +110 -0
  111. package/dist/analyzer/scope.js.map +1 -0
  112. package/dist/analyzer/scopeUtils.d.ts +6 -0
  113. package/dist/analyzer/scopeUtils.js +72 -0
  114. package/dist/analyzer/scopeUtils.js.map +1 -0
  115. package/dist/analyzer/service.d.ts +144 -0
  116. package/dist/analyzer/service.js +1197 -0
  117. package/dist/analyzer/service.js.map +1 -0
  118. package/dist/analyzer/sourceFile.d.ts +123 -0
  119. package/dist/analyzer/sourceFile.js +908 -0
  120. package/dist/analyzer/sourceFile.js.map +1 -0
  121. package/dist/analyzer/sourceMapper.d.ts +47 -0
  122. package/dist/analyzer/sourceMapper.js +543 -0
  123. package/dist/analyzer/sourceMapper.js.map +1 -0
  124. package/dist/analyzer/staticExpressions.d.ts +4 -0
  125. package/dist/analyzer/staticExpressions.js +242 -0
  126. package/dist/analyzer/staticExpressions.js.map +1 -0
  127. package/dist/analyzer/symbol.d.ts +50 -0
  128. package/dist/analyzer/symbol.js +160 -0
  129. package/dist/analyzer/symbol.js.map +1 -0
  130. package/dist/analyzer/symbolNameUtils.d.ts +8 -0
  131. package/dist/analyzer/symbolNameUtils.js +53 -0
  132. package/dist/analyzer/symbolNameUtils.js.map +1 -0
  133. package/dist/analyzer/symbolUtils.d.ts +7 -0
  134. package/dist/analyzer/symbolUtils.js +46 -0
  135. package/dist/analyzer/symbolUtils.js.map +1 -0
  136. package/dist/analyzer/testWalker.d.ts +14 -0
  137. package/dist/analyzer/testWalker.js +92 -0
  138. package/dist/analyzer/testWalker.js.map +1 -0
  139. package/dist/analyzer/tracePrinter.d.ts +11 -0
  140. package/dist/analyzer/tracePrinter.js +222 -0
  141. package/dist/analyzer/tracePrinter.js.map +1 -0
  142. package/dist/analyzer/typeCache.d.ts +40 -0
  143. package/dist/analyzer/typeCache.js +134 -0
  144. package/dist/analyzer/typeCache.js.map +1 -0
  145. package/dist/analyzer/typeDocStringUtils.d.ts +12 -0
  146. package/dist/analyzer/typeDocStringUtils.js +293 -0
  147. package/dist/analyzer/typeDocStringUtils.js.map +1 -0
  148. package/dist/analyzer/typeEvaluator.d.ts +18 -0
  149. package/dist/analyzer/typeEvaluator.js +16598 -0
  150. package/dist/analyzer/typeEvaluator.js.map +1 -0
  151. package/dist/analyzer/typeEvaluatorTypes.d.ts +220 -0
  152. package/dist/analyzer/typeEvaluatorTypes.js +16 -0
  153. package/dist/analyzer/typeEvaluatorTypes.js.map +1 -0
  154. package/dist/analyzer/typeEvaluatorWithTracker.d.ts +6 -0
  155. package/dist/analyzer/typeEvaluatorWithTracker.js +121 -0
  156. package/dist/analyzer/typeEvaluatorWithTracker.js.map +1 -0
  157. package/dist/analyzer/typeGuards.d.ts +6 -0
  158. package/dist/analyzer/typeGuards.js +1293 -0
  159. package/dist/analyzer/typeGuards.js.map +1 -0
  160. package/dist/analyzer/typePrinter.d.ts +17 -0
  161. package/dist/analyzer/typePrinter.js +603 -0
  162. package/dist/analyzer/typePrinter.js.map +1 -0
  163. package/dist/analyzer/typeStubWriter.d.ts +48 -0
  164. package/dist/analyzer/typeStubWriter.js +605 -0
  165. package/dist/analyzer/typeStubWriter.js.map +1 -0
  166. package/dist/analyzer/typeUtils.d.ts +134 -0
  167. package/dist/analyzer/typeUtils.js +2380 -0
  168. package/dist/analyzer/typeUtils.js.map +1 -0
  169. package/dist/analyzer/typeVarContext.d.ts +50 -0
  170. package/dist/analyzer/typeVarContext.js +250 -0
  171. package/dist/analyzer/typeVarContext.js.map +1 -0
  172. package/dist/analyzer/typedDicts.d.ts +12 -0
  173. package/dist/analyzer/typedDicts.js +695 -0
  174. package/dist/analyzer/typedDicts.js.map +1 -0
  175. package/dist/analyzer/types.d.ts +484 -0
  176. package/dist/analyzer/types.js +1844 -0
  177. package/dist/analyzer/types.js.map +1 -0
  178. package/dist/backgroundAnalysis.d.ts +14 -0
  179. package/dist/backgroundAnalysis.js +42 -0
  180. package/dist/backgroundAnalysis.js.map +1 -0
  181. package/dist/backgroundAnalysisBase.d.ts +83 -0
  182. package/dist/backgroundAnalysisBase.js +429 -0
  183. package/dist/backgroundAnalysisBase.js.map +1 -0
  184. package/dist/backgroundThreadBase.d.ts +34 -0
  185. package/dist/backgroundThreadBase.js +134 -0
  186. package/dist/backgroundThreadBase.js.map +1 -0
  187. package/dist/commands/commandController.d.ts +13 -0
  188. package/dist/commands/commandController.js +48 -0
  189. package/dist/commands/commandController.js.map +1 -0
  190. package/dist/commands/commandResult.d.ts +9 -0
  191. package/dist/commands/commandResult.js +19 -0
  192. package/dist/commands/commandResult.js.map +1 -0
  193. package/dist/commands/commands.d.ts +7 -0
  194. package/dist/commands/commands.js +11 -0
  195. package/dist/commands/commands.js.map +1 -0
  196. package/dist/commands/createTypeStub.d.ts +8 -0
  197. package/dist/commands/createTypeStub.js +50 -0
  198. package/dist/commands/createTypeStub.js.map +1 -0
  199. package/dist/commands/quickActionCommand.d.ts +8 -0
  200. package/dist/commands/quickActionCommand.js +31 -0
  201. package/dist/commands/quickActionCommand.js.map +1 -0
  202. package/dist/commands/restartServer.d.ts +8 -0
  203. package/dist/commands/restartServer.js +20 -0
  204. package/dist/commands/restartServer.js.map +1 -0
  205. package/dist/common/cancellationUtils.d.ts +16 -0
  206. package/dist/common/cancellationUtils.js +60 -0
  207. package/dist/common/cancellationUtils.js.map +1 -0
  208. package/dist/common/chokidarFileWatcherProvider.d.ts +9 -0
  209. package/dist/common/chokidarFileWatcherProvider.js +88 -0
  210. package/dist/common/chokidarFileWatcherProvider.js.map +1 -0
  211. package/dist/common/collectionUtils.d.ts +114 -0
  212. package/dist/common/collectionUtils.js +292 -0
  213. package/dist/common/collectionUtils.js.map +1 -0
  214. package/dist/common/commandLineOptions.d.ts +41 -0
  215. package/dist/common/commandLineOptions.js +46 -0
  216. package/dist/common/commandLineOptions.js.map +1 -0
  217. package/dist/common/configOptions.d.ts +144 -0
  218. package/dist/common/configOptions.js +908 -0
  219. package/dist/common/configOptions.js.map +1 -0
  220. package/dist/common/console.d.ts +61 -0
  221. package/dist/common/console.js +191 -0
  222. package/dist/common/console.js.map +1 -0
  223. package/dist/common/core.d.ts +67 -0
  224. package/dist/common/core.js +118 -0
  225. package/dist/common/core.js.map +1 -0
  226. package/dist/common/crypto.d.ts +1 -0
  227. package/dist/common/crypto.js +37 -0
  228. package/dist/common/crypto.js.map +1 -0
  229. package/dist/common/debug.d.ts +13 -0
  230. package/dist/common/debug.js +131 -0
  231. package/dist/common/debug.js.map +1 -0
  232. package/dist/common/deferred.d.ts +11 -0
  233. package/dist/common/deferred.js +62 -0
  234. package/dist/common/deferred.js.map +1 -0
  235. package/dist/common/diagnostic.d.ts +59 -0
  236. package/dist/common/diagnostic.js +134 -0
  237. package/dist/common/diagnostic.js.map +1 -0
  238. package/dist/common/diagnosticRules.d.ts +67 -0
  239. package/dist/common/diagnosticRules.js +83 -0
  240. package/dist/common/diagnosticRules.js.map +1 -0
  241. package/dist/common/diagnosticSink.d.ts +34 -0
  242. package/dist/common/diagnosticSink.js +110 -0
  243. package/dist/common/diagnosticSink.js.map +1 -0
  244. package/dist/common/editAction.d.ts +29 -0
  245. package/dist/common/editAction.js +11 -0
  246. package/dist/common/editAction.js.map +1 -0
  247. package/dist/common/extensibility.d.ts +11 -0
  248. package/dist/common/extensibility.js +10 -0
  249. package/dist/common/extensibility.js.map +1 -0
  250. package/dist/common/extensions.d.ts +3 -0
  251. package/dist/common/extensions.js +15 -0
  252. package/dist/common/extensions.js.map +1 -0
  253. package/dist/common/fileBasedCancellationUtils.d.ts +11 -0
  254. package/dist/common/fileBasedCancellationUtils.js +259 -0
  255. package/dist/common/fileBasedCancellationUtils.js.map +1 -0
  256. package/dist/common/fileSystem.d.ts +72 -0
  257. package/dist/common/fileSystem.js +69 -0
  258. package/dist/common/fileSystem.js.map +1 -0
  259. package/dist/common/fullAccessHost.d.ts +19 -0
  260. package/dist/common/fullAccessHost.js +193 -0
  261. package/dist/common/fullAccessHost.js.map +1 -0
  262. package/dist/common/host.d.ts +21 -0
  263. package/dist/common/host.js +30 -0
  264. package/dist/common/host.js.map +1 -0
  265. package/dist/common/logTracker.d.ts +15 -0
  266. package/dist/common/logTracker.js +129 -0
  267. package/dist/common/logTracker.js.map +1 -0
  268. package/dist/common/lspUtils.d.ts +3 -0
  269. package/dist/common/lspUtils.js +20 -0
  270. package/dist/common/lspUtils.js.map +1 -0
  271. package/dist/common/memUtils.d.ts +3 -0
  272. package/dist/common/memUtils.js +37 -0
  273. package/dist/common/memUtils.js.map +1 -0
  274. package/dist/common/pathConsts.d.ts +8 -0
  275. package/dist/common/pathConsts.js +19 -0
  276. package/dist/common/pathConsts.js.map +1 -0
  277. package/dist/common/pathUtils.d.ts +170 -0
  278. package/dist/common/pathUtils.js +762 -0
  279. package/dist/common/pathUtils.js.map +1 -0
  280. package/dist/common/positionUtils.d.ts +7 -0
  281. package/dist/common/positionUtils.js +71 -0
  282. package/dist/common/positionUtils.js.map +1 -0
  283. package/dist/common/progressReporter.d.ts +15 -0
  284. package/dist/common/progressReporter.js +44 -0
  285. package/dist/common/progressReporter.js.map +1 -0
  286. package/dist/common/pythonVersion.d.ts +20 -0
  287. package/dist/common/pythonVersion.js +71 -0
  288. package/dist/common/pythonVersion.js.map +1 -0
  289. package/dist/common/realFileSystem.d.ts +8 -0
  290. package/dist/common/realFileSystem.js +368 -0
  291. package/dist/common/realFileSystem.js.map +1 -0
  292. package/dist/common/stringUtils.d.ts +47 -0
  293. package/dist/common/stringUtils.js +160 -0
  294. package/dist/common/stringUtils.js.map +1 -0
  295. package/dist/common/textEditUtils.d.ts +3 -0
  296. package/dist/common/textEditUtils.js +29 -0
  297. package/dist/common/textEditUtils.js.map +1 -0
  298. package/dist/common/textRange.d.ts +47 -0
  299. package/dist/common/textRange.js +211 -0
  300. package/dist/common/textRange.js.map +1 -0
  301. package/dist/common/textRangeCollection.d.ts +13 -0
  302. package/dist/common/textRangeCollection.js +108 -0
  303. package/dist/common/textRangeCollection.js.map +1 -0
  304. package/dist/common/timing.d.ts +31 -0
  305. package/dist/common/timing.js +100 -0
  306. package/dist/common/timing.js.map +1 -0
  307. package/dist/common/uriParser.d.ts +12 -0
  308. package/dist/common/uriParser.js +25 -0
  309. package/dist/common/uriParser.js.map +1 -0
  310. package/dist/common/workspaceEditUtils.d.ts +7 -0
  311. package/dist/common/workspaceEditUtils.js +63 -0
  312. package/dist/common/workspaceEditUtils.js.map +1 -0
  313. package/dist/languageServerBase.d.ts +211 -0
  314. package/dist/languageServerBase.js +923 -0
  315. package/dist/languageServerBase.js.map +1 -0
  316. package/dist/languageService/analyzerServiceExecutor.d.ts +8 -0
  317. package/dist/languageService/analyzerServiceExecutor.js +97 -0
  318. package/dist/languageService/analyzerServiceExecutor.js.map +1 -0
  319. package/dist/languageService/autoImporter.d.ts +84 -0
  320. package/dist/languageService/autoImporter.js +635 -0
  321. package/dist/languageService/autoImporter.js.map +1 -0
  322. package/dist/languageService/callHierarchyProvider.d.ts +12 -0
  323. package/dist/languageService/callHierarchyProvider.js +368 -0
  324. package/dist/languageService/callHierarchyProvider.js.map +1 -0
  325. package/dist/languageService/codeActionProvider.d.ts +6 -0
  326. package/dist/languageService/codeActionProvider.js +53 -0
  327. package/dist/languageService/codeActionProvider.js.map +1 -0
  328. package/dist/languageService/completionProvider.d.ts +147 -0
  329. package/dist/languageService/completionProvider.js +2220 -0
  330. package/dist/languageService/completionProvider.js.map +1 -0
  331. package/dist/languageService/definitionProvider.d.ts +17 -0
  332. package/dist/languageService/definitionProvider.js +206 -0
  333. package/dist/languageService/definitionProvider.js.map +1 -0
  334. package/dist/languageService/documentHighlightProvider.d.ts +7 -0
  335. package/dist/languageService/documentHighlightProvider.js +63 -0
  336. package/dist/languageService/documentHighlightProvider.js.map +1 -0
  337. package/dist/languageService/documentSymbolCollector.d.ts +37 -0
  338. package/dist/languageService/documentSymbolCollector.js +344 -0
  339. package/dist/languageService/documentSymbolCollector.js.map +1 -0
  340. package/dist/languageService/documentSymbolProvider.d.ts +37 -0
  341. package/dist/languageService/documentSymbolProvider.js +308 -0
  342. package/dist/languageService/documentSymbolProvider.js.map +1 -0
  343. package/dist/languageService/hoverProvider.d.ts +25 -0
  344. package/dist/languageService/hoverProvider.js +366 -0
  345. package/dist/languageService/hoverProvider.js.map +1 -0
  346. package/dist/languageService/importAdder.d.ts +24 -0
  347. package/dist/languageService/importAdder.js +296 -0
  348. package/dist/languageService/importAdder.js.map +1 -0
  349. package/dist/languageService/importSorter.d.ts +15 -0
  350. package/dist/languageService/importSorter.js +152 -0
  351. package/dist/languageService/importSorter.js.map +1 -0
  352. package/dist/languageService/indentationUtils.d.ts +4 -0
  353. package/dist/languageService/indentationUtils.js +597 -0
  354. package/dist/languageService/indentationUtils.js.map +1 -0
  355. package/dist/languageService/quickActions.d.ts +4 -0
  356. package/dist/languageService/quickActions.js +97 -0
  357. package/dist/languageService/quickActions.js.map +1 -0
  358. package/dist/languageService/referencesProvider.d.ts +36 -0
  359. package/dist/languageService/referencesProvider.js +236 -0
  360. package/dist/languageService/referencesProvider.js.map +1 -0
  361. package/dist/languageService/renameModuleProvider.d.ts +58 -0
  362. package/dist/languageService/renameModuleProvider.js +884 -0
  363. package/dist/languageService/renameModuleProvider.js.map +1 -0
  364. package/dist/languageService/signatureHelpProvider.d.ts +26 -0
  365. package/dist/languageService/signatureHelpProvider.js +180 -0
  366. package/dist/languageService/signatureHelpProvider.js.map +1 -0
  367. package/dist/languageService/tooltipUtils.d.ts +9 -0
  368. package/dist/languageService/tooltipUtils.js +129 -0
  369. package/dist/languageService/tooltipUtils.js.map +1 -0
  370. package/dist/localization/localize.d.ts +1324 -0
  371. package/dist/localization/localize.js +788 -0
  372. package/dist/localization/localize.js.map +1 -0
  373. package/dist/localization/package.nls.de.json +1 -0
  374. package/dist/localization/package.nls.en-us.json +636 -0
  375. package/dist/localization/package.nls.es.json +1 -0
  376. package/dist/localization/package.nls.fr.json +1 -0
  377. package/dist/localization/package.nls.ja.json +1 -0
  378. package/dist/localization/package.nls.ru.json +1 -0
  379. package/dist/localization/package.nls.zh-cn.json +1 -0
  380. package/dist/localization/package.nls.zh-tw.json +1 -0
  381. package/dist/nodeMain.d.ts +1 -0
  382. package/dist/nodeMain.js +21 -0
  383. package/dist/nodeMain.js.map +1 -0
  384. package/dist/nodeServer.d.ts +3 -0
  385. package/dist/nodeServer.js +31 -0
  386. package/dist/nodeServer.js.map +1 -0
  387. package/dist/parser/characterStream.d.ts +27 -0
  388. package/dist/parser/characterStream.js +120 -0
  389. package/dist/parser/characterStream.js.map +1 -0
  390. package/dist/parser/characters.d.ts +17 -0
  391. package/dist/parser/characters.js +240 -0
  392. package/dist/parser/characters.js.map +1 -0
  393. package/dist/parser/parseNodes.d.ts +750 -0
  394. package/dist/parser/parseNodes.js +1406 -0
  395. package/dist/parser/parseNodes.js.map +1 -0
  396. package/dist/parser/parser.d.ts +191 -0
  397. package/dist/parser/parser.js +3806 -0
  398. package/dist/parser/parser.js.map +1 -0
  399. package/dist/parser/stringTokenUtils.d.ts +25 -0
  400. package/dist/parser/stringTokenUtils.js +455 -0
  401. package/dist/parser/stringTokenUtils.js.map +1 -0
  402. package/dist/parser/tokenizer.d.ts +71 -0
  403. package/dist/parser/tokenizer.js +1111 -0
  404. package/dist/parser/tokenizer.js.map +1 -0
  405. package/dist/parser/tokenizerTypes.d.ts +223 -0
  406. package/dist/parser/tokenizerTypes.js +164 -0
  407. package/dist/parser/tokenizerTypes.js.map +1 -0
  408. package/dist/parser/unicode.d.ts +23 -0
  409. package/dist/parser/unicode.js +2899 -0
  410. package/dist/parser/unicode.js.map +1 -0
  411. package/dist/pyright.d.ts +1 -0
  412. package/dist/pyright.js +645 -0
  413. package/dist/pyright.js.map +1 -0
  414. package/dist/pyrightFileSystem.d.ts +28 -0
  415. package/dist/pyrightFileSystem.js +196 -0
  416. package/dist/pyrightFileSystem.js.map +1 -0
  417. package/dist/readonlyAugmentedFileSystem.d.ts +40 -0
  418. package/dist/readonlyAugmentedFileSystem.js +155 -0
  419. package/dist/readonlyAugmentedFileSystem.js.map +1 -0
  420. package/dist/server.d.ts +21 -0
  421. package/dist/server.js +232 -0
  422. package/dist/server.js.map +1 -0
  423. package/dist/tests/chainedSourceFiles.test.d.ts +1 -0
  424. package/dist/tests/chainedSourceFiles.test.js +153 -0
  425. package/dist/tests/chainedSourceFiles.test.js.map +1 -0
  426. package/dist/tests/checker.test.d.ts +1 -0
  427. package/dist/tests/checker.test.js +346 -0
  428. package/dist/tests/checker.test.js.map +1 -0
  429. package/dist/tests/collectionUtils.test.d.ts +1 -0
  430. package/dist/tests/collectionUtils.test.js +153 -0
  431. package/dist/tests/collectionUtils.test.js.map +1 -0
  432. package/dist/tests/common.test.d.ts +1 -0
  433. package/dist/tests/common.test.js +125 -0
  434. package/dist/tests/common.test.js.map +1 -0
  435. package/dist/tests/config.test.d.ts +1 -0
  436. package/dist/tests/config.test.js +230 -0
  437. package/dist/tests/config.test.js.map +1 -0
  438. package/dist/tests/debug.test.d.ts +1 -0
  439. package/dist/tests/debug.test.js +102 -0
  440. package/dist/tests/debug.test.js.map +1 -0
  441. package/dist/tests/deferred.test.d.ts +1 -0
  442. package/dist/tests/deferred.test.js +65 -0
  443. package/dist/tests/deferred.test.js.map +1 -0
  444. package/dist/tests/diagnosticOverrides.test.d.ts +1 -0
  445. package/dist/tests/diagnosticOverrides.test.js +108 -0
  446. package/dist/tests/diagnosticOverrides.test.js.map +1 -0
  447. package/dist/tests/docStringConversion.test.d.ts +1 -0
  448. package/dist/tests/docStringConversion.test.js +695 -0
  449. package/dist/tests/docStringConversion.test.js.map +1 -0
  450. package/dist/tests/docStringUtils.test.d.ts +1 -0
  451. package/dist/tests/docStringUtils.test.js +70 -0
  452. package/dist/tests/docStringUtils.test.js.map +1 -0
  453. package/dist/tests/documentSymbolCollector.test.d.ts +1 -0
  454. package/dist/tests/documentSymbolCollector.test.js +635 -0
  455. package/dist/tests/documentSymbolCollector.test.js.map +1 -0
  456. package/dist/tests/filesystem.test.d.ts +1 -0
  457. package/dist/tests/filesystem.test.js +194 -0
  458. package/dist/tests/filesystem.test.js.map +1 -0
  459. package/dist/tests/fourSlashParser.test.d.ts +1 -0
  460. package/dist/tests/fourSlashParser.test.js +281 -0
  461. package/dist/tests/fourSlashParser.test.js.map +1 -0
  462. package/dist/tests/fourSlashRunner.test.d.ts +1 -0
  463. package/dist/tests/fourSlashRunner.test.js +52 -0
  464. package/dist/tests/fourSlashRunner.test.js.map +1 -0
  465. package/dist/tests/fourslash/completions.autoimport.Lib.Found.Type.fourslash.d.ts +1 -0
  466. package/dist/tests/fourslash/completions.autoimport.Lib.Found.Type.fourslash.js +30 -0
  467. package/dist/tests/fourslash/completions.autoimport.Lib.Found.Type.fourslash.js.map +1 -0
  468. package/dist/tests/fourslash/completions.autoimport.Lib.Found.duplication.fourslash.d.ts +1 -0
  469. package/dist/tests/fourslash/completions.autoimport.Lib.Found.duplication.fourslash.js +42 -0
  470. package/dist/tests/fourslash/completions.autoimport.Lib.Found.duplication.fourslash.js.map +1 -0
  471. package/dist/tests/fourslash/completions.autoimport.Lib.NotFound.fourslash.d.ts +1 -0
  472. package/dist/tests/fourslash/completions.autoimport.Lib.NotFound.fourslash.js +13 -0
  473. package/dist/tests/fourslash/completions.autoimport.Lib.NotFound.fourslash.js.map +1 -0
  474. package/dist/tests/fourslash/completions.autoimport.disabled.fourslash.d.ts +1 -0
  475. package/dist/tests/fourslash/completions.autoimport.disabled.fourslash.js +23 -0
  476. package/dist/tests/fourslash/completions.autoimport.disabled.fourslash.js.map +1 -0
  477. package/dist/tests/fourslash/completions.autoimport.duplicates.fourslash.d.ts +1 -0
  478. package/dist/tests/fourslash/completions.autoimport.duplicates.fourslash.js +35 -0
  479. package/dist/tests/fourslash/completions.autoimport.duplicates.fourslash.js.map +1 -0
  480. package/dist/tests/fourslash/completions.autoimport.fourslash.d.ts +1 -0
  481. package/dist/tests/fourslash/completions.autoimport.fourslash.js +27 -0
  482. package/dist/tests/fourslash/completions.autoimport.fourslash.js.map +1 -0
  483. package/dist/tests/fourslash/completions.autoimport.fromImport.fourslash.d.ts +1 -0
  484. package/dist/tests/fourslash/completions.autoimport.fromImport.fourslash.js +128 -0
  485. package/dist/tests/fourslash/completions.autoimport.fromImport.fourslash.js.map +1 -0
  486. package/dist/tests/fourslash/completions.autoimport.plainText.fourslash.d.ts +1 -0
  487. package/dist/tests/fourslash/completions.autoimport.plainText.fourslash.js +27 -0
  488. package/dist/tests/fourslash/completions.autoimport.plainText.fourslash.js.map +1 -0
  489. package/dist/tests/fourslash/completions.autoimport.shadow.fourslash.d.ts +1 -0
  490. package/dist/tests/fourslash/completions.autoimport.shadow.fourslash.js +43 -0
  491. package/dist/tests/fourslash/completions.autoimport.shadow.fourslash.js.map +1 -0
  492. package/dist/tests/fourslash/completions.autoimport.submodule.fourslash.d.ts +1 -0
  493. package/dist/tests/fourslash/completions.autoimport.submodule.fourslash.js +29 -0
  494. package/dist/tests/fourslash/completions.autoimport.submodule.fourslash.js.map +1 -0
  495. package/dist/tests/fourslash/completions.autoimport.topLevel.fourslash.d.ts +1 -0
  496. package/dist/tests/fourslash/completions.autoimport.topLevel.fourslash.js +50 -0
  497. package/dist/tests/fourslash/completions.autoimport.topLevel.fourslash.js.map +1 -0
  498. package/dist/tests/fourslash/completions.builtinDocstrings.fourslash.d.ts +1 -0
  499. package/dist/tests/fourslash/completions.builtinDocstrings.fourslash.js +116 -0
  500. package/dist/tests/fourslash/completions.builtinDocstrings.fourslash.js.map +1 -0
  501. package/dist/tests/fourslash/completions.builtinOverride.fourslash.d.ts +1 -0
  502. package/dist/tests/fourslash/completions.builtinOverride.fourslash.js +21 -0
  503. package/dist/tests/fourslash/completions.builtinOverride.fourslash.js.map +1 -0
  504. package/dist/tests/fourslash/completions.call.stringLiteral.fourslash.d.ts +1 -0
  505. package/dist/tests/fourslash/completions.call.stringLiteral.fourslash.js +54 -0
  506. package/dist/tests/fourslash/completions.call.stringLiteral.fourslash.js.map +1 -0
  507. package/dist/tests/fourslash/completions.call.typedDict.fourslash.d.ts +1 -0
  508. package/dist/tests/fourslash/completions.call.typedDict.fourslash.js +245 -0
  509. package/dist/tests/fourslash/completions.call.typedDict.fourslash.js.map +1 -0
  510. package/dist/tests/fourslash/completions.call.typedDict.list.fourslash.d.ts +1 -0
  511. package/dist/tests/fourslash/completions.call.typedDict.list.fourslash.js +162 -0
  512. package/dist/tests/fourslash/completions.call.typedDict.list.fourslash.js.map +1 -0
  513. package/dist/tests/fourslash/completions.call.typedDict.states.fourslash.d.ts +1 -0
  514. package/dist/tests/fourslash/completions.call.typedDict.states.fourslash.js +132 -0
  515. package/dist/tests/fourslash/completions.call.typedDict.states.fourslash.js.map +1 -0
  516. package/dist/tests/fourslash/completions.classVariable.fourslash.d.ts +1 -0
  517. package/dist/tests/fourslash/completions.classVariable.fourslash.js +37 -0
  518. package/dist/tests/fourslash/completions.classVariable.fourslash.js.map +1 -0
  519. package/dist/tests/fourslash/completions.comment.fourslash.d.ts +1 -0
  520. package/dist/tests/fourslash/completions.comment.fourslash.js +27 -0
  521. package/dist/tests/fourslash/completions.comment.fourslash.js.map +1 -0
  522. package/dist/tests/fourslash/completions.declNames.class.fourslash.d.ts +1 -0
  523. package/dist/tests/fourslash/completions.declNames.class.fourslash.js +30 -0
  524. package/dist/tests/fourslash/completions.declNames.class.fourslash.js.map +1 -0
  525. package/dist/tests/fourslash/completions.declNames.exception.fourslash.d.ts +1 -0
  526. package/dist/tests/fourslash/completions.declNames.exception.fourslash.js +18 -0
  527. package/dist/tests/fourslash/completions.declNames.exception.fourslash.js.map +1 -0
  528. package/dist/tests/fourslash/completions.declNames.for.fourslash.d.ts +1 -0
  529. package/dist/tests/fourslash/completions.declNames.for.fourslash.js +26 -0
  530. package/dist/tests/fourslash/completions.declNames.for.fourslash.js.map +1 -0
  531. package/dist/tests/fourslash/completions.declNames.importAlias.fourslash.d.ts +1 -0
  532. package/dist/tests/fourslash/completions.declNames.importAlias.fourslash.js +15 -0
  533. package/dist/tests/fourslash/completions.declNames.importAlias.fourslash.js.map +1 -0
  534. package/dist/tests/fourslash/completions.declNames.lambda.fourslash.d.ts +1 -0
  535. package/dist/tests/fourslash/completions.declNames.lambda.fourslash.js +36 -0
  536. package/dist/tests/fourslash/completions.declNames.lambda.fourslash.js.map +1 -0
  537. package/dist/tests/fourslash/completions.declNames.method.fourslash.d.ts +1 -0
  538. package/dist/tests/fourslash/completions.declNames.method.fourslash.js +68 -0
  539. package/dist/tests/fourslash/completions.declNames.method.fourslash.js.map +1 -0
  540. package/dist/tests/fourslash/completions.declNames.overload.fourslash.d.ts +1 -0
  541. package/dist/tests/fourslash/completions.declNames.overload.fourslash.js +147 -0
  542. package/dist/tests/fourslash/completions.declNames.overload.fourslash.js.map +1 -0
  543. package/dist/tests/fourslash/completions.declNames.topLevelOverload.fourslash.d.ts +1 -0
  544. package/dist/tests/fourslash/completions.declNames.topLevelOverload.fourslash.js +131 -0
  545. package/dist/tests/fourslash/completions.declNames.topLevelOverload.fourslash.js.map +1 -0
  546. package/dist/tests/fourslash/completions.dictionary.keys.complex.fourslash.d.ts +1 -0
  547. package/dist/tests/fourslash/completions.dictionary.keys.complex.fourslash.js +73 -0
  548. package/dist/tests/fourslash/completions.dictionary.keys.complex.fourslash.js.map +1 -0
  549. package/dist/tests/fourslash/completions.dictionary.keys.expression.fourslash.d.ts +1 -0
  550. package/dist/tests/fourslash/completions.dictionary.keys.expression.fourslash.js +58 -0
  551. package/dist/tests/fourslash/completions.dictionary.keys.expression.fourslash.js.map +1 -0
  552. package/dist/tests/fourslash/completions.dictionary.keys.literalTypes.fourslash.d.ts +1 -0
  553. package/dist/tests/fourslash/completions.dictionary.keys.literalTypes.fourslash.js +154 -0
  554. package/dist/tests/fourslash/completions.dictionary.keys.literalTypes.fourslash.js.map +1 -0
  555. package/dist/tests/fourslash/completions.dictionary.keys.simple.fourslash.d.ts +1 -0
  556. package/dist/tests/fourslash/completions.dictionary.keys.simple.fourslash.js +143 -0
  557. package/dist/tests/fourslash/completions.dictionary.keys.simple.fourslash.js.map +1 -0
  558. package/dist/tests/fourslash/completions.dictionary.keys.stringLiterals.fourslash.d.ts +1 -0
  559. package/dist/tests/fourslash/completions.dictionary.keys.stringLiterals.fourslash.js +109 -0
  560. package/dist/tests/fourslash/completions.dictionary.keys.stringLiterals.fourslash.js.map +1 -0
  561. package/dist/tests/fourslash/completions.dictionary.keys.symbols.fourslash.d.ts +1 -0
  562. package/dist/tests/fourslash/completions.dictionary.keys.symbols.fourslash.js +50 -0
  563. package/dist/tests/fourslash/completions.dictionary.keys.symbols.fourslash.js.map +1 -0
  564. package/dist/tests/fourslash/completions.enums.members.fourslash.d.ts +1 -0
  565. package/dist/tests/fourslash/completions.enums.members.fourslash.js +44 -0
  566. package/dist/tests/fourslash/completions.enums.members.fourslash.js.map +1 -0
  567. package/dist/tests/fourslash/completions.excluded.fourslash.d.ts +1 -0
  568. package/dist/tests/fourslash/completions.excluded.fourslash.js +12 -0
  569. package/dist/tests/fourslash/completions.excluded.fourslash.js.map +1 -0
  570. package/dist/tests/fourslash/completions.fourslash.d.ts +1 -0
  571. package/dist/tests/fourslash/completions.fourslash.js +51 -0
  572. package/dist/tests/fourslash/completions.fourslash.js.map +1 -0
  573. package/dist/tests/fourslash/completions.fstring.fourslash.d.ts +1 -0
  574. package/dist/tests/fourslash/completions.fstring.fourslash.js +32 -0
  575. package/dist/tests/fourslash/completions.fstring.fourslash.js.map +1 -0
  576. package/dist/tests/fourslash/completions.fstring.stringLiteral.fourslash.d.ts +1 -0
  577. package/dist/tests/fourslash/completions.fstring.stringLiteral.fourslash.js +96 -0
  578. package/dist/tests/fourslash/completions.fstring.stringLiteral.fourslash.js.map +1 -0
  579. package/dist/tests/fourslash/completions.fuzzyMatching.fourslash.d.ts +1 -0
  580. package/dist/tests/fourslash/completions.fuzzyMatching.fourslash.js +30 -0
  581. package/dist/tests/fourslash/completions.fuzzyMatching.fourslash.js.map +1 -0
  582. package/dist/tests/fourslash/completions.importDunderNames.fourslash.d.ts +1 -0
  583. package/dist/tests/fourslash/completions.importDunderNames.fourslash.js +29 -0
  584. package/dist/tests/fourslash/completions.importDunderNames.fourslash.js.map +1 -0
  585. package/dist/tests/fourslash/completions.importSubmodule.fourslash.d.ts +1 -0
  586. package/dist/tests/fourslash/completions.importSubmodule.fourslash.js +22 -0
  587. package/dist/tests/fourslash/completions.importSubmodule.fourslash.js.map +1 -0
  588. package/dist/tests/fourslash/completions.importsDuplicates.fourslash.d.ts +0 -0
  589. package/dist/tests/fourslash/completions.importsDuplicates.fourslash.js +22 -0
  590. package/dist/tests/fourslash/completions.importsDuplicates.fourslash.js.map +1 -0
  591. package/dist/tests/fourslash/completions.inList.fourslash.d.ts +1 -0
  592. package/dist/tests/fourslash/completions.inList.fourslash.js +32 -0
  593. package/dist/tests/fourslash/completions.inList.fourslash.js.map +1 -0
  594. package/dist/tests/fourslash/completions.included.fourslash.d.ts +1 -0
  595. package/dist/tests/fourslash/completions.included.fourslash.js +12 -0
  596. package/dist/tests/fourslash/completions.included.fourslash.js.map +1 -0
  597. package/dist/tests/fourslash/completions.indexer.keys.getitem.fourslash.d.ts +1 -0
  598. package/dist/tests/fourslash/completions.indexer.keys.getitem.fourslash.js +54 -0
  599. package/dist/tests/fourslash/completions.indexer.keys.getitem.fourslash.js.map +1 -0
  600. package/dist/tests/fourslash/completions.inherited.function.docFromStub.fourslash.d.ts +1 -0
  601. package/dist/tests/fourslash/completions.inherited.function.docFromStub.fourslash.js +26 -0
  602. package/dist/tests/fourslash/completions.inherited.function.docFromStub.fourslash.js.map +1 -0
  603. package/dist/tests/fourslash/completions.inherited.overload.docFromScrWithStub.fourslash.d.ts +1 -0
  604. package/dist/tests/fourslash/completions.inherited.overload.docFromScrWithStub.fourslash.js +49 -0
  605. package/dist/tests/fourslash/completions.inherited.overload.docFromScrWithStub.fourslash.js.map +1 -0
  606. package/dist/tests/fourslash/completions.inherited.overload.docFromStub.fourslash.d.ts +1 -0
  607. package/dist/tests/fourslash/completions.inherited.overload.docFromStub.fourslash.js +50 -0
  608. package/dist/tests/fourslash/completions.inherited.overload.docFromStub.fourslash.js.map +1 -0
  609. package/dist/tests/fourslash/completions.inherited.property.docFromSrc.fourslash.d.ts +1 -0
  610. package/dist/tests/fourslash/completions.inherited.property.docFromSrc.fourslash.js +101 -0
  611. package/dist/tests/fourslash/completions.inherited.property.docFromSrc.fourslash.js.map +1 -0
  612. package/dist/tests/fourslash/completions.inherited.property.docFromStub.fourslash.d.ts +1 -0
  613. package/dist/tests/fourslash/completions.inherited.property.docFromStub.fourslash.js +105 -0
  614. package/dist/tests/fourslash/completions.inherited.property.docFromStub.fourslash.js.map +1 -0
  615. package/dist/tests/fourslash/completions.keywords.pythonVersion.fourslash.d.ts +1 -0
  616. package/dist/tests/fourslash/completions.keywords.pythonVersion.fourslash.js +67 -0
  617. package/dist/tests/fourslash/completions.keywords.pythonVersion.fourslash.js.map +1 -0
  618. package/dist/tests/fourslash/completions.libCodeAndStub.fourslash.d.ts +1 -0
  619. package/dist/tests/fourslash/completions.libCodeAndStub.fourslash.js +75 -0
  620. package/dist/tests/fourslash/completions.libCodeAndStub.fourslash.js.map +1 -0
  621. package/dist/tests/fourslash/completions.libCodeNoStub.fourslash.d.ts +1 -0
  622. package/dist/tests/fourslash/completions.libCodeNoStub.fourslash.js +66 -0
  623. package/dist/tests/fourslash/completions.libCodeNoStub.fourslash.js.map +1 -0
  624. package/dist/tests/fourslash/completions.libStub.fourslash.d.ts +1 -0
  625. package/dist/tests/fourslash/completions.libStub.fourslash.js +66 -0
  626. package/dist/tests/fourslash/completions.libStub.fourslash.js.map +1 -0
  627. package/dist/tests/fourslash/completions.literals.fourslash.d.ts +1 -0
  628. package/dist/tests/fourslash/completions.literals.fourslash.js +31 -0
  629. package/dist/tests/fourslash/completions.literals.fourslash.js.map +1 -0
  630. package/dist/tests/fourslash/completions.localCode.fourslash.d.ts +1 -0
  631. package/dist/tests/fourslash/completions.localCode.fourslash.js +71 -0
  632. package/dist/tests/fourslash/completions.localCode.fourslash.js.map +1 -0
  633. package/dist/tests/fourslash/completions.moduleContext.UnknownMemberOnInstance.fourslash.d.ts +1 -0
  634. package/dist/tests/fourslash/completions.moduleContext.UnknownMemberOnInstance.fourslash.js +17 -0
  635. package/dist/tests/fourslash/completions.moduleContext.UnknownMemberOnInstance.fourslash.js.map +1 -0
  636. package/dist/tests/fourslash/completions.moduleContext.UnknownStaticFunctionOnClass.fourslash.d.ts +1 -0
  637. package/dist/tests/fourslash/completions.moduleContext.UnknownStaticFunctionOnClass.fourslash.js +57 -0
  638. package/dist/tests/fourslash/completions.moduleContext.UnknownStaticFunctionOnClass.fourslash.js.map +1 -0
  639. package/dist/tests/fourslash/completions.moduleContext.libCodeNoStub.fourslash.d.ts +1 -0
  640. package/dist/tests/fourslash/completions.moduleContext.libCodeNoStub.fourslash.js +27 -0
  641. package/dist/tests/fourslash/completions.moduleContext.libCodeNoStub.fourslash.js.map +1 -0
  642. package/dist/tests/fourslash/completions.overloads.fourslash.d.ts +1 -0
  643. package/dist/tests/fourslash/completions.overloads.fourslash.js +37 -0
  644. package/dist/tests/fourslash/completions.overloads.fourslash.js.map +1 -0
  645. package/dist/tests/fourslash/completions.override.default.fourslash.d.ts +1 -0
  646. package/dist/tests/fourslash/completions.override.default.fourslash.js +47 -0
  647. package/dist/tests/fourslash/completions.override.default.fourslash.js.map +1 -0
  648. package/dist/tests/fourslash/completions.override.default.importStub.d.ts +1 -0
  649. package/dist/tests/fourslash/completions.override.default.importStub.js +49 -0
  650. package/dist/tests/fourslash/completions.override.default.importStub.js.map +1 -0
  651. package/dist/tests/fourslash/completions.override.default.imported.fourslash.d.ts +1 -0
  652. package/dist/tests/fourslash/completions.override.default.imported.fourslash.js +60 -0
  653. package/dist/tests/fourslash/completions.override.default.imported.fourslash.js.map +1 -0
  654. package/dist/tests/fourslash/completions.override.default.stub.fourslash.d.ts +1 -0
  655. package/dist/tests/fourslash/completions.override.default.stub.fourslash.js +47 -0
  656. package/dist/tests/fourslash/completions.override.default.stub.fourslash.js.map +1 -0
  657. package/dist/tests/fourslash/completions.override.fourslash.d.ts +1 -0
  658. package/dist/tests/fourslash/completions.override.fourslash.js +47 -0
  659. package/dist/tests/fourslash/completions.override.fourslash.js.map +1 -0
  660. package/dist/tests/fourslash/completions.override.property.fourslash.d.ts +1 -0
  661. package/dist/tests/fourslash/completions.override.property.fourslash.js +31 -0
  662. package/dist/tests/fourslash/completions.override.property.fourslash.js.map +1 -0
  663. package/dist/tests/fourslash/completions.override.property.stub.fourslash.d.ts +1 -0
  664. package/dist/tests/fourslash/completions.override.property.stub.fourslash.js +31 -0
  665. package/dist/tests/fourslash/completions.override.property.stub.fourslash.js.map +1 -0
  666. package/dist/tests/fourslash/completions.override.staticAndClassmethod.fourslash.d.ts +1 -0
  667. package/dist/tests/fourslash/completions.override.staticAndClassmethod.fourslash.js +63 -0
  668. package/dist/tests/fourslash/completions.override.staticAndClassmethod.fourslash.js.map +1 -0
  669. package/dist/tests/fourslash/completions.override.stub.fourslash.d.ts +1 -0
  670. package/dist/tests/fourslash/completions.override.stub.fourslash.js +47 -0
  671. package/dist/tests/fourslash/completions.override.stub.fourslash.js.map +1 -0
  672. package/dist/tests/fourslash/completions.override2.fourslash.d.ts +1 -0
  673. package/dist/tests/fourslash/completions.override2.fourslash.js +66 -0
  674. package/dist/tests/fourslash/completions.override2.fourslash.js.map +1 -0
  675. package/dist/tests/fourslash/completions.parameters.fourslash.d.ts +1 -0
  676. package/dist/tests/fourslash/completions.parameters.fourslash.js +22 -0
  677. package/dist/tests/fourslash/completions.parameters.fourslash.js.map +1 -0
  678. package/dist/tests/fourslash/completions.params.fourslash.d.ts +1 -0
  679. package/dist/tests/fourslash/completions.params.fourslash.js +23 -0
  680. package/dist/tests/fourslash/completions.params.fourslash.js.map +1 -0
  681. package/dist/tests/fourslash/completions.parentFolder.fourslash.d.ts +1 -0
  682. package/dist/tests/fourslash/completions.parentFolder.fourslash.js +15 -0
  683. package/dist/tests/fourslash/completions.parentFolder.fourslash.js.map +1 -0
  684. package/dist/tests/fourslash/completions.parentFolders.fourslash.d.ts +1 -0
  685. package/dist/tests/fourslash/completions.parentFolders.fourslash.js +68 -0
  686. package/dist/tests/fourslash/completions.parentFolders.fourslash.js.map +1 -0
  687. package/dist/tests/fourslash/completions.plainText.fourslash.d.ts +1 -0
  688. package/dist/tests/fourslash/completions.plainText.fourslash.js +34 -0
  689. package/dist/tests/fourslash/completions.plainText.fourslash.js.map +1 -0
  690. package/dist/tests/fourslash/completions.private.fourslash.d.ts +1 -0
  691. package/dist/tests/fourslash/completions.private.fourslash.js +61 -0
  692. package/dist/tests/fourslash/completions.private.fourslash.js.map +1 -0
  693. package/dist/tests/fourslash/completions.property.fourslash.d.ts +1 -0
  694. package/dist/tests/fourslash/completions.property.fourslash.js +28 -0
  695. package/dist/tests/fourslash/completions.property.fourslash.js.map +1 -0
  696. package/dist/tests/fourslash/completions.propertyDocStrings.fourslash.d.ts +1 -0
  697. package/dist/tests/fourslash/completions.propertyDocStrings.fourslash.js +64 -0
  698. package/dist/tests/fourslash/completions.propertyDocStrings.fourslash.js.map +1 -0
  699. package/dist/tests/fourslash/completions.self.fourslash.d.ts +1 -0
  700. package/dist/tests/fourslash/completions.self.fourslash.js +43 -0
  701. package/dist/tests/fourslash/completions.self.fourslash.js.map +1 -0
  702. package/dist/tests/fourslash/completions.stringLiteral.escape.fourslash.d.ts +1 -0
  703. package/dist/tests/fourslash/completions.stringLiteral.escape.fourslash.js +71 -0
  704. package/dist/tests/fourslash/completions.stringLiteral.escape.fourslash.js.map +1 -0
  705. package/dist/tests/fourslash/completions.stringLiteral.fourslash.d.ts +1 -0
  706. package/dist/tests/fourslash/completions.stringLiteral.fourslash.js +78 -0
  707. package/dist/tests/fourslash/completions.stringLiteral.fourslash.js.map +1 -0
  708. package/dist/tests/fourslash/completions.typeAlias.fourslash.d.ts +1 -0
  709. package/dist/tests/fourslash/completions.typeAlias.fourslash.js +29 -0
  710. package/dist/tests/fourslash/completions.typeAlias.fourslash.js.map +1 -0
  711. package/dist/tests/fourslash/completions.typeshed.fourslash.d.ts +1 -0
  712. package/dist/tests/fourslash/completions.typeshed.fourslash.js +9 -0
  713. package/dist/tests/fourslash/completions.typeshed.fourslash.js.map +1 -0
  714. package/dist/tests/fourslash/completions.vardecls.fourslash.d.ts +1 -0
  715. package/dist/tests/fourslash/completions.vardecls.fourslash.js +33 -0
  716. package/dist/tests/fourslash/completions.vardecls.fourslash.js.map +1 -0
  717. package/dist/tests/fourslash/completions.variableDocStrings.fourslash.d.ts +1 -0
  718. package/dist/tests/fourslash/completions.variableDocStrings.fourslash.js +68 -0
  719. package/dist/tests/fourslash/completions.variableDocStrings.fourslash.js.map +1 -0
  720. package/dist/tests/fourslash/completions.wildcardimports.fourslash.d.ts +1 -0
  721. package/dist/tests/fourslash/completions.wildcardimports.fourslash.js +109 -0
  722. package/dist/tests/fourslash/completions.wildcardimports.fourslash.js.map +1 -0
  723. package/dist/tests/fourslash/completions.with.fourslash.d.ts +1 -0
  724. package/dist/tests/fourslash/completions.with.fourslash.js +25 -0
  725. package/dist/tests/fourslash/completions.with.fourslash.js.map +1 -0
  726. package/dist/tests/fourslash/diagnostics.missingModuleSource.fourslash.d.ts +1 -0
  727. package/dist/tests/fourslash/diagnostics.missingModuleSource.fourslash.js +64 -0
  728. package/dist/tests/fourslash/diagnostics.missingModuleSource.fourslash.js.map +1 -0
  729. package/dist/tests/fourslash/findDefinitions.builtinClass.fourslash.d.ts +1 -0
  730. package/dist/tests/fourslash/findDefinitions.builtinClass.fourslash.js +24 -0
  731. package/dist/tests/fourslash/findDefinitions.builtinClass.fourslash.js.map +1 -0
  732. package/dist/tests/fourslash/findDefinitions.classes.fourslash.d.ts +1 -0
  733. package/dist/tests/fourslash/findDefinitions.classes.fourslash.js +93 -0
  734. package/dist/tests/fourslash/findDefinitions.classes.fourslash.js.map +1 -0
  735. package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.fourslash.d.ts +1 -0
  736. package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.fourslash.js +23 -0
  737. package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.fourslash.js.map +1 -0
  738. package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.onlyStubs.d.ts +1 -0
  739. package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.onlyStubs.js +19 -0
  740. package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.onlyStubs.js.map +1 -0
  741. package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.fourslash.d.ts +1 -0
  742. package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.fourslash.js +23 -0
  743. package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.fourslash.js.map +1 -0
  744. package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.onlySource.fourslash.d.ts +1 -0
  745. package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.onlySource.fourslash.js +20 -0
  746. package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.onlySource.fourslash.js.map +1 -0
  747. package/dist/tests/fourslash/findDefinitions.fields.fourslash.d.ts +1 -0
  748. package/dist/tests/fourslash/findDefinitions.fields.fourslash.js +123 -0
  749. package/dist/tests/fourslash/findDefinitions.fields.fourslash.js.map +1 -0
  750. package/dist/tests/fourslash/findDefinitions.functions.fourslash.d.ts +1 -0
  751. package/dist/tests/fourslash/findDefinitions.functions.fourslash.js +79 -0
  752. package/dist/tests/fourslash/findDefinitions.functions.fourslash.js.map +1 -0
  753. package/dist/tests/fourslash/findDefinitions.methods.fourslash.d.ts +1 -0
  754. package/dist/tests/fourslash/findDefinitions.methods.fourslash.js +154 -0
  755. package/dist/tests/fourslash/findDefinitions.methods.fourslash.js.map +1 -0
  756. package/dist/tests/fourslash/findDefinitions.modules.fourslash.d.ts +1 -0
  757. package/dist/tests/fourslash/findDefinitions.modules.fourslash.js +42 -0
  758. package/dist/tests/fourslash/findDefinitions.modules.fourslash.js.map +1 -0
  759. package/dist/tests/fourslash/findDefinitions.namespaceImport.fourslash.d.ts +1 -0
  760. package/dist/tests/fourslash/findDefinitions.namespaceImport.fourslash.js +34 -0
  761. package/dist/tests/fourslash/findDefinitions.namespaceImport.fourslash.js.map +1 -0
  762. package/dist/tests/fourslash/findDefinitions.overloads.fourslash.d.ts +1 -0
  763. package/dist/tests/fourslash/findDefinitions.overloads.fourslash.js +213 -0
  764. package/dist/tests/fourslash/findDefinitions.overloads.fourslash.js.map +1 -0
  765. package/dist/tests/fourslash/findDefinitions.parameters.fourslash.d.ts +1 -0
  766. package/dist/tests/fourslash/findDefinitions.parameters.fourslash.js +154 -0
  767. package/dist/tests/fourslash/findDefinitions.parameters.fourslash.js.map +1 -0
  768. package/dist/tests/fourslash/findDefinitions.sourceAndStub.function.fourslash.d.ts +1 -0
  769. package/dist/tests/fourslash/findDefinitions.sourceAndStub.function.fourslash.js +23 -0
  770. package/dist/tests/fourslash/findDefinitions.sourceAndStub.function.fourslash.js.map +1 -0
  771. package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClass.fourslash.d.ts +1 -0
  772. package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClass.fourslash.js +29 -0
  773. package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClass.fourslash.js.map +1 -0
  774. package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClassMethod.fourslash.d.ts +1 -0
  775. package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClassMethod.fourslash.js +30 -0
  776. package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClassMethod.fourslash.js.map +1 -0
  777. package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClass.fourslash.d.ts +1 -0
  778. package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClass.fourslash.js +25 -0
  779. package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClass.fourslash.js.map +1 -0
  780. package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassMethod.fourslash.d.ts +1 -0
  781. package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassMethod.fourslash.js +26 -0
  782. package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassMethod.fourslash.js.map +1 -0
  783. package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadOnly.fourslash.d.ts +1 -0
  784. package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadOnly.fourslash.js +28 -0
  785. package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadOnly.fourslash.js.map +1 -0
  786. package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadWrite.fourslash.d.ts +1 -0
  787. package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadWrite.fourslash.js +33 -0
  788. package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadWrite.fourslash.js.map +1 -0
  789. package/dist/tests/fourslash/findDefinitions.sourceOnly.class.fourslash.d.ts +1 -0
  790. package/dist/tests/fourslash/findDefinitions.sourceOnly.class.fourslash.js +26 -0
  791. package/dist/tests/fourslash/findDefinitions.sourceOnly.class.fourslash.js.map +1 -0
  792. package/dist/tests/fourslash/findDefinitions.sourceOnly.function1.fourslash.d.ts +1 -0
  793. package/dist/tests/fourslash/findDefinitions.sourceOnly.function1.fourslash.js +25 -0
  794. package/dist/tests/fourslash/findDefinitions.sourceOnly.function1.fourslash.js.map +1 -0
  795. package/dist/tests/fourslash/findDefinitions.sourceOnly.function2.fourslash.d.ts +1 -0
  796. package/dist/tests/fourslash/findDefinitions.sourceOnly.function2.fourslash.js +25 -0
  797. package/dist/tests/fourslash/findDefinitions.sourceOnly.function2.fourslash.js.map +1 -0
  798. package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport1.fourslash.d.ts +1 -0
  799. package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport1.fourslash.js +20 -0
  800. package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport1.fourslash.js.map +1 -0
  801. package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport2.fourslash.d.ts +1 -0
  802. package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport2.fourslash.js +20 -0
  803. package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport2.fourslash.js.map +1 -0
  804. package/dist/tests/fourslash/findDefinitions.stubOnly.fourslash.d.ts +1 -0
  805. package/dist/tests/fourslash/findDefinitions.stubOnly.fourslash.js +59 -0
  806. package/dist/tests/fourslash/findDefinitions.stubOnly.fourslash.js.map +1 -0
  807. package/dist/tests/fourslash/findDefinitions.stubPackages.fourslash.d.ts +1 -0
  808. package/dist/tests/fourslash/findDefinitions.stubPackages.fourslash.js +59 -0
  809. package/dist/tests/fourslash/findDefinitions.stubPackages.fourslash.js.map +1 -0
  810. package/dist/tests/fourslash/findDefinitions.typedDict.keys.fourslash.d.ts +1 -0
  811. package/dist/tests/fourslash/findDefinitions.typedDict.keys.fourslash.js +94 -0
  812. package/dist/tests/fourslash/findDefinitions.typedDict.keys.fourslash.js.map +1 -0
  813. package/dist/tests/fourslash/findDefinitions.variables.fourslash.d.ts +1 -0
  814. package/dist/tests/fourslash/findDefinitions.variables.fourslash.js +79 -0
  815. package/dist/tests/fourslash/findDefinitions.variables.fourslash.js.map +1 -0
  816. package/dist/tests/fourslash/findDefinitions.wildcardimports.fourslash.d.ts +1 -0
  817. package/dist/tests/fourslash/findDefinitions.wildcardimports.fourslash.js +106 -0
  818. package/dist/tests/fourslash/findDefinitions.wildcardimports.fourslash.js.map +1 -0
  819. package/dist/tests/fourslash/findTypeDefinitions.builtinClass.fourslash.d.ts +1 -0
  820. package/dist/tests/fourslash/findTypeDefinitions.builtinClass.fourslash.js +24 -0
  821. package/dist/tests/fourslash/findTypeDefinitions.builtinClass.fourslash.js.map +1 -0
  822. package/dist/tests/fourslash/findTypeDefinitions.classes.fourslash.d.ts +1 -0
  823. package/dist/tests/fourslash/findTypeDefinitions.classes.fourslash.js +66 -0
  824. package/dist/tests/fourslash/findTypeDefinitions.classes.fourslash.js.map +1 -0
  825. package/dist/tests/fourslash/findTypeDefinitions.unions.fourslash.d.ts +1 -0
  826. package/dist/tests/fourslash/findTypeDefinitions.unions.fourslash.js +26 -0
  827. package/dist/tests/fourslash/findTypeDefinitions.unions.fourslash.js.map +1 -0
  828. package/dist/tests/fourslash/findallreferences.classPropertyReadWrite.d.ts +1 -0
  829. package/dist/tests/fourslash/findallreferences.classPropertyReadWrite.js +36 -0
  830. package/dist/tests/fourslash/findallreferences.classPropertyReadWrite.js.map +1 -0
  831. package/dist/tests/fourslash/findallreferences.fourslash.d.ts +1 -0
  832. package/dist/tests/fourslash/findallreferences.fourslash.js +30 -0
  833. package/dist/tests/fourslash/findallreferences.fourslash.js.map +1 -0
  834. package/dist/tests/fourslash/findallreferences.importalias.fourslash.d.ts +1 -0
  835. package/dist/tests/fourslash/findallreferences.importalias.fourslash.js +30 -0
  836. package/dist/tests/fourslash/findallreferences.importalias.fourslash.js.map +1 -0
  837. package/dist/tests/fourslash/findallreferences.invokedFromLibrary.fourslash.d.ts +1 -0
  838. package/dist/tests/fourslash/findallreferences.invokedFromLibrary.fourslash.js +46 -0
  839. package/dist/tests/fourslash/findallreferences.invokedFromLibrary.fourslash.js.map +1 -0
  840. package/dist/tests/fourslash/findallreferences.module.nested.fourslash.d.ts +1 -0
  841. package/dist/tests/fourslash/findallreferences.module.nested.fourslash.js +60 -0
  842. package/dist/tests/fourslash/findallreferences.module.nested.fourslash.js.map +1 -0
  843. package/dist/tests/fourslash/findallreferences.modules.duplicated.fourslash.d.ts +1 -0
  844. package/dist/tests/fourslash/findallreferences.modules.duplicated.fourslash.js +54 -0
  845. package/dist/tests/fourslash/findallreferences.modules.duplicated.fourslash.js.map +1 -0
  846. package/dist/tests/fourslash/findallreferences.modules.fourslash.d.ts +1 -0
  847. package/dist/tests/fourslash/findallreferences.modules.fourslash.js +41 -0
  848. package/dist/tests/fourslash/findallreferences.modules.fourslash.js.map +1 -0
  849. package/dist/tests/fourslash/findallreferences.modules.shadow.fourslash.d.ts +1 -0
  850. package/dist/tests/fourslash/findallreferences.modules.shadow.fourslash.js +83 -0
  851. package/dist/tests/fourslash/findallreferences.modules.shadow.fourslash.js.map +1 -0
  852. package/dist/tests/fourslash/findallreferences.openFiles.fourslash.d.ts +1 -0
  853. package/dist/tests/fourslash/findallreferences.openFiles.fourslash.js +32 -0
  854. package/dist/tests/fourslash/findallreferences.openFiles.fourslash.js.map +1 -0
  855. package/dist/tests/fourslash/findallreferences.parameter.fourslash.d.ts +1 -0
  856. package/dist/tests/fourslash/findallreferences.parameter.fourslash.js +22 -0
  857. package/dist/tests/fourslash/findallreferences.parameter.fourslash.js.map +1 -0
  858. package/dist/tests/fourslash/findallreferences.sourceAndStub.class.fourslash.d.ts +1 -0
  859. package/dist/tests/fourslash/findallreferences.sourceAndStub.class.fourslash.js +29 -0
  860. package/dist/tests/fourslash/findallreferences.sourceAndStub.class.fourslash.js.map +1 -0
  861. package/dist/tests/fourslash/findallreferences.sourceAndStub.classMethod.fourslash.d.ts +1 -0
  862. package/dist/tests/fourslash/findallreferences.sourceAndStub.classMethod.fourslash.js +33 -0
  863. package/dist/tests/fourslash/findallreferences.sourceAndStub.classMethod.fourslash.js.map +1 -0
  864. package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadOnly.fourslash.d.ts +1 -0
  865. package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadOnly.fourslash.js +36 -0
  866. package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadOnly.fourslash.js.map +1 -0
  867. package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadWrite.fourslash.skip.d.ts +1 -0
  868. package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadWrite.fourslash.skip.js +44 -0
  869. package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadWrite.fourslash.skip.js.map +1 -0
  870. package/dist/tests/fourslash/findallreferences.sourceAndStub.function.fourslash.d.ts +1 -0
  871. package/dist/tests/fourslash/findallreferences.sourceAndStub.function.fourslash.js +31 -0
  872. package/dist/tests/fourslash/findallreferences.sourceAndStub.function.fourslash.js.map +1 -0
  873. package/dist/tests/fourslash/findallreferences.variable.fourslash.d.ts +1 -0
  874. package/dist/tests/fourslash/findallreferences.variable.fourslash.js +22 -0
  875. package/dist/tests/fourslash/findallreferences.variable.fourslash.js.map +1 -0
  876. package/dist/tests/fourslash/fourslash.d.ts +301 -0
  877. package/dist/tests/fourslash/fourslash.js +25 -0
  878. package/dist/tests/fourslash/fourslash.js.map +1 -0
  879. package/dist/tests/fourslash/highlightreferences.attributes.fourslash.d.ts +1 -0
  880. package/dist/tests/fourslash/highlightreferences.attributes.fourslash.js +30 -0
  881. package/dist/tests/fourslash/highlightreferences.attributes.fourslash.js.map +1 -0
  882. package/dist/tests/fourslash/hover.builtinDocstrings.fourslash.d.ts +1 -0
  883. package/dist/tests/fourslash/hover.builtinDocstrings.fourslash.js +63 -0
  884. package/dist/tests/fourslash/hover.builtinDocstrings.fourslash.js.map +1 -0
  885. package/dist/tests/fourslash/hover.classNoInit.fourslash.d.ts +1 -0
  886. package/dist/tests/fourslash/hover.classNoInit.fourslash.js +14 -0
  887. package/dist/tests/fourslash/hover.classNoInit.fourslash.js.map +1 -0
  888. package/dist/tests/fourslash/hover.docFromScr.stringFormat.fourslash.d.ts +1 -0
  889. package/dist/tests/fourslash/hover.docFromScr.stringFormat.fourslash.js +47 -0
  890. package/dist/tests/fourslash/hover.docFromScr.stringFormat.fourslash.js.map +1 -0
  891. package/dist/tests/fourslash/hover.docFromSrc.fourslash.d.ts +1 -0
  892. package/dist/tests/fourslash/hover.docFromSrc.fourslash.js +77 -0
  893. package/dist/tests/fourslash/hover.docFromSrc.fourslash.js.map +1 -0
  894. package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module1.fourslash.d.ts +1 -0
  895. package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module1.fourslash.js +22 -0
  896. package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module1.fourslash.js.map +1 -0
  897. package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module2.fourslash.d.ts +1 -0
  898. package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module2.fourslash.js +22 -0
  899. package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module2.fourslash.js.map +1 -0
  900. package/dist/tests/fourslash/hover.docFromSrc.relativeImport1.fourslash.d.ts +1 -0
  901. package/dist/tests/fourslash/hover.docFromSrc.relativeImport1.fourslash.js +21 -0
  902. package/dist/tests/fourslash/hover.docFromSrc.relativeImport1.fourslash.js.map +1 -0
  903. package/dist/tests/fourslash/hover.docFromSrc.relativeImport2.fourslash.d.ts +1 -0
  904. package/dist/tests/fourslash/hover.docFromSrc.relativeImport2.fourslash.js +20 -0
  905. package/dist/tests/fourslash/hover.docFromSrc.relativeImport2.fourslash.js.map +1 -0
  906. package/dist/tests/fourslash/hover.docFromSrc.relativeImport3.fourslash.d.ts +1 -0
  907. package/dist/tests/fourslash/hover.docFromSrc.relativeImport3.fourslash.js +38 -0
  908. package/dist/tests/fourslash/hover.docFromSrc.relativeImport3.fourslash.js.map +1 -0
  909. package/dist/tests/fourslash/hover.docFromSrc.stubs-package.fourslash.d.ts +1 -0
  910. package/dist/tests/fourslash/hover.docFromSrc.stubs-package.fourslash.js +25 -0
  911. package/dist/tests/fourslash/hover.docFromSrc.stubs-package.fourslash.js.map +1 -0
  912. package/dist/tests/fourslash/hover.docFromSrc.typeshed.fourslash.d.ts +1 -0
  913. package/dist/tests/fourslash/hover.docFromSrc.typeshed.fourslash.js +18 -0
  914. package/dist/tests/fourslash/hover.docFromSrc.typeshed.fourslash.js.map +1 -0
  915. package/dist/tests/fourslash/hover.docstring.links.fourslash.d.ts +1 -0
  916. package/dist/tests/fourslash/hover.docstring.links.fourslash.js +12 -0
  917. package/dist/tests/fourslash/hover.docstring.links.fourslash.js.map +1 -0
  918. package/dist/tests/fourslash/hover.docstring.overloads.fourslash.d.ts +1 -0
  919. package/dist/tests/fourslash/hover.docstring.overloads.fourslash.js +38 -0
  920. package/dist/tests/fourslash/hover.docstring.overloads.fourslash.js.map +1 -0
  921. package/dist/tests/fourslash/hover.docstring.split.fourslash.d.ts +1 -0
  922. package/dist/tests/fourslash/hover.docstring.split.fourslash.js +24 -0
  923. package/dist/tests/fourslash/hover.docstring.split.fourslash.js.map +1 -0
  924. package/dist/tests/fourslash/hover.fourslash.d.ts +1 -0
  925. package/dist/tests/fourslash/hover.fourslash.js +20 -0
  926. package/dist/tests/fourslash/hover.fourslash.js.map +1 -0
  927. package/dist/tests/fourslash/hover.import.django.view.fourslash.d.ts +1 -0
  928. package/dist/tests/fourslash/hover.import.django.view.fourslash.js +23 -0
  929. package/dist/tests/fourslash/hover.import.django.view.fourslash.js.map +1 -0
  930. package/dist/tests/fourslash/hover.import.fourslash.d.ts +1 -0
  931. package/dist/tests/fourslash/hover.import.fourslash.js +10 -0
  932. package/dist/tests/fourslash/hover.import.fourslash.js.map +1 -0
  933. package/dist/tests/fourslash/hover.inherited.docFromSrc.fourslash.d.ts +1 -0
  934. package/dist/tests/fourslash/hover.inherited.docFromSrc.fourslash.js +61 -0
  935. package/dist/tests/fourslash/hover.inherited.docFromSrc.fourslash.js.map +1 -0
  936. package/dist/tests/fourslash/hover.inherited.docFromSrcWithStub.fourslash.d.ts +1 -0
  937. package/dist/tests/fourslash/hover.inherited.docFromSrcWithStub.fourslash.js +51 -0
  938. package/dist/tests/fourslash/hover.inherited.docFromSrcWithStub.fourslash.js.map +1 -0
  939. package/dist/tests/fourslash/hover.inherited.docFromStub.fourslash.d.ts +1 -0
  940. package/dist/tests/fourslash/hover.inherited.docFromStub.fourslash.js +40 -0
  941. package/dist/tests/fourslash/hover.inherited.docFromStub.fourslash.js.map +1 -0
  942. package/dist/tests/fourslash/hover.inherited.overload.docFromSrcWithStub.fourslash.d.ts +1 -0
  943. package/dist/tests/fourslash/hover.inherited.overload.docFromSrcWithStub.fourslash.js +43 -0
  944. package/dist/tests/fourslash/hover.inherited.overload.docFromSrcWithStub.fourslash.js.map +1 -0
  945. package/dist/tests/fourslash/hover.inherited.overload.docFromStub.fourslash.d.ts +1 -0
  946. package/dist/tests/fourslash/hover.inherited.overload.docFromStub.fourslash.js +44 -0
  947. package/dist/tests/fourslash/hover.inherited.overload.docFromStub.fourslash.js.map +1 -0
  948. package/dist/tests/fourslash/hover.inherited.property.docFromSrcWithStub.fourslash.d.ts +1 -0
  949. package/dist/tests/fourslash/hover.inherited.property.docFromSrcWithStub.fourslash.js +84 -0
  950. package/dist/tests/fourslash/hover.inherited.property.docFromSrcWithStub.fourslash.js.map +1 -0
  951. package/dist/tests/fourslash/hover.inherited.property.docFromStub.fourslash.d.ts +1 -0
  952. package/dist/tests/fourslash/hover.inherited.property.docFromStub.fourslash.js +88 -0
  953. package/dist/tests/fourslash/hover.inherited.property.docFromStub.fourslash.js.map +1 -0
  954. package/dist/tests/fourslash/hover.init.fourslash.d.ts +1 -0
  955. package/dist/tests/fourslash/hover.init.fourslash.js +38 -0
  956. package/dist/tests/fourslash/hover.init.fourslash.js.map +1 -0
  957. package/dist/tests/fourslash/hover.libCodeAndStub.fourslash.d.ts +1 -0
  958. package/dist/tests/fourslash/hover.libCodeAndStub.fourslash.js +49 -0
  959. package/dist/tests/fourslash/hover.libCodeAndStub.fourslash.js.map +1 -0
  960. package/dist/tests/fourslash/hover.libCodeNoStub.fourslash.d.ts +1 -0
  961. package/dist/tests/fourslash/hover.libCodeNoStub.fourslash.js +39 -0
  962. package/dist/tests/fourslash/hover.libCodeNoStub.fourslash.js.map +1 -0
  963. package/dist/tests/fourslash/hover.libStub.fourslash.d.ts +1 -0
  964. package/dist/tests/fourslash/hover.libStub.fourslash.js +39 -0
  965. package/dist/tests/fourslash/hover.libStub.fourslash.js.map +1 -0
  966. package/dist/tests/fourslash/hover.optionalAliasParameter.fourslash.d.ts +1 -0
  967. package/dist/tests/fourslash/hover.optionalAliasParameter.fourslash.js +14 -0
  968. package/dist/tests/fourslash/hover.optionalAliasParameter.fourslash.js.map +1 -0
  969. package/dist/tests/fourslash/hover.plainText.fourslash.d.ts +1 -0
  970. package/dist/tests/fourslash/hover.plainText.fourslash.js +20 -0
  971. package/dist/tests/fourslash/hover.plainText.fourslash.js.map +1 -0
  972. package/dist/tests/fourslash/hover.typedDict.key.fourslash.d.ts +1 -0
  973. package/dist/tests/fourslash/hover.typedDict.key.fourslash.js +50 -0
  974. package/dist/tests/fourslash/hover.typedDict.key.fourslash.js.map +1 -0
  975. package/dist/tests/fourslash/hover.variable.docString.fourslash.d.ts +1 -0
  976. package/dist/tests/fourslash/hover.variable.docString.fourslash.js +35 -0
  977. package/dist/tests/fourslash/hover.variable.docString.fourslash.js.map +1 -0
  978. package/dist/tests/fourslash/hover.wildcardimports.fourslash.d.ts +1 -0
  979. package/dist/tests/fourslash/hover.wildcardimports.fourslash.js +73 -0
  980. package/dist/tests/fourslash/hover.wildcardimports.fourslash.js.map +1 -0
  981. package/dist/tests/fourslash/import.publicSymbols.fourslash.d.ts +1 -0
  982. package/dist/tests/fourslash/import.publicSymbols.fourslash.js +63 -0
  983. package/dist/tests/fourslash/import.publicSymbols.fourslash.js.map +1 -0
  984. package/dist/tests/fourslash/import.pytyped.dunderAll.fourslash.d.ts +1 -0
  985. package/dist/tests/fourslash/import.pytyped.dunderAll.fourslash.js +72 -0
  986. package/dist/tests/fourslash/import.pytyped.dunderAll.fourslash.js.map +1 -0
  987. package/dist/tests/fourslash/import.pytyped.privateSymbols.fourslash.d.ts +1 -0
  988. package/dist/tests/fourslash/import.pytyped.privateSymbols.fourslash.js +61 -0
  989. package/dist/tests/fourslash/import.pytyped.privateSymbols.fourslash.js.map +1 -0
  990. package/dist/tests/fourslash/import.pytyped.typeCheckingBasic.fourslash.d.ts +1 -0
  991. package/dist/tests/fourslash/import.pytyped.typeCheckingBasic.fourslash.js +35 -0
  992. package/dist/tests/fourslash/import.pytyped.typeCheckingBasic.fourslash.js.map +1 -0
  993. package/dist/tests/fourslash/import.pytyped.typeCheckingOff.fourslash.d.ts +1 -0
  994. package/dist/tests/fourslash/import.pytyped.typeCheckingOff.fourslash.js +35 -0
  995. package/dist/tests/fourslash/import.pytyped.typeCheckingOff.fourslash.js.map +1 -0
  996. package/dist/tests/fourslash/import.wildcard.fourslash.d.ts +1 -0
  997. package/dist/tests/fourslash/import.wildcard.fourslash.js +24 -0
  998. package/dist/tests/fourslash/import.wildcard.fourslash.js.map +1 -0
  999. package/dist/tests/fourslash/importnotresolved.fourslash.d.ts +1 -0
  1000. package/dist/tests/fourslash/importnotresolved.fourslash.js +13 -0
  1001. package/dist/tests/fourslash/importnotresolved.fourslash.js.map +1 -0
  1002. package/dist/tests/fourslash/missingModuleSource.disablingInStrictMode.fourslash.d.ts +1 -0
  1003. package/dist/tests/fourslash/missingModuleSource.disablingInStrictMode.fourslash.js +18 -0
  1004. package/dist/tests/fourslash/missingModuleSource.disablingInStrictMode.fourslash.js.map +1 -0
  1005. package/dist/tests/fourslash/missingModuleSource.fourslash.d.ts +1 -0
  1006. package/dist/tests/fourslash/missingModuleSource.fourslash.js +13 -0
  1007. package/dist/tests/fourslash/missingModuleSource.fourslash.js.map +1 -0
  1008. package/dist/tests/fourslash/missingTypeStub.codeAction.fourslash.d.ts +1 -0
  1009. package/dist/tests/fourslash/missingTypeStub.codeAction.fourslash.js +31 -0
  1010. package/dist/tests/fourslash/missingTypeStub.codeAction.fourslash.js.map +1 -0
  1011. package/dist/tests/fourslash/missingTypeStub.command.multipart.fourslash.d.ts +7 -0
  1012. package/dist/tests/fourslash/missingTypeStub.command.multipart.fourslash.js +44 -0
  1013. package/dist/tests/fourslash/missingTypeStub.command.multipart.fourslash.js.map +1 -0
  1014. package/dist/tests/fourslash/missingTypeStub.command.singlefile.fourslash.d.ts +7 -0
  1015. package/dist/tests/fourslash/missingTypeStub.command.singlefile.fourslash.js +35 -0
  1016. package/dist/tests/fourslash/missingTypeStub.command.singlefile.fourslash.js.map +1 -0
  1017. package/dist/tests/fourslash/missingTypeStub.command.singlepart.fourslash.d.ts +7 -0
  1018. package/dist/tests/fourslash/missingTypeStub.command.singlepart.fourslash.js +35 -0
  1019. package/dist/tests/fourslash/missingTypeStub.command.singlepart.fourslash.js.map +1 -0
  1020. package/dist/tests/fourslash/missingTypeStub.fourslash.d.ts +1 -0
  1021. package/dist/tests/fourslash/missingTypeStub.fourslash.js +18 -0
  1022. package/dist/tests/fourslash/missingTypeStub.fourslash.js.map +1 -0
  1023. package/dist/tests/fourslash/missingTypeStub.invokeCodeAction.fourslash.d.ts +1 -0
  1024. package/dist/tests/fourslash/missingTypeStub.invokeCodeAction.fourslash.js +34 -0
  1025. package/dist/tests/fourslash/missingTypeStub.invokeCodeAction.fourslash.js.map +1 -0
  1026. package/dist/tests/fourslash/noerrors.fourslash.d.ts +1 -0
  1027. package/dist/tests/fourslash/noerrors.fourslash.js +9 -0
  1028. package/dist/tests/fourslash/noerrors.fourslash.js.map +1 -0
  1029. package/dist/tests/fourslash/orderImports1.command.fourslash.d.ts +1 -0
  1030. package/dist/tests/fourslash/orderImports1.command.fourslash.js +17 -0
  1031. package/dist/tests/fourslash/orderImports1.command.fourslash.js.map +1 -0
  1032. package/dist/tests/fourslash/orderImports2.command.fourslash.d.ts +1 -0
  1033. package/dist/tests/fourslash/orderImports2.command.fourslash.js +21 -0
  1034. package/dist/tests/fourslash/orderImports2.command.fourslash.js.map +1 -0
  1035. package/dist/tests/fourslash/rename.externallyHidden.fourslash.d.ts +1 -0
  1036. package/dist/tests/fourslash/rename.externallyHidden.fourslash.js +23 -0
  1037. package/dist/tests/fourslash/rename.externallyHidden.fourslash.js.map +1 -0
  1038. package/dist/tests/fourslash/rename.externallyHidden.params.fourslash.d.ts +1 -0
  1039. package/dist/tests/fourslash/rename.externallyHidden.params.fourslash.js +23 -0
  1040. package/dist/tests/fourslash/rename.externallyHidden.params.fourslash.js.map +1 -0
  1041. package/dist/tests/fourslash/rename.fourslash.d.ts +1 -0
  1042. package/dist/tests/fourslash/rename.fourslash.js +26 -0
  1043. package/dist/tests/fourslash/rename.fourslash.js.map +1 -0
  1044. package/dist/tests/fourslash/rename.library.fourslash.d.ts +1 -0
  1045. package/dist/tests/fourslash/rename.library.fourslash.js +26 -0
  1046. package/dist/tests/fourslash/rename.library.fourslash.js.map +1 -0
  1047. package/dist/tests/fourslash/rename.library.sourceAndStub.fourslash.d.ts +1 -0
  1048. package/dist/tests/fourslash/rename.library.sourceAndStub.fourslash.js +29 -0
  1049. package/dist/tests/fourslash/rename.library.sourceAndStub.fourslash.js.map +1 -0
  1050. package/dist/tests/fourslash/rename.multipleDecl.fourslash.d.ts +2 -0
  1051. package/dist/tests/fourslash/rename.multipleDecl.fourslash.js +19 -0
  1052. package/dist/tests/fourslash/rename.multipleDecl.fourslash.js.map +1 -0
  1053. package/dist/tests/fourslash/rename.sourceAndStub.fourslash.d.ts +1 -0
  1054. package/dist/tests/fourslash/rename.sourceAndStub.fourslash.js +33 -0
  1055. package/dist/tests/fourslash/rename.sourceAndStub.fourslash.js.map +1 -0
  1056. package/dist/tests/fourslash/rename.string.excluded.fourslash.d.ts +1 -0
  1057. package/dist/tests/fourslash/rename.string.excluded.fourslash.js +39 -0
  1058. package/dist/tests/fourslash/rename.string.excluded.fourslash.js.map +1 -0
  1059. package/dist/tests/fourslash/rename.string.fourslash.d.ts +1 -0
  1060. package/dist/tests/fourslash/rename.string.fourslash.js +25 -0
  1061. package/dist/tests/fourslash/rename.string.fourslash.js.map +1 -0
  1062. package/dist/tests/fourslash/signature.builtinDocstrings.fourslash.d.ts +1 -0
  1063. package/dist/tests/fourslash/signature.builtinDocstrings.fourslash.js +62 -0
  1064. package/dist/tests/fourslash/signature.builtinDocstrings.fourslash.js.map +1 -0
  1065. package/dist/tests/fourslash/signature.complicated.fourslash.d.ts +1 -0
  1066. package/dist/tests/fourslash/signature.complicated.fourslash.js +97 -0
  1067. package/dist/tests/fourslash/signature.complicated.fourslash.js.map +1 -0
  1068. package/dist/tests/fourslash/signature.cornercases.fourslash.d.ts +1 -0
  1069. package/dist/tests/fourslash/signature.cornercases.fourslash.js +22 -0
  1070. package/dist/tests/fourslash/signature.cornercases.fourslash.js.map +1 -0
  1071. package/dist/tests/fourslash/signature.docstrings.fourslash.d.ts +1 -0
  1072. package/dist/tests/fourslash/signature.docstrings.fourslash.js +42 -0
  1073. package/dist/tests/fourslash/signature.docstrings.fourslash.js.map +1 -0
  1074. package/dist/tests/fourslash/signature.docstrings.overloaded.fourslash.d.ts +1 -0
  1075. package/dist/tests/fourslash/signature.docstrings.overloaded.fourslash.js +49 -0
  1076. package/dist/tests/fourslash/signature.docstrings.overloaded.fourslash.js.map +1 -0
  1077. package/dist/tests/fourslash/signature.docstrings.wildcardimports.fourslash.d.ts +1 -0
  1078. package/dist/tests/fourslash/signature.docstrings.wildcardimports.fourslash.js +115 -0
  1079. package/dist/tests/fourslash/signature.docstrings.wildcardimports.fourslash.js.map +1 -0
  1080. package/dist/tests/fourslash/signature.overload.fourslash.d.ts +1 -0
  1081. package/dist/tests/fourslash/signature.overload.fourslash.js +63 -0
  1082. package/dist/tests/fourslash/signature.overload.fourslash.js.map +1 -0
  1083. package/dist/tests/fourslash/signature.simple.fourslash.d.ts +1 -0
  1084. package/dist/tests/fourslash/signature.simple.fourslash.js +104 -0
  1085. package/dist/tests/fourslash/signature.simple.fourslash.js.map +1 -0
  1086. package/dist/tests/harness/fourslash/fourSlashParser.d.ts +10 -0
  1087. package/dist/tests/harness/fourslash/fourSlashParser.js +347 -0
  1088. package/dist/tests/harness/fourslash/fourSlashParser.js.map +1 -0
  1089. package/dist/tests/harness/fourslash/fourSlashTypes.d.ts +81 -0
  1090. package/dist/tests/harness/fourslash/fourSlashTypes.js +65 -0
  1091. package/dist/tests/harness/fourslash/fourSlashTypes.js.map +1 -0
  1092. package/dist/tests/harness/fourslash/runner.d.ts +20 -0
  1093. package/dist/tests/harness/fourslash/runner.js +93 -0
  1094. package/dist/tests/harness/fourslash/runner.js.map +1 -0
  1095. package/dist/tests/harness/fourslash/testLanguageService.d.ts +40 -0
  1096. package/dist/tests/harness/fourslash/testLanguageService.js +120 -0
  1097. package/dist/tests/harness/fourslash/testLanguageService.js.map +1 -0
  1098. package/dist/tests/harness/fourslash/testState.Consts.d.ts +11 -0
  1099. package/dist/tests/harness/fourslash/testState.Consts.js +50 -0
  1100. package/dist/tests/harness/fourslash/testState.Consts.js.map +1 -0
  1101. package/dist/tests/harness/fourslash/testState.d.ts +232 -0
  1102. package/dist/tests/harness/fourslash/testState.js +1381 -0
  1103. package/dist/tests/harness/fourslash/testState.js.map +1 -0
  1104. package/dist/tests/harness/testAccessHost.d.ts +8 -0
  1105. package/dist/tests/harness/testAccessHost.js +26 -0
  1106. package/dist/tests/harness/testAccessHost.js.map +1 -0
  1107. package/dist/tests/harness/testHost.d.ts +16 -0
  1108. package/dist/tests/harness/testHost.js +161 -0
  1109. package/dist/tests/harness/testHost.js.map +1 -0
  1110. package/dist/tests/harness/utils.d.ts +74 -0
  1111. package/dist/tests/harness/utils.js +328 -0
  1112. package/dist/tests/harness/utils.js.map +1 -0
  1113. package/dist/tests/harness/vfs/factory.d.ts +32 -0
  1114. package/dist/tests/harness/vfs/factory.js +173 -0
  1115. package/dist/tests/harness/vfs/factory.js.map +1 -0
  1116. package/dist/tests/harness/vfs/filesystem.d.ts +430 -0
  1117. package/dist/tests/harness/vfs/filesystem.js +1455 -0
  1118. package/dist/tests/harness/vfs/filesystem.js.map +1 -0
  1119. package/dist/tests/harness/vfs/pathValidation.d.ts +24 -0
  1120. package/dist/tests/harness/vfs/pathValidation.js +123 -0
  1121. package/dist/tests/harness/vfs/pathValidation.js.map +1 -0
  1122. package/dist/tests/importAdder.test.d.ts +1 -0
  1123. package/dist/tests/importAdder.test.js +1192 -0
  1124. package/dist/tests/importAdder.test.js.map +1 -0
  1125. package/dist/tests/importResolver.test.d.ts +1 -0
  1126. package/dist/tests/importResolver.test.js +450 -0
  1127. package/dist/tests/importResolver.test.js.map +1 -0
  1128. package/dist/tests/importStatementUtils.test.d.ts +1 -0
  1129. package/dist/tests/importStatementUtils.test.js +371 -0
  1130. package/dist/tests/importStatementUtils.test.js.map +1 -0
  1131. package/dist/tests/indentationUtils.ptvs.test.d.ts +1 -0
  1132. package/dist/tests/indentationUtils.ptvs.test.js +324 -0
  1133. package/dist/tests/indentationUtils.ptvs.test.js.map +1 -0
  1134. package/dist/tests/indentationUtils.reindent.test.d.ts +1 -0
  1135. package/dist/tests/indentationUtils.reindent.test.js +332 -0
  1136. package/dist/tests/indentationUtils.reindent.test.js.map +1 -0
  1137. package/dist/tests/indentationUtils.test.d.ts +1 -0
  1138. package/dist/tests/indentationUtils.test.js +375 -0
  1139. package/dist/tests/indentationUtils.test.js.map +1 -0
  1140. package/dist/tests/ipythonMode.test.d.ts +1 -0
  1141. package/dist/tests/ipythonMode.test.js +303 -0
  1142. package/dist/tests/ipythonMode.test.js.map +1 -0
  1143. package/dist/tests/localizer.test.d.ts +1 -0
  1144. package/dist/tests/localizer.test.js +64 -0
  1145. package/dist/tests/localizer.test.js.map +1 -0
  1146. package/dist/tests/parseTreeUtils.test.d.ts +1 -0
  1147. package/dist/tests/parseTreeUtils.test.js +228 -0
  1148. package/dist/tests/parseTreeUtils.test.js.map +1 -0
  1149. package/dist/tests/parser.test.d.ts +1 -0
  1150. package/dist/tests/parser.test.js +101 -0
  1151. package/dist/tests/parser.test.js.map +1 -0
  1152. package/dist/tests/pathUtils.test.d.ts +1 -0
  1153. package/dist/tests/pathUtils.test.js +253 -0
  1154. package/dist/tests/pathUtils.test.js.map +1 -0
  1155. package/dist/tests/pyrightFileSystem.test.d.ts +1 -0
  1156. package/dist/tests/pyrightFileSystem.test.js +152 -0
  1157. package/dist/tests/pyrightFileSystem.test.js.map +1 -0
  1158. package/dist/tests/renameModule.folder.test.d.ts +1 -0
  1159. package/dist/tests/renameModule.folder.test.js +229 -0
  1160. package/dist/tests/renameModule.folder.test.js.map +1 -0
  1161. package/dist/tests/renameModule.fromImports.test.d.ts +1 -0
  1162. package/dist/tests/renameModule.fromImports.test.js +790 -0
  1163. package/dist/tests/renameModule.fromImports.test.js.map +1 -0
  1164. package/dist/tests/renameModule.imports.test.d.ts +1 -0
  1165. package/dist/tests/renameModule.imports.test.js +380 -0
  1166. package/dist/tests/renameModule.imports.test.js.map +1 -0
  1167. package/dist/tests/renameModule.misc.test.d.ts +1 -0
  1168. package/dist/tests/renameModule.misc.test.js +615 -0
  1169. package/dist/tests/renameModule.misc.test.js.map +1 -0
  1170. package/dist/tests/renameModule.relativePath.test.d.ts +1 -0
  1171. package/dist/tests/renameModule.relativePath.test.js +231 -0
  1172. package/dist/tests/renameModule.relativePath.test.js.map +1 -0
  1173. package/dist/tests/renameModuleTestUtils.d.ts +4 -0
  1174. package/dist/tests/renameModuleTestUtils.js +148 -0
  1175. package/dist/tests/renameModuleTestUtils.js.map +1 -0
  1176. package/dist/tests/sourceFile.test.d.ts +1 -0
  1177. package/dist/tests/sourceFile.test.js +25 -0
  1178. package/dist/tests/sourceFile.test.js.map +1 -0
  1179. package/dist/tests/stringUtils.test.d.ts +1 -0
  1180. package/dist/tests/stringUtils.test.js +69 -0
  1181. package/dist/tests/stringUtils.test.js.map +1 -0
  1182. package/dist/tests/symbolNameUtils.test.d.ts +1 -0
  1183. package/dist/tests/symbolNameUtils.test.js +83 -0
  1184. package/dist/tests/symbolNameUtils.test.js.map +1 -0
  1185. package/dist/tests/testState.test.d.ts +1 -0
  1186. package/dist/tests/testState.test.js +521 -0
  1187. package/dist/tests/testState.test.js.map +1 -0
  1188. package/dist/tests/testUtils.d.ts +27 -0
  1189. package/dist/tests/testUtils.js +213 -0
  1190. package/dist/tests/testUtils.js.map +1 -0
  1191. package/dist/tests/tokenizer.test.d.ts +1 -0
  1192. package/dist/tests/tokenizer.test.js +1277 -0
  1193. package/dist/tests/tokenizer.test.js.map +1 -0
  1194. package/dist/tests/typeEvaluator1.test.d.ts +1 -0
  1195. package/dist/tests/typeEvaluator1.test.js +1023 -0
  1196. package/dist/tests/typeEvaluator1.test.js.map +1 -0
  1197. package/dist/tests/typeEvaluator2.test.d.ts +1 -0
  1198. package/dist/tests/typeEvaluator2.test.js +869 -0
  1199. package/dist/tests/typeEvaluator2.test.js.map +1 -0
  1200. package/dist/tests/typeEvaluator3.test.d.ts +1 -0
  1201. package/dist/tests/typeEvaluator3.test.js +915 -0
  1202. package/dist/tests/typeEvaluator3.test.js.map +1 -0
  1203. package/dist/tests/typeEvaluator4.test.d.ts +1 -0
  1204. package/dist/tests/typeEvaluator4.test.js +901 -0
  1205. package/dist/tests/typeEvaluator4.test.js.map +1 -0
  1206. package/dist/tests/updateSymbolReference.test.d.ts +1 -0
  1207. package/dist/tests/updateSymbolReference.test.js +980 -0
  1208. package/dist/tests/updateSymbolReference.test.js.map +1 -0
  1209. package/dist/tests/zipfs.test.d.ts +1 -0
  1210. package/dist/tests/zipfs.test.js +112 -0
  1211. package/dist/tests/zipfs.test.js.map +1 -0
  1212. package/dist/workspaceMap.d.ts +6 -0
  1213. package/dist/workspaceMap.js +73 -0
  1214. package/dist/workspaceMap.js.map +1 -0
  1215. package/package.json +45 -0
@@ -0,0 +1,1381 @@
1
+ "use strict";
2
+ /*
3
+ * testState.ts
4
+ * Copyright (c) Microsoft Corporation.
5
+ * Licensed under the MIT license.
6
+ *
7
+ * TestState wraps currently test states and provides a way to query and manipulate
8
+ * the test states.
9
+ */
10
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
19
+ }) : function(o, v) {
20
+ o["default"] = v;
21
+ });
22
+ var __importStar = (this && this.__importStar) || function (mod) {
23
+ if (mod && mod.__esModule) return mod;
24
+ var result = {};
25
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
26
+ __setModuleDefault(result, mod);
27
+ return result;
28
+ };
29
+ var __importDefault = (this && this.__importDefault) || function (mod) {
30
+ return (mod && mod.__esModule) ? mod : { "default": mod };
31
+ };
32
+ Object.defineProperty(exports, "__esModule", { value: true });
33
+ exports.getNodeAtMarker = exports.getNodeForRange = exports.parseAndGetTestState = exports.TestState = void 0;
34
+ const assert_1 = __importDefault(require("assert"));
35
+ const JSONC = __importStar(require("jsonc-parser"));
36
+ const vscode_languageserver_1 = require("vscode-languageserver");
37
+ const parseTreeUtils_1 = require("../../../analyzer/parseTreeUtils");
38
+ const service_1 = require("../../../analyzer/service");
39
+ const collectionUtils_1 = require("../../../common/collectionUtils");
40
+ const configOptions_1 = require("../../../common/configOptions");
41
+ const console_1 = require("../../../common/console");
42
+ const core_1 = require("../../../common/core");
43
+ const debug = __importStar(require("../../../common/debug"));
44
+ const deferred_1 = require("../../../common/deferred");
45
+ const pathUtils_1 = require("../../../common/pathUtils");
46
+ const positionUtils_1 = require("../../../common/positionUtils");
47
+ const stringUtils_1 = require("../../../common/stringUtils");
48
+ const textRange_1 = require("../../../common/textRange");
49
+ const definitionProvider_1 = require("../../../languageService/definitionProvider");
50
+ const hoverProvider_1 = require("../../../languageService/hoverProvider");
51
+ const tokenizer_1 = require("../../../parser/tokenizer");
52
+ const pyrightFileSystem_1 = require("../../../pyrightFileSystem");
53
+ const testAccessHost_1 = require("../testAccessHost");
54
+ const host = __importStar(require("../testHost"));
55
+ const utils_1 = require("../utils");
56
+ const factory_1 = require("../vfs/factory");
57
+ const vfs = __importStar(require("../vfs/filesystem"));
58
+ const fourSlashParser_1 = require("./fourSlashParser");
59
+ const fourSlashTypes_1 = require("./fourSlashTypes");
60
+ const testLanguageService_1 = require("./testLanguageService");
61
+ const testAccessHost = new testAccessHost_1.TestAccessHost(vfs.MODULE_PATH, [factory_1.libFolder, factory_1.distlibFolder]);
62
+ class TestState {
63
+ constructor(basePath, testData, mountPaths, hostSpecificFeatures) {
64
+ var _a, _b;
65
+ this.testData = testData;
66
+ this._files = [];
67
+ // The current caret position in the active file
68
+ this.currentCaretPosition = 0;
69
+ // The position of the end of the current selection, or -1 if nothing is selected
70
+ this.selectionEnd = -1;
71
+ this.lastKnownMarker = '';
72
+ this._hostSpecificFeatures = hostSpecificFeatures !== null && hostSpecificFeatures !== void 0 ? hostSpecificFeatures : new testLanguageService_1.TestFeatures();
73
+ const nullConsole = new console_1.NullConsole();
74
+ const ignoreCase = (0, core_1.toBoolean)(testData.globalOptions["ignorecase" /* ignoreCase */]);
75
+ this._cancellationToken = new fourSlashTypes_1.TestCancellationToken();
76
+ const sourceFiles = [];
77
+ const files = {};
78
+ for (const file of testData.files) {
79
+ // if one of file is configuration file, set config options from the given json
80
+ if (this._isConfig(file, ignoreCase)) {
81
+ try {
82
+ this.rawConfigJson = JSONC.parse(file.content);
83
+ }
84
+ catch (e) {
85
+ throw new Error(`Failed to parse test ${file.fileName}: ${e.message}`);
86
+ }
87
+ }
88
+ else {
89
+ files[file.fileName] = new vfs.File(file.content, { meta: file.fileOptions, encoding: 'utf8' });
90
+ if (!(0, core_1.toBoolean)(file.fileOptions["library" /* library */])) {
91
+ sourceFiles.push(file.fileName);
92
+ }
93
+ }
94
+ }
95
+ this.console = nullConsole;
96
+ this.testFS = (0, factory_1.createFromFileSystem)(host.HOST, ignoreCase, { cwd: basePath, files, meta: testData.globalOptions }, mountPaths);
97
+ this.fs = new pyrightFileSystem_1.PyrightFileSystem(this.testFS);
98
+ this._files = sourceFiles;
99
+ const configOptions = this._convertGlobalOptionsToConfigOptions(this.testData.globalOptions, mountPaths);
100
+ if (this.rawConfigJson) {
101
+ configOptions.initializeFromJson(this.rawConfigJson, 'basic', nullConsole, this.fs, testAccessHost);
102
+ this._applyTestConfigOptions(configOptions);
103
+ }
104
+ const service = this._createAnalysisService(nullConsole, this._hostSpecificFeatures.importResolverFactory, configOptions);
105
+ this.workspace = {
106
+ workspaceName: 'test workspace',
107
+ rootPath: this.fs.getModulePath(),
108
+ rootUri: (0, pathUtils_1.convertPathToUri)(this.fs, this.fs.getModulePath()),
109
+ serviceInstance: service,
110
+ disableLanguageServices: false,
111
+ disableOrganizeImports: false,
112
+ isInitialized: (0, deferred_1.createDeferred)(),
113
+ searchPathsToWatch: [],
114
+ };
115
+ const indexer = (0, core_1.toBoolean)(testData.globalOptions["indexer" /* indexer */]);
116
+ const indexerWithoutStdLib = (0, core_1.toBoolean)(testData.globalOptions["indexerwithoutstdlib" /* indexerWithoutStdLib */]);
117
+ if (indexer || indexerWithoutStdLib) {
118
+ const indexerOptions = testData.globalOptions["indexeroptions" /* indexerOptions */];
119
+ configOptions.indexing = true;
120
+ this._hostSpecificFeatures.runIndexer(this.workspace, indexerWithoutStdLib, indexerOptions);
121
+ }
122
+ if (this._files.length > 0) {
123
+ // Open the first file by default
124
+ this.openFile(this._files[0]);
125
+ }
126
+ for (const filePath of this._files) {
127
+ const file = files[filePath];
128
+ if ((_a = file.meta) === null || _a === void 0 ? void 0 : _a["ipythonmode" /* ipythonMode */]) {
129
+ (_b = this.program.getSourceFile(filePath)) === null || _b === void 0 ? void 0 : _b.test_enableIPythonMode(true);
130
+ }
131
+ }
132
+ }
133
+ get importResolver() {
134
+ return this.workspace.serviceInstance.getImportResolver();
135
+ }
136
+ get configOptions() {
137
+ return this.workspace.serviceInstance.getConfigOptions();
138
+ }
139
+ get program() {
140
+ return this.workspace.serviceInstance.test_program;
141
+ }
142
+ cwd() {
143
+ return this.testFS.cwd();
144
+ }
145
+ // Entry points from fourslash.ts
146
+ goToMarker(nameOrMarker = '') {
147
+ const marker = (0, core_1.isString)(nameOrMarker) ? this.getMarkerByName(nameOrMarker) : nameOrMarker;
148
+ if (this.activeFile.fileName !== marker.fileName) {
149
+ this.openFile(marker.fileName);
150
+ }
151
+ const content = this._getFileContent(marker.fileName);
152
+ if (marker.position === -1 || marker.position > content.length) {
153
+ throw new Error(`Marker "${nameOrMarker}" has been invalidated by unrecoverable edits to the file.`);
154
+ }
155
+ const mName = (0, core_1.isString)(nameOrMarker) ? nameOrMarker : this.getMarkerName(marker);
156
+ this.lastKnownMarker = mName;
157
+ this.goToPosition(marker.position);
158
+ }
159
+ goToEachMarker(markers, action) {
160
+ assert_1.default.ok(markers.length > 0);
161
+ for (let i = 0; i < markers.length; i++) {
162
+ this.goToMarker(markers[i]);
163
+ action(markers[i], i);
164
+ }
165
+ }
166
+ getMappedFilePath(path) {
167
+ this.importResolver.ensurePartialStubPackages(this.configOptions.findExecEnvironment(path));
168
+ return this.fs.getMappedFilePath(path);
169
+ }
170
+ getMarkerName(m) {
171
+ let found;
172
+ this.testData.markerPositions.forEach((marker, name) => {
173
+ if (marker === m) {
174
+ found = name;
175
+ }
176
+ });
177
+ assert_1.default.ok(found);
178
+ return found;
179
+ }
180
+ getMarkerByName(markerName) {
181
+ const markerPos = this.testData.markerPositions.get(markerName);
182
+ if (markerPos === undefined) {
183
+ throw new Error(`Unknown marker "${markerName}" Available markers: ${this.getMarkerNames()
184
+ .map((m) => '"' + m + '"')
185
+ .join(', ')}`);
186
+ }
187
+ else {
188
+ return markerPos;
189
+ }
190
+ }
191
+ getMarkers() {
192
+ // Return a copy of the list
193
+ return this.testData.markers.slice(0);
194
+ }
195
+ getMarkerNames() {
196
+ return [...this.testData.markerPositions.keys()];
197
+ }
198
+ getPositionRange(markerString) {
199
+ const marker = this.getMarkerByName(markerString);
200
+ const ranges = this.getRanges().filter((r) => r.marker === marker);
201
+ if (ranges.length !== 1) {
202
+ this.raiseError(`no matching range for ${markerString}`);
203
+ }
204
+ const range = ranges[0];
205
+ return this.convertPositionRange(range);
206
+ }
207
+ expandPositionRange(range, start, end) {
208
+ return {
209
+ start: { line: range.start.line, character: range.start.character - start },
210
+ end: { line: range.end.line, character: range.end.character + end },
211
+ };
212
+ }
213
+ convertPositionRange(range) {
214
+ return this.convertOffsetsToRange(range.fileName, range.pos, range.end);
215
+ }
216
+ convertPathToUri(path) {
217
+ return (0, pathUtils_1.convertPathToUri)(this.fs, path);
218
+ }
219
+ getDirectoryPath(path) {
220
+ return (0, pathUtils_1.getDirectoryPath)(path);
221
+ }
222
+ goToPosition(positionOrLineAndColumn) {
223
+ const pos = (0, core_1.isNumber)(positionOrLineAndColumn)
224
+ ? positionOrLineAndColumn
225
+ : this.convertPositionToOffset(this.activeFile.fileName, positionOrLineAndColumn);
226
+ this.currentCaretPosition = pos;
227
+ this.selectionEnd = -1;
228
+ }
229
+ select(startMarker, endMarker) {
230
+ const start = this.getMarkerByName(startMarker);
231
+ const end = this.getMarkerByName(endMarker);
232
+ assert_1.default.ok(start.fileName === end.fileName);
233
+ if (this.activeFile.fileName !== start.fileName) {
234
+ this.openFile(start.fileName);
235
+ }
236
+ this.goToPosition(start.position);
237
+ this.selectionEnd = end.position;
238
+ }
239
+ selectAllInFile(fileName) {
240
+ this.openFile(fileName);
241
+ this.goToPosition(0);
242
+ this.selectionEnd = this.activeFile.content.length;
243
+ }
244
+ selectRange(range) {
245
+ this.goToRangeStart(range);
246
+ this.selectionEnd = range.end;
247
+ }
248
+ selectLine(index) {
249
+ const lineStart = this.convertPositionToOffset(this.activeFile.fileName, { line: index, character: 0 });
250
+ const lineEnd = lineStart + this._getLineContent(index).length;
251
+ this.selectRange({ fileName: this.activeFile.fileName, pos: lineStart, end: lineEnd });
252
+ }
253
+ goToEachRange(action) {
254
+ const ranges = this.getRanges();
255
+ assert_1.default.ok(ranges.length > 0);
256
+ for (const range of ranges) {
257
+ this.selectRange(range);
258
+ action(range);
259
+ }
260
+ }
261
+ goToRangeStart({ fileName, pos }) {
262
+ this.openFile(fileName);
263
+ this.goToPosition(pos);
264
+ }
265
+ getRanges() {
266
+ return this.testData.ranges;
267
+ }
268
+ getRangesInFile(fileName = this.activeFile.fileName) {
269
+ return this.getRanges().filter((r) => r.fileName === fileName);
270
+ }
271
+ getRangesByText() {
272
+ if (this.testData.rangesByText) {
273
+ return this.testData.rangesByText;
274
+ }
275
+ const result = this.createMultiMap(this.getRanges(), (r) => this._rangeText(r));
276
+ this.testData.rangesByText = result;
277
+ return result;
278
+ }
279
+ getFilteredRanges(predicate) {
280
+ return this.getRanges().filter((r) => { var _a; return predicate(r.marker, (_a = r.marker) === null || _a === void 0 ? void 0 : _a.data, this._rangeText(r)); });
281
+ }
282
+ getRangeByMarkerName(markerName) {
283
+ const marker = this.getMarkerByName(markerName);
284
+ return this.getRanges().find((r) => r.marker === marker);
285
+ }
286
+ goToBOF() {
287
+ this.goToPosition(0);
288
+ }
289
+ goToEOF() {
290
+ const len = this._getFileContent(this.activeFile.fileName).length;
291
+ this.goToPosition(len);
292
+ }
293
+ moveCaretRight(count = 1) {
294
+ this.currentCaretPosition += count;
295
+ this.currentCaretPosition = Math.min(this.currentCaretPosition, this._getFileContent(this.activeFile.fileName).length);
296
+ this.selectionEnd = -1;
297
+ }
298
+ // Opens a file given its 0-based index or fileName
299
+ openFile(indexOrName) {
300
+ const fileToOpen = this._findFile(indexOrName);
301
+ fileToOpen.fileName = (0, pathUtils_1.normalizeSlashes)(fileToOpen.fileName);
302
+ this.activeFile = fileToOpen;
303
+ this.program.setFileOpened(this.activeFile.fileName, 1, [{ text: fileToOpen.content }]);
304
+ }
305
+ openFiles(indexOrNames) {
306
+ for (const indexOrName of indexOrNames) {
307
+ this.openFile(indexOrName);
308
+ }
309
+ }
310
+ printCurrentFileState(showWhitespace, makeCaretVisible) {
311
+ for (const file of this.testData.files) {
312
+ const active = this.activeFile === file;
313
+ host.HOST.log(`=== Script (${file.fileName}) ${active ? '(active, cursor at |)' : ''} ===`);
314
+ let content = this._getFileContent(file.fileName);
315
+ if (active) {
316
+ content =
317
+ content.substr(0, this.currentCaretPosition) +
318
+ (makeCaretVisible ? '|' : '') +
319
+ content.substr(this.currentCaretPosition);
320
+ }
321
+ if (showWhitespace) {
322
+ content = this._makeWhitespaceVisible(content);
323
+ }
324
+ host.HOST.log(content);
325
+ }
326
+ }
327
+ deleteChar(count = 1) {
328
+ const offset = this.currentCaretPosition;
329
+ const ch = '';
330
+ const checkCadence = (count >> 2) + 1;
331
+ for (let i = 0; i < count; i++) {
332
+ this._editScriptAndUpdateMarkers(this.activeFile.fileName, offset, offset + 1, ch);
333
+ if (i % checkCadence === 0) {
334
+ this._checkPostEditInvariants();
335
+ }
336
+ }
337
+ this._checkPostEditInvariants();
338
+ }
339
+ replace(start, length, text) {
340
+ this._editScriptAndUpdateMarkers(this.activeFile.fileName, start, start + length, text);
341
+ this._checkPostEditInvariants();
342
+ }
343
+ deleteLineRange(startIndex, endIndexInclusive) {
344
+ const startPos = this.convertPositionToOffset(this.activeFile.fileName, { line: startIndex, character: 0 });
345
+ const endPos = this.convertPositionToOffset(this.activeFile.fileName, {
346
+ line: endIndexInclusive + 1,
347
+ character: 0,
348
+ });
349
+ this.replace(startPos, endPos - startPos, '');
350
+ }
351
+ deleteCharBehindMarker(count = 1) {
352
+ let offset = this.currentCaretPosition;
353
+ const ch = '';
354
+ const checkCadence = (count >> 2) + 1;
355
+ for (let i = 0; i < count; i++) {
356
+ this.currentCaretPosition--;
357
+ offset--;
358
+ this._editScriptAndUpdateMarkers(this.activeFile.fileName, offset, offset + 1, ch);
359
+ if (i % checkCadence === 0) {
360
+ this._checkPostEditInvariants();
361
+ }
362
+ // Don't need to examine formatting because there are no formatting changes on backspace.
363
+ }
364
+ this._checkPostEditInvariants();
365
+ }
366
+ // Enters lines of text at the current caret position
367
+ type(text) {
368
+ let offset = this.currentCaretPosition;
369
+ const selection = this._getSelection();
370
+ this.replace(selection.start, selection.length, '');
371
+ for (let i = 0; i < text.length; i++) {
372
+ const ch = text.charAt(i);
373
+ this._editScriptAndUpdateMarkers(this.activeFile.fileName, offset, offset, ch);
374
+ this.currentCaretPosition++;
375
+ offset++;
376
+ }
377
+ this._checkPostEditInvariants();
378
+ }
379
+ // Enters text as if the user had pasted it
380
+ paste(text) {
381
+ this._editScriptAndUpdateMarkers(this.activeFile.fileName, this.currentCaretPosition, this.currentCaretPosition, text);
382
+ this._checkPostEditInvariants();
383
+ }
384
+ verifyDiagnostics(map) {
385
+ this._analyze();
386
+ // organize things per file
387
+ const resultPerFile = this._getDiagnosticsPerFile();
388
+ const rangePerFile = this.createMultiMap(this.getRanges(), (r) => r.fileName);
389
+ if (!hasDiagnostics(resultPerFile) && rangePerFile.size === 0) {
390
+ // no errors and no error is expected. we are done
391
+ return;
392
+ }
393
+ for (const [file, ranges] of rangePerFile.entries()) {
394
+ const rangesPerCategory = this.createMultiMap(ranges, (r) => {
395
+ if (map) {
396
+ const name = this.getMarkerName(r.marker);
397
+ return map[name].category;
398
+ }
399
+ return r.marker.data.category;
400
+ });
401
+ if (!rangesPerCategory.has('error')) {
402
+ rangesPerCategory.set('error', []);
403
+ }
404
+ if (!rangesPerCategory.has('warning')) {
405
+ rangesPerCategory.set('warning', []);
406
+ }
407
+ if (!rangesPerCategory.has('information')) {
408
+ rangesPerCategory.set('information', []);
409
+ }
410
+ const result = resultPerFile.get(file);
411
+ resultPerFile.delete(file);
412
+ for (const [category, expected] of rangesPerCategory.entries()) {
413
+ const lines = result.parseResults.tokenizerOutput.lines;
414
+ const actual = category === 'error'
415
+ ? result.errors
416
+ : category === 'warning'
417
+ ? result.warnings
418
+ : category === 'information'
419
+ ? result.information
420
+ : this.raiseError(`unexpected category ${category}`);
421
+ if (expected.length !== actual.length) {
422
+ this.raiseError(`contains unexpected result - expected: ${(0, utils_1.stringify)(expected)}, actual: ${(0, utils_1.stringify)(actual)}`);
423
+ }
424
+ for (const range of expected) {
425
+ const rangeSpan = textRange_1.TextRange.fromBounds(range.pos, range.end);
426
+ const matches = actual.filter((d) => {
427
+ const diagnosticSpan = textRange_1.TextRange.fromBounds((0, positionUtils_1.convertPositionToOffset)(d.range.start, lines), (0, positionUtils_1.convertPositionToOffset)(d.range.end, lines));
428
+ return this._deepEqual(diagnosticSpan, rangeSpan);
429
+ });
430
+ if (matches.length === 0) {
431
+ this.raiseError(`doesn't contain expected range: ${(0, utils_1.stringify)(range)}`);
432
+ }
433
+ // if map is provided, check message as well
434
+ if (map) {
435
+ const name = this.getMarkerName(range.marker);
436
+ const message = map[name].message;
437
+ if (matches.filter((d) => message === d.message).length !== 1) {
438
+ this.raiseError(`message doesn't match: ${message} of ${name} - ${(0, utils_1.stringify)(range)}, actual: ${(0, utils_1.stringify)(matches)}`);
439
+ }
440
+ }
441
+ }
442
+ }
443
+ }
444
+ if (hasDiagnostics(resultPerFile)) {
445
+ this.raiseError(`these diagnostics were unexpected: ${(0, utils_1.stringify)(resultPerFile)}`);
446
+ }
447
+ function hasDiagnostics(resultPerFile) {
448
+ for (const entry of resultPerFile.values()) {
449
+ if (entry.errors.length + entry.warnings.length > 0) {
450
+ return true;
451
+ }
452
+ }
453
+ return false;
454
+ }
455
+ }
456
+ async verifyCodeActions(map, verifyCodeActionCount) {
457
+ // make sure we don't use cache built from other tests
458
+ this.workspace.serviceInstance.invalidateAndForceReanalysis();
459
+ this._analyze();
460
+ for (const range of this.getRanges()) {
461
+ const name = this.getMarkerName(range.marker);
462
+ if (!map[name]) {
463
+ continue;
464
+ }
465
+ const codeActions = await this._getCodeActions(range);
466
+ if (verifyCodeActionCount) {
467
+ if (codeActions.length !== map[name].codeActions.length) {
468
+ this.raiseError(`doesn't contain expected result: ${(0, utils_1.stringify)(map[name])}, actual: ${(0, utils_1.stringify)(codeActions)}`);
469
+ }
470
+ }
471
+ for (const expected of map[name].codeActions) {
472
+ let expectedCommand;
473
+ if (expected.command) {
474
+ expectedCommand = {
475
+ title: expected.command.title,
476
+ command: expected.command.command,
477
+ arguments: convertToString(expected.command.arguments),
478
+ };
479
+ }
480
+ const matches = codeActions.filter((a) => {
481
+ const actualCommand = a.command
482
+ ? {
483
+ title: a.command.title,
484
+ command: a.command.command,
485
+ arguments: convertToString(a.command.arguments),
486
+ }
487
+ : undefined;
488
+ const actualEdit = a.edit;
489
+ return (a.title === expected.title &&
490
+ a.kind === expected.kind &&
491
+ this._deepEqual(actualCommand, expectedCommand) &&
492
+ this._deepEqual(actualEdit, expected.edit));
493
+ });
494
+ if (matches.length !== 1) {
495
+ this.raiseError(`doesn't contain expected result: ${(0, utils_1.stringify)(expected)}, actual: ${(0, utils_1.stringify)(codeActions)}`);
496
+ }
497
+ }
498
+ }
499
+ function convertToString(args) {
500
+ return args === null || args === void 0 ? void 0 : args.map((a) => {
501
+ if ((0, core_1.isString)(a)) {
502
+ return (0, pathUtils_1.normalizeSlashes)(a);
503
+ }
504
+ return JSON.stringify(a);
505
+ });
506
+ }
507
+ }
508
+ async verifyCommand(command, files) {
509
+ this._analyze();
510
+ const commandResult = await this._hostSpecificFeatures.execute(new testLanguageService_1.TestLanguageService(this.workspace, this.console, this.fs), { command: command.command, arguments: command.arguments || [] }, vscode_languageserver_1.CancellationToken.None);
511
+ if (command.command === 'pyright.createtypestub') {
512
+ await this._verifyFiles(files);
513
+ }
514
+ else if (command.command === 'pyright.organizeimports') {
515
+ // Organize imports command can be used on only one file at a time,
516
+ // so there is no looping over "commandResult" or "files".
517
+ const workspaceEditResult = commandResult;
518
+ const uri = Object.keys(workspaceEditResult.changes)[0];
519
+ const textEdit = workspaceEditResult.changes[uri][0];
520
+ const actualText = textEdit.newText;
521
+ const expectedText = Object.values(files)[0];
522
+ if (actualText !== expectedText) {
523
+ this.raiseError(`doesn't contain expected result: ${(0, utils_1.stringify)(expectedText)}, actual: ${(0, utils_1.stringify)(actualText)}`);
524
+ }
525
+ }
526
+ return commandResult;
527
+ }
528
+ verifyWorkspaceEdit(expected, actual) {
529
+ if (actual.changes) {
530
+ this._verifyTextEditMap(expected.changes, actual.changes);
531
+ }
532
+ else {
533
+ (0, assert_1.default)(!expected.changes);
534
+ }
535
+ if (actual.documentChanges) {
536
+ this._verifyDocumentEdits(expected.documentChanges, actual.documentChanges);
537
+ }
538
+ else {
539
+ (0, assert_1.default)(!expected.documentChanges);
540
+ }
541
+ if (actual.changeAnnotations) {
542
+ this._verifyChangeAnnotations(expected.changeAnnotations, actual.changeAnnotations);
543
+ }
544
+ else {
545
+ (0, assert_1.default)(!expected.changeAnnotations);
546
+ }
547
+ }
548
+ _verifyChangeAnnotations(expected, actual) {
549
+ assert_1.default.strictEqual(Object.entries(expected).length, Object.entries(actual).length);
550
+ for (const key of Object.keys(expected)) {
551
+ const expectedAnnotation = expected[key];
552
+ const actualAnnotation = actual[key];
553
+ // We need to improve it to test localized strings.
554
+ assert_1.default.strictEqual(expectedAnnotation.label, actualAnnotation.label);
555
+ assert_1.default.strictEqual(expectedAnnotation.description, actualAnnotation.description);
556
+ assert_1.default.strictEqual(expectedAnnotation.needsConfirmation, actualAnnotation.needsConfirmation);
557
+ }
558
+ }
559
+ _textDocumentAreSame(expected, actual) {
560
+ return expected.version === actual.version && expected.uri === actual.uri;
561
+ }
562
+ _verifyDocumentEdits(expected, actual) {
563
+ assert_1.default.strictEqual(expected.length, actual.length);
564
+ for (const op of expected) {
565
+ (0, assert_1.default)(actual.some((a) => {
566
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
567
+ const expectedKind = vscode_languageserver_1.TextDocumentEdit.is(op) ? 'edit' : op.kind;
568
+ const actualKind = vscode_languageserver_1.TextDocumentEdit.is(a) ? 'edit' : a.kind;
569
+ if (expectedKind !== actualKind) {
570
+ return false;
571
+ }
572
+ switch (expectedKind) {
573
+ case 'edit': {
574
+ const expectedEdit = op;
575
+ const actualEdit = a;
576
+ if (!this._textDocumentAreSame(expectedEdit.textDocument, actualEdit.textDocument)) {
577
+ return false;
578
+ }
579
+ return this._textEditsAreSame(expectedEdit.edits, actualEdit.edits);
580
+ }
581
+ case 'create': {
582
+ const expectedOp = op;
583
+ const actualOp = a;
584
+ return (expectedOp.kind === actualOp.kind &&
585
+ expectedOp.annotationId === actualOp.annotationId &&
586
+ expectedOp.uri === actualOp.uri &&
587
+ ((_a = expectedOp.options) === null || _a === void 0 ? void 0 : _a.ignoreIfExists) === ((_b = actualOp.options) === null || _b === void 0 ? void 0 : _b.ignoreIfExists) &&
588
+ ((_c = expectedOp.options) === null || _c === void 0 ? void 0 : _c.overwrite) === ((_d = actualOp.options) === null || _d === void 0 ? void 0 : _d.overwrite));
589
+ }
590
+ case 'rename': {
591
+ const expectedOp = op;
592
+ const actualOp = a;
593
+ return (expectedOp.kind === actualOp.kind &&
594
+ expectedOp.annotationId === actualOp.annotationId &&
595
+ expectedOp.oldUri === actualOp.oldUri &&
596
+ expectedOp.newUri === actualOp.newUri &&
597
+ ((_e = expectedOp.options) === null || _e === void 0 ? void 0 : _e.ignoreIfExists) === ((_f = actualOp.options) === null || _f === void 0 ? void 0 : _f.ignoreIfExists) &&
598
+ ((_g = expectedOp.options) === null || _g === void 0 ? void 0 : _g.overwrite) === ((_h = actualOp.options) === null || _h === void 0 ? void 0 : _h.overwrite));
599
+ }
600
+ case 'delete': {
601
+ const expectedOp = op;
602
+ const actualOp = a;
603
+ return (expectedOp.annotationId === actualOp.annotationId &&
604
+ expectedOp.kind === actualOp.kind &&
605
+ expectedOp.uri === actualOp.uri &&
606
+ ((_j = expectedOp.options) === null || _j === void 0 ? void 0 : _j.ignoreIfNotExists) === ((_k = actualOp.options) === null || _k === void 0 ? void 0 : _k.ignoreIfNotExists) &&
607
+ ((_l = expectedOp.options) === null || _l === void 0 ? void 0 : _l.recursive) === ((_m = actualOp.options) === null || _m === void 0 ? void 0 : _m.recursive));
608
+ }
609
+ default:
610
+ debug.assertNever(expectedKind);
611
+ }
612
+ }));
613
+ }
614
+ }
615
+ _verifyTextEditMap(expected, actual) {
616
+ assert_1.default.strictEqual(Object.entries(expected).length, Object.entries(actual).length);
617
+ for (const key of Object.keys(expected)) {
618
+ (0, assert_1.default)(this._textEditsAreSame(expected[key], actual[key]));
619
+ }
620
+ }
621
+ _textEditsAreSame(expectedEdits, actualEdits) {
622
+ if (expectedEdits.length !== actualEdits.length) {
623
+ return false;
624
+ }
625
+ for (const edit of expectedEdits) {
626
+ if (!actualEdits.some((a) => this._textEditAreSame(edit, a))) {
627
+ return false;
628
+ }
629
+ }
630
+ return true;
631
+ }
632
+ _textEditAreSame(expected, actual) {
633
+ if (!(0, textRange_1.rangesAreEqual)(expected.range, actual.range)) {
634
+ return false;
635
+ }
636
+ if (expected.newText !== actual.newText) {
637
+ return false;
638
+ }
639
+ const expectedAnnotation = vscode_languageserver_1.AnnotatedTextEdit.is(expected) ? expected.annotationId : '';
640
+ const actualAnnotation = vscode_languageserver_1.AnnotatedTextEdit.is(actual) ? actual.annotationId : '';
641
+ return expectedAnnotation === actualAnnotation;
642
+ }
643
+ async verifyInvokeCodeAction(map, verifyCodeActionCount) {
644
+ var _a;
645
+ this._analyze();
646
+ for (const range of this.getRanges()) {
647
+ const name = this.getMarkerName(range.marker);
648
+ if (!map[name]) {
649
+ continue;
650
+ }
651
+ const ls = new testLanguageService_1.TestLanguageService(this.workspace, this.console, this.fs);
652
+ const codeActions = await this._getCodeActions(range);
653
+ if (verifyCodeActionCount) {
654
+ if (codeActions.length !== Object.keys(map).length) {
655
+ this.raiseError(`doesn't contain expected result: ${(0, utils_1.stringify)(map[name])}, actual: ${(0, utils_1.stringify)(codeActions)}`);
656
+ }
657
+ }
658
+ const matches = codeActions.filter((c) => c.title === map[name].title);
659
+ if (matches.length === 0) {
660
+ this.raiseError(`doesn't contain expected result: ${(0, utils_1.stringify)(map[name])}, actual: ${(0, utils_1.stringify)(codeActions)}`);
661
+ }
662
+ for (const codeAction of matches) {
663
+ const results = await this._hostSpecificFeatures.execute(ls, {
664
+ command: codeAction.command.command,
665
+ arguments: ((_a = codeAction.command) === null || _a === void 0 ? void 0 : _a.arguments) || [],
666
+ }, vscode_languageserver_1.CancellationToken.None);
667
+ if (map[name].edits) {
668
+ const workspaceEdits = results;
669
+ for (const edits of Object.values(workspaceEdits.changes)) {
670
+ for (const edit of edits) {
671
+ if (map[name].edits.filter((e) => this._editsAreEqual(e, edit)).length !== 1) {
672
+ this.raiseError(`doesn't contain expected result: ${(0, utils_1.stringify)(map[name])}, actual: ${(0, utils_1.stringify)(edits)}`);
673
+ }
674
+ }
675
+ }
676
+ }
677
+ }
678
+ if (map[name].files) {
679
+ await this._verifyFiles(map[name].files);
680
+ }
681
+ }
682
+ }
683
+ verifyHover(kind, map) {
684
+ // Do not force analyze, it can lead to test passing while it doesn't work in product
685
+ for (const range of this.getRanges()) {
686
+ const name = this.getMarkerName(range.marker);
687
+ const expected = map[name];
688
+ if (expected === undefined) {
689
+ continue;
690
+ }
691
+ const rangePos = this.convertOffsetsToRange(range.fileName, range.pos, range.end);
692
+ const actual = (0, hoverProvider_1.convertHoverResults)(kind, this.program.getHoverForPosition(range.fileName, rangePos.start, kind, vscode_languageserver_1.CancellationToken.None));
693
+ // if expected is null then there should be nothing shown on hover
694
+ if (expected === null) {
695
+ assert_1.default.equal(actual, undefined);
696
+ continue;
697
+ }
698
+ assert_1.default.ok(actual);
699
+ assert_1.default.deepEqual(actual.range, rangePos);
700
+ if (vscode_languageserver_1.MarkupContent.is(actual.contents)) {
701
+ assert_1.default.equal(actual.contents.value, expected);
702
+ assert_1.default.equal(actual.contents.kind, kind);
703
+ }
704
+ else {
705
+ assert_1.default.fail(`Unexpected type of contents object "${actual.contents}", should be MarkupContent.`);
706
+ }
707
+ }
708
+ }
709
+ verifyCaretAtMarker(markerName = '') {
710
+ const pos = this.getMarkerByName(markerName);
711
+ if (pos.fileName !== this.activeFile.fileName) {
712
+ throw new Error(`verifyCaretAtMarker failed - expected to be in file "${pos.fileName}", but was in file "${this.activeFile.fileName}"`);
713
+ }
714
+ if (pos.position !== this.currentCaretPosition) {
715
+ throw new Error(`verifyCaretAtMarker failed - expected to be at marker "/*${markerName}*/, but was at position ${this.currentCaretPosition}(${this._getLineColStringAtPosition(this.currentCaretPosition)})`);
716
+ }
717
+ }
718
+ verifyCurrentLineContent(text) {
719
+ const actual = this._getCurrentLineContent();
720
+ if (actual !== text) {
721
+ throw new Error('verifyCurrentLineContent\n' + this._displayExpectedAndActualString(text, actual, /* quoted */ true));
722
+ }
723
+ }
724
+ verifyCurrentFileContent(text) {
725
+ this._verifyFileContent(this.activeFile.fileName, text);
726
+ }
727
+ verifyTextAtCaretIs(text) {
728
+ const actual = this._getFileContent(this.activeFile.fileName).substring(this.currentCaretPosition, this.currentCaretPosition + text.length);
729
+ if (actual !== text) {
730
+ throw new Error('verifyTextAtCaretIs\n' + this._displayExpectedAndActualString(text, actual, /* quoted */ true));
731
+ }
732
+ }
733
+ verifyRangeIs(expectedText, includeWhiteSpace) {
734
+ this._verifyTextMatches(this._rangeText(this._getOnlyRange()), !!includeWhiteSpace, expectedText);
735
+ }
736
+ async verifyCompletion(verifyMode, docFormat, map, abbrMap) {
737
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
738
+ this._analyze();
739
+ for (const marker of this.getMarkers()) {
740
+ const markerName = this.getMarkerName(marker);
741
+ if (!map[markerName]) {
742
+ continue;
743
+ }
744
+ this.lastKnownMarker = markerName;
745
+ const filePath = marker.fileName;
746
+ const expectedCompletions = map[markerName].completions;
747
+ const completionPosition = this.convertOffsetToPosition(filePath, marker.position);
748
+ const options = { format: docFormat, snippet: true, lazyEdit: true, autoImport: true };
749
+ const nameMap = abbrMap ? new Map(Object.entries(abbrMap)) : undefined;
750
+ const result = await this.workspace.serviceInstance.getCompletionsForPosition(filePath, completionPosition, this.workspace.rootPath, options, nameMap, vscode_languageserver_1.CancellationToken.None);
751
+ if (result === null || result === void 0 ? void 0 : result.completionList) {
752
+ if (verifyMode === 'exact') {
753
+ if (result.completionList.items.length !== expectedCompletions.length) {
754
+ assert_1.default.fail(`${markerName} - Expected ${expectedCompletions.length} items but received ${result.completionList.items.length}. Actual completions:\n${(0, utils_1.stringify)(result.completionList.items.map((r) => r.label))}`);
755
+ }
756
+ }
757
+ for (let i = 0; i < expectedCompletions.length; i++) {
758
+ const expected = expectedCompletions[i];
759
+ const actualIndex = result.completionList.items.findIndex((a) => a.label === expected.label &&
760
+ (expected.kind ? a.kind === expected.kind : true) &&
761
+ (expected.detail ? a.detail === expected.detail : true) &&
762
+ (expected.documentation && vscode_languageserver_1.MarkupContent.is(a.documentation)
763
+ ? a.documentation.value === expected.documentation
764
+ : true));
765
+ if (actualIndex >= 0) {
766
+ if (verifyMode === 'excluded') {
767
+ // we're not supposed to find the completions passed to the test
768
+ assert_1.default.fail(`${markerName} - Completion item with label "${expected.label}" unexpected. Actual completions:\n${(0, utils_1.stringify)(result.completionList.items.map((r) => r.label))}`);
769
+ }
770
+ const actual = result.completionList.items[actualIndex];
771
+ if (expected.additionalTextEdits !== undefined) {
772
+ if (actual.additionalTextEdits === undefined) {
773
+ this.workspace.serviceInstance.resolveCompletionItem(filePath, actual, options, nameMap, vscode_languageserver_1.CancellationToken.None);
774
+ }
775
+ }
776
+ this.verifyCompletionItem(expected, actual);
777
+ if (expected.documentation !== undefined) {
778
+ if (actual.documentation === undefined) {
779
+ this.workspace.serviceInstance.resolveCompletionItem(filePath, actual, options, nameMap, vscode_languageserver_1.CancellationToken.None);
780
+ }
781
+ if (vscode_languageserver_1.MarkupContent.is(actual.documentation)) {
782
+ assert_1.default.strictEqual(actual.documentation.value, expected.documentation);
783
+ assert_1.default.strictEqual(actual.documentation.kind, docFormat);
784
+ }
785
+ else {
786
+ assert_1.default.fail(`${markerName} - Unexpected type of contents object "${actual.documentation}", should be MarkupContent.`);
787
+ }
788
+ }
789
+ result.completionList.items.splice(actualIndex, 1);
790
+ }
791
+ else {
792
+ if (verifyMode === 'included' || verifyMode === 'exact') {
793
+ // we're supposed to find all items passed to the test
794
+ assert_1.default.fail(`${markerName} - Completion item with label "${expected.label}" expected. Actual completions:\n${(0, utils_1.stringify)(result.completionList.items.map((r) => r.label))}`);
795
+ }
796
+ }
797
+ }
798
+ if (verifyMode === 'exact') {
799
+ if (result.completionList.items.length !== 0) {
800
+ // we removed every item we found, there should not be any remaining
801
+ assert_1.default.fail(`${markerName} - Completion items unexpected: ${(0, utils_1.stringify)(result.completionList.items.map((r) => r.label))}`);
802
+ }
803
+ }
804
+ }
805
+ else {
806
+ if (verifyMode !== 'exact' || expectedCompletions.length > 0) {
807
+ assert_1.default.fail(`${markerName} - Failed to get completions`);
808
+ }
809
+ }
810
+ if (map[markerName].memberAccessInfo !== undefined && (result === null || result === void 0 ? void 0 : result.memberAccessInfo) !== undefined) {
811
+ const expectedModule = (_a = map[markerName].memberAccessInfo) === null || _a === void 0 ? void 0 : _a.lastKnownModule;
812
+ const expectedType = (_b = map[markerName].memberAccessInfo) === null || _b === void 0 ? void 0 : _b.lastKnownMemberName;
813
+ const expectedName = (_c = map[markerName].memberAccessInfo) === null || _c === void 0 ? void 0 : _c.unknownMemberName;
814
+ if (((_d = result === null || result === void 0 ? void 0 : result.memberAccessInfo) === null || _d === void 0 ? void 0 : _d.lastKnownModule) !== expectedModule ||
815
+ ((_e = result === null || result === void 0 ? void 0 : result.memberAccessInfo) === null || _e === void 0 ? void 0 : _e.lastKnownMemberName) !== expectedType ||
816
+ ((_f = result === null || result === void 0 ? void 0 : result.memberAccessInfo) === null || _f === void 0 ? void 0 : _f.unknownMemberName) !== expectedName) {
817
+ assert_1.default.fail(`${markerName} - Expected completion results memberAccessInfo with \n lastKnownModule: "${expectedModule}"\n lastKnownMemberName: "${expectedType}"\n unknownMemberName: "${expectedName}"\n Actual memberAccessInfo:\n lastKnownModule: "${(_h = (_g = result.memberAccessInfo) === null || _g === void 0 ? void 0 : _g.lastKnownModule) !== null && _h !== void 0 ? _h : ''}"\n lastKnownMemberName: "${(_k = (_j = result.memberAccessInfo) === null || _j === void 0 ? void 0 : _j.lastKnownMemberName) !== null && _k !== void 0 ? _k : ''}\n unknownMemberName: "${(_m = (_l = result.memberAccessInfo) === null || _l === void 0 ? void 0 : _l.unknownMemberName) !== null && _m !== void 0 ? _m : ''}" `);
818
+ }
819
+ }
820
+ }
821
+ }
822
+ verifySignature(docFormat, map) {
823
+ this._analyze();
824
+ for (const marker of this.getMarkers()) {
825
+ const fileName = marker.fileName;
826
+ const name = this.getMarkerName(marker);
827
+ if (!(name in map)) {
828
+ continue;
829
+ }
830
+ const expected = map[name];
831
+ const position = this.convertOffsetToPosition(fileName, marker.position);
832
+ const actual = this.program.getSignatureHelpForPosition(fileName, position, docFormat, vscode_languageserver_1.CancellationToken.None);
833
+ if (expected.noSig) {
834
+ assert_1.default.equal(actual, undefined);
835
+ continue;
836
+ }
837
+ assert_1.default.ok(actual);
838
+ assert_1.default.ok(actual.signatures);
839
+ assert_1.default.ok(expected.activeParameters);
840
+ assert_1.default.equal(actual.signatures.length, expected.activeParameters.length);
841
+ actual.signatures.forEach((sig, index) => {
842
+ const expectedSig = expected.signatures[index];
843
+ assert_1.default.equal(sig.label, expectedSig.label);
844
+ assert_1.default.ok(sig.parameters);
845
+ const actualParameters = [];
846
+ sig.parameters.forEach((p) => {
847
+ actualParameters.push(sig.label.substring(p.startOffset, p.endOffset));
848
+ });
849
+ assert_1.default.deepEqual(actualParameters, expectedSig.parameters);
850
+ if (expectedSig.documentation === undefined) {
851
+ assert_1.default.equal(sig.documentation, undefined);
852
+ }
853
+ else {
854
+ assert_1.default.deepEqual(sig.documentation, {
855
+ kind: docFormat,
856
+ value: expectedSig.documentation,
857
+ });
858
+ }
859
+ });
860
+ assert_1.default.deepEqual(actual.signatures.map((sig) => sig.activeParameter), expected.activeParameters);
861
+ if (expected.callHasParameters !== undefined) {
862
+ assert_1.default.equal(actual.callHasParameters, expected.callHasParameters);
863
+ }
864
+ }
865
+ }
866
+ verifyFindAllReferences(map) {
867
+ var _a;
868
+ this._analyze();
869
+ for (const marker of this.getMarkers()) {
870
+ const fileName = marker.fileName;
871
+ const name = this.getMarkerName(marker);
872
+ if (!(name in map)) {
873
+ continue;
874
+ }
875
+ const expected = map[name].references;
876
+ const position = this.convertOffsetToPosition(fileName, marker.position);
877
+ const actual = [];
878
+ this.program.reportReferencesForPosition(fileName, position, true, (locs) => (0, collectionUtils_1.appendArray)(actual, locs), vscode_languageserver_1.CancellationToken.None);
879
+ assert_1.default.strictEqual((_a = actual === null || actual === void 0 ? void 0 : actual.length) !== null && _a !== void 0 ? _a : 0, expected.length, `${name} has failed`);
880
+ for (const r of expected) {
881
+ assert_1.default.equal(actual === null || actual === void 0 ? void 0 : actual.filter((d) => this._deepEqual(d, r)).length, 1);
882
+ }
883
+ }
884
+ }
885
+ getDocumentHighlightKind(m) {
886
+ const kind = (m === null || m === void 0 ? void 0 : m.data) ? m.data.kind : undefined;
887
+ switch (kind) {
888
+ case 'text':
889
+ return vscode_languageserver_1.DocumentHighlightKind.Text;
890
+ case 'read':
891
+ return vscode_languageserver_1.DocumentHighlightKind.Read;
892
+ case 'write':
893
+ return vscode_languageserver_1.DocumentHighlightKind.Write;
894
+ default:
895
+ return undefined;
896
+ }
897
+ }
898
+ verifyHighlightReferences(map) {
899
+ var _a;
900
+ this._analyze();
901
+ for (const name of Object.keys(map)) {
902
+ const marker = this.getMarkerByName(name);
903
+ const fileName = marker.fileName;
904
+ const expected = map[name].references;
905
+ const position = this.convertOffsetToPosition(fileName, marker.position);
906
+ const actual = this.program.getDocumentHighlight(fileName, position, vscode_languageserver_1.CancellationToken.None);
907
+ assert_1.default.equal((_a = actual === null || actual === void 0 ? void 0 : actual.length) !== null && _a !== void 0 ? _a : 0, expected.length);
908
+ for (const r of expected) {
909
+ const match = actual === null || actual === void 0 ? void 0 : actual.filter((h) => this._deepEqual(h.range, r.range));
910
+ assert_1.default.equal(match === null || match === void 0 ? void 0 : match.length, 1);
911
+ if (r.kind) {
912
+ assert_1.default.equal(match[0].kind, r.kind);
913
+ }
914
+ }
915
+ }
916
+ }
917
+ verifyFindDefinitions(map, filter = definitionProvider_1.DefinitionFilter.All) {
918
+ var _a;
919
+ this._analyze();
920
+ for (const marker of this.getMarkers()) {
921
+ const fileName = marker.fileName;
922
+ const name = this.getMarkerName(marker);
923
+ if (!(name in map)) {
924
+ continue;
925
+ }
926
+ const expected = map[name].definitions;
927
+ const position = this.convertOffsetToPosition(fileName, marker.position);
928
+ const actual = this.program.getDefinitionsForPosition(fileName, position, filter, vscode_languageserver_1.CancellationToken.None);
929
+ assert_1.default.equal((_a = actual === null || actual === void 0 ? void 0 : actual.length) !== null && _a !== void 0 ? _a : 0, expected.length);
930
+ for (const r of expected) {
931
+ assert_1.default.equal(actual === null || actual === void 0 ? void 0 : actual.filter((d) => this._deepEqual(d, r)).length, 1);
932
+ }
933
+ }
934
+ }
935
+ verifyFindTypeDefinitions(map) {
936
+ var _a;
937
+ this._analyze();
938
+ for (const marker of this.getMarkers()) {
939
+ const fileName = marker.fileName;
940
+ const name = this.getMarkerName(marker);
941
+ if (!(name in map)) {
942
+ continue;
943
+ }
944
+ const expected = map[name].definitions;
945
+ const position = this.convertOffsetToPosition(fileName, marker.position);
946
+ const actual = this.program.getTypeDefinitionsForPosition(fileName, position, vscode_languageserver_1.CancellationToken.None);
947
+ assert_1.default.strictEqual((_a = actual === null || actual === void 0 ? void 0 : actual.length) !== null && _a !== void 0 ? _a : 0, expected.length, name);
948
+ for (const r of expected) {
949
+ assert_1.default.strictEqual(actual === null || actual === void 0 ? void 0 : actual.filter((d) => this._deepEqual(d, r)).length, 1, name);
950
+ }
951
+ }
952
+ }
953
+ verifyRename(map) {
954
+ var _a;
955
+ this._analyze();
956
+ for (const marker of this.getMarkers()) {
957
+ const fileName = marker.fileName;
958
+ const name = this.getMarkerName(marker);
959
+ if (!(name in map)) {
960
+ continue;
961
+ }
962
+ const expected = map[name];
963
+ const position = this.convertOffsetToPosition(fileName, marker.position);
964
+ const actual = this.program.renameSymbolAtPosition(fileName, position, expected.newName,
965
+ /* isDefaultWorkspace */ false,
966
+ /* allowModuleRename */ false, vscode_languageserver_1.CancellationToken.None);
967
+ assert_1.default.equal((_a = actual === null || actual === void 0 ? void 0 : actual.edits.length) !== null && _a !== void 0 ? _a : 0, expected.changes.length);
968
+ for (const c of expected.changes) {
969
+ assert_1.default.equal(actual === null || actual === void 0 ? void 0 : actual.edits.filter((e) => this._deepEqual(e, c)).length, 1);
970
+ }
971
+ }
972
+ }
973
+ setCancelled(numberOfCalls) {
974
+ this._cancellationToken.setCancelled(numberOfCalls);
975
+ }
976
+ resetCancelled() {
977
+ this._cancellationToken.resetCancelled();
978
+ }
979
+ _isConfig(file, ignoreCase) {
980
+ const comparer = (0, stringUtils_1.getStringComparer)(ignoreCase);
981
+ return service_1.configFileNames.some((f) => comparer((0, pathUtils_1.getBaseFileName)(file.fileName), f) === 0 /* EqualTo */);
982
+ }
983
+ _convertGlobalOptionsToConfigOptions(globalOptions, mountPaths) {
984
+ var _a;
985
+ const srtRoot = "projectroot" /* projectRoot */;
986
+ const projectRoot = (0, pathUtils_1.normalizeSlashes)((_a = globalOptions[srtRoot]) !== null && _a !== void 0 ? _a : vfs.MODULE_PATH);
987
+ const configOptions = new configOptions_1.ConfigOptions(projectRoot);
988
+ // add more global options as we need them
989
+ return this._applyTestConfigOptions(configOptions, mountPaths);
990
+ }
991
+ _applyTestConfigOptions(configOptions, mountPaths) {
992
+ // Always enable "test mode".
993
+ configOptions.internalTestMode = true;
994
+ // Always analyze all files
995
+ configOptions.checkOnlyOpenFiles = false;
996
+ // make sure we set typing path
997
+ if (configOptions.stubPath === undefined) {
998
+ configOptions.stubPath = (0, pathUtils_1.normalizePath)((0, pathUtils_1.combinePaths)(vfs.MODULE_PATH, 'typings'));
999
+ }
1000
+ configOptions.include.push((0, pathUtils_1.getFileSpec)(this.fs, configOptions.projectRoot, '.'));
1001
+ configOptions.exclude.push((0, pathUtils_1.getFileSpec)(this.fs, configOptions.projectRoot, factory_1.typeshedFolder));
1002
+ configOptions.exclude.push((0, pathUtils_1.getFileSpec)(this.fs, configOptions.projectRoot, factory_1.distlibFolder));
1003
+ configOptions.exclude.push((0, pathUtils_1.getFileSpec)(this.fs, configOptions.projectRoot, factory_1.libFolder));
1004
+ if (mountPaths) {
1005
+ for (const mountPath of mountPaths.keys()) {
1006
+ configOptions.exclude.push((0, pathUtils_1.getFileSpec)(this.fs, configOptions.projectRoot, mountPath));
1007
+ }
1008
+ }
1009
+ return configOptions;
1010
+ }
1011
+ _getFileContent(fileName) {
1012
+ const files = this.testData.files.filter((f) => (0, pathUtils_1.comparePaths)(f.fileName, fileName, this.testFS.ignoreCase) === 0 /* EqualTo */);
1013
+ return files[0].content;
1014
+ }
1015
+ convertPositionToOffset(fileName, position) {
1016
+ const lines = this._getTextRangeCollection(fileName);
1017
+ return (0, positionUtils_1.convertPositionToOffset)(position, lines);
1018
+ }
1019
+ convertOffsetToPosition(fileName, offset) {
1020
+ const lines = this._getTextRangeCollection(fileName);
1021
+ return (0, positionUtils_1.convertOffsetToPosition)(offset, lines);
1022
+ }
1023
+ convertOffsetsToRange(fileName, startOffset, endOffset) {
1024
+ const lines = this._getTextRangeCollection(fileName);
1025
+ return {
1026
+ start: (0, positionUtils_1.convertOffsetToPosition)(startOffset, lines),
1027
+ end: (0, positionUtils_1.convertOffsetToPosition)(endOffset, lines),
1028
+ };
1029
+ }
1030
+ _getParseResult(fileName) {
1031
+ const file = this.program.getBoundSourceFile(fileName);
1032
+ return file.getParseResults();
1033
+ }
1034
+ _getTextRangeCollection(fileName) {
1035
+ if (fileName in this._files) {
1036
+ return this._getParseResult(fileName).tokenizerOutput.lines;
1037
+ }
1038
+ // slow path
1039
+ const fileContents = this.fs.readFileSync(fileName, 'utf8');
1040
+ const tokenizer = new tokenizer_1.Tokenizer();
1041
+ return tokenizer.tokenize(fileContents).lines;
1042
+ }
1043
+ raiseError(message) {
1044
+ throw new Error(this._messageAtLastKnownMarker(message));
1045
+ }
1046
+ _messageAtLastKnownMarker(message) {
1047
+ const locationDescription = this.lastKnownMarker
1048
+ ? this.lastKnownMarker
1049
+ : this._getLineColStringAtPosition(this.currentCaretPosition);
1050
+ return `At ${locationDescription}: ${message}`;
1051
+ }
1052
+ _checkPostEditInvariants() {
1053
+ // blank for now
1054
+ }
1055
+ _editScriptAndUpdateMarkers(fileName, editStart, editEnd, newText) {
1056
+ // this.languageServiceAdapterHost.editScript(fileName, editStart, editEnd, newText);
1057
+ for (const marker of this.testData.markers) {
1058
+ if (marker.fileName === fileName) {
1059
+ marker.position = this._updatePosition(marker.position, editStart, editEnd, newText);
1060
+ }
1061
+ }
1062
+ for (const range of this.testData.ranges) {
1063
+ if (range.fileName === fileName) {
1064
+ range.pos = this._updatePosition(range.pos, editStart, editEnd, newText);
1065
+ range.end = this._updatePosition(range.end, editStart, editEnd, newText);
1066
+ }
1067
+ }
1068
+ this.testData.rangesByText = undefined;
1069
+ }
1070
+ _removeWhitespace(text) {
1071
+ return text.replace(/\s/g, '');
1072
+ }
1073
+ createMultiMap(values, getKey) {
1074
+ const map = new Map();
1075
+ map.add = multiMapAdd;
1076
+ map.remove = multiMapRemove;
1077
+ if (values && getKey) {
1078
+ for (const value of values) {
1079
+ map.add(getKey(value), value);
1080
+ }
1081
+ }
1082
+ return map;
1083
+ function multiMapAdd(key, value) {
1084
+ let values = this.get(key);
1085
+ if (values) {
1086
+ values.push(value);
1087
+ }
1088
+ else {
1089
+ this.set(key, (values = [value]));
1090
+ }
1091
+ return values;
1092
+ }
1093
+ function multiMapRemove(key, value) {
1094
+ const values = this.get(key);
1095
+ if (values) {
1096
+ values.forEach((v, i, arr) => {
1097
+ if (v === value) {
1098
+ arr.splice(i, 1);
1099
+ }
1100
+ });
1101
+ if (!values.length) {
1102
+ this.delete(key);
1103
+ }
1104
+ }
1105
+ }
1106
+ }
1107
+ _rangeText({ fileName, pos, end }) {
1108
+ return this._getFileContent(fileName).slice(pos, end);
1109
+ }
1110
+ _getOnlyRange() {
1111
+ const ranges = this.getRanges();
1112
+ if (ranges.length !== 1) {
1113
+ this.raiseError('Exactly one range should be specified in the test file.');
1114
+ }
1115
+ return ranges[0];
1116
+ }
1117
+ _verifyFileContent(fileName, text) {
1118
+ const actual = this._getFileContent(fileName);
1119
+ if (actual !== text) {
1120
+ throw new Error(`verifyFileContent failed:\n${this._showTextDiff(text, actual)}`);
1121
+ }
1122
+ }
1123
+ _verifyTextMatches(actualText, includeWhitespace, expectedText) {
1124
+ const removeWhitespace = (s) => (includeWhitespace ? s : this._removeWhitespace(s));
1125
+ if (removeWhitespace(actualText) !== removeWhitespace(expectedText)) {
1126
+ this.raiseError(`Actual range text doesn't match expected text.\n${this._showTextDiff(expectedText, actualText)}`);
1127
+ }
1128
+ }
1129
+ _getSelection() {
1130
+ return textRange_1.TextRange.fromBounds(this.currentCaretPosition, this.selectionEnd === -1 ? this.currentCaretPosition : this.selectionEnd);
1131
+ }
1132
+ _getLineContent(index) {
1133
+ const text = this._getFileContent(this.activeFile.fileName);
1134
+ const pos = this.convertPositionToOffset(this.activeFile.fileName, { line: index, character: 0 });
1135
+ let startPos = pos;
1136
+ let endPos = pos;
1137
+ while (startPos > 0) {
1138
+ const ch = text.charCodeAt(startPos - 1);
1139
+ if (ch === 13 /* CarriageReturn */ || ch === 10 /* LineFeed */) {
1140
+ break;
1141
+ }
1142
+ startPos--;
1143
+ }
1144
+ while (endPos < text.length) {
1145
+ const ch = text.charCodeAt(endPos);
1146
+ if (ch === 13 /* CarriageReturn */ || ch === 10 /* LineFeed */) {
1147
+ break;
1148
+ }
1149
+ endPos++;
1150
+ }
1151
+ return text.substring(startPos, endPos);
1152
+ }
1153
+ // Get the text of the entire line the caret is currently at
1154
+ _getCurrentLineContent() {
1155
+ return this._getLineContent(this.convertOffsetToPosition(this.activeFile.fileName, this.currentCaretPosition).line);
1156
+ }
1157
+ _findFile(indexOrName) {
1158
+ if (typeof indexOrName === 'number') {
1159
+ const index = indexOrName;
1160
+ if (index >= this.testData.files.length) {
1161
+ throw new Error(`File index (${index}) in openFile was out of range. There are only ${this.testData.files.length} files in this test.`);
1162
+ }
1163
+ else {
1164
+ return this.testData.files[index];
1165
+ }
1166
+ }
1167
+ else if ((0, core_1.isString)(indexOrName)) {
1168
+ const { file, availableNames } = this._tryFindFileWorker(indexOrName);
1169
+ if (!file) {
1170
+ throw new Error(`No test file named "${indexOrName}" exists. Available file names are: ${availableNames.join(', ')}`);
1171
+ }
1172
+ return file;
1173
+ }
1174
+ else {
1175
+ return debug.assertNever(indexOrName);
1176
+ }
1177
+ }
1178
+ _tryFindFileWorker(name) {
1179
+ name = (0, pathUtils_1.normalizePath)(name);
1180
+ let file;
1181
+ const availableNames = [];
1182
+ this.testData.files.forEach((f) => {
1183
+ const fn = (0, pathUtils_1.normalizePath)(f.fileName);
1184
+ if (fn) {
1185
+ if (fn === name) {
1186
+ file = f;
1187
+ }
1188
+ availableNames.push(fn);
1189
+ }
1190
+ });
1191
+ assert_1.default.ok(file);
1192
+ return { file, availableNames };
1193
+ }
1194
+ _getLineColStringAtPosition(position, file = this.activeFile) {
1195
+ const pos = this.convertOffsetToPosition(file.fileName, position);
1196
+ return `line ${pos.line + 1}, col ${pos.character}`;
1197
+ }
1198
+ _showTextDiff(expected, actual) {
1199
+ // Only show whitespace if the difference is whitespace-only.
1200
+ if (this._differOnlyByWhitespace(expected, actual)) {
1201
+ expected = this._makeWhitespaceVisible(expected);
1202
+ actual = this._makeWhitespaceVisible(actual);
1203
+ }
1204
+ return this._displayExpectedAndActualString(expected, actual);
1205
+ }
1206
+ _differOnlyByWhitespace(a, b) {
1207
+ return this._removeWhitespace(a) === this._removeWhitespace(b);
1208
+ }
1209
+ _displayExpectedAndActualString(expected, actual, quoted = false) {
1210
+ const expectMsg = '\x1b[1mExpected\x1b[0m\x1b[31m';
1211
+ const actualMsg = '\x1b[1mActual\x1b[0m\x1b[31m';
1212
+ const expectedString = quoted ? '"' + expected + '"' : expected;
1213
+ const actualString = quoted ? '"' + actual + '"' : actual;
1214
+ return `\n${expectMsg}:\n${expectedString}\n\n${actualMsg}:\n${actualString}`;
1215
+ }
1216
+ _makeWhitespaceVisible(text) {
1217
+ return text
1218
+ .replace(/ /g, '\u00B7')
1219
+ .replace(/\r/g, '\u00B6')
1220
+ .replace(/\n/g, '\u2193\n')
1221
+ .replace(/\t/g, '\u2192 ');
1222
+ }
1223
+ _updatePosition(position, editStart, editEnd, { length }) {
1224
+ // If inside the edit, return -1 to mark as invalid
1225
+ return position <= editStart ? position : position < editEnd ? -1 : position + length - +(editEnd - editStart);
1226
+ }
1227
+ _analyze() {
1228
+ while (this.program.analyze()) {
1229
+ // Continue to call analyze until it completes. Since we're not
1230
+ // specifying a timeout, it should complete the first time.
1231
+ }
1232
+ }
1233
+ _getDiagnosticsPerFile() {
1234
+ const sourceFiles = this._files.map((f) => this.program.getSourceFile(f));
1235
+ const results = sourceFiles.map((sourceFile, index) => {
1236
+ if (sourceFile) {
1237
+ const diagnostics = sourceFile.getDiagnostics(this.configOptions) || [];
1238
+ const filePath = sourceFile.getFilePath();
1239
+ const value = {
1240
+ filePath,
1241
+ parseResults: sourceFile.getParseResults(),
1242
+ errors: diagnostics.filter((diag) => diag.category === 0 /* Error */),
1243
+ warnings: diagnostics.filter((diag) => diag.category === 1 /* Warning */),
1244
+ information: diagnostics.filter((diag) => diag.category === 2 /* Information */),
1245
+ };
1246
+ return [filePath, value];
1247
+ }
1248
+ else {
1249
+ this.raiseError(`Source file not found for ${this._files[index]}`);
1250
+ }
1251
+ });
1252
+ return new Map(results);
1253
+ }
1254
+ _createAnalysisService(nullConsole, importResolverFactory, configOptions) {
1255
+ // we do not initiate automatic analysis or file watcher in test.
1256
+ const service = new service_1.AnalyzerService('test service', this.fs, nullConsole, () => testAccessHost, importResolverFactory, configOptions);
1257
+ // directly set files to track rather than using fileSpec from config
1258
+ // to discover those files from file system
1259
+ service.test_program.setTrackedFiles(this._files
1260
+ .filter((path) => {
1261
+ const fileExtension = (0, pathUtils_1.getFileExtension)(path).toLowerCase();
1262
+ return fileExtension === '.py' || fileExtension === '.pyi';
1263
+ })
1264
+ .filter((path) => service.isTracked(path)));
1265
+ return service;
1266
+ }
1267
+ _deepEqual(a, e) {
1268
+ try {
1269
+ // NOTE: find better way.
1270
+ assert_1.default.deepStrictEqual(a, e);
1271
+ }
1272
+ catch {
1273
+ return false;
1274
+ }
1275
+ return true;
1276
+ }
1277
+ async _waitForFile(filePath) {
1278
+ while (!this.fs.existsSync(filePath)) {
1279
+ await new Promise((res) => setTimeout(() => {
1280
+ res();
1281
+ }, 200));
1282
+ }
1283
+ }
1284
+ _getCodeActions(range) {
1285
+ const file = range.fileName;
1286
+ const textRange = {
1287
+ start: this.convertOffsetToPosition(file, range.pos),
1288
+ end: this.convertOffsetToPosition(file, range.end),
1289
+ };
1290
+ return this._hostSpecificFeatures.getCodeActionsForPosition(this.workspace, file, textRange, vscode_languageserver_1.CancellationToken.None);
1291
+ }
1292
+ async _verifyFiles(files) {
1293
+ for (const filePath of Object.keys(files)) {
1294
+ const expected = files[filePath];
1295
+ const normalizedFilePath = (0, pathUtils_1.normalizeSlashes)(filePath);
1296
+ // wait until the file exists
1297
+ await this._waitForFile(normalizedFilePath);
1298
+ const actual = this.fs.readFileSync(normalizedFilePath, 'utf8');
1299
+ if (actual !== expected) {
1300
+ this.raiseError(`doesn't contain expected result: ${(0, utils_1.stringify)(expected)}, actual: ${(0, utils_1.stringify)(actual)}`);
1301
+ }
1302
+ }
1303
+ }
1304
+ _editsAreEqual(actual, expected) {
1305
+ if (actual === expected) {
1306
+ return true;
1307
+ }
1308
+ if (actual === undefined || expected === undefined) {
1309
+ return false;
1310
+ }
1311
+ return (0, textRange_1.rangesAreEqual)(actual.range, expected.range) && actual.newText === expected.newText;
1312
+ }
1313
+ _verifyEdit(actual, expected) {
1314
+ if (!this._editsAreEqual(actual, expected)) {
1315
+ this.raiseError(`doesn't contain expected result: ${(0, utils_1.stringify)(expected)}, actual: ${(0, utils_1.stringify)(actual)}`);
1316
+ }
1317
+ }
1318
+ _verifyEdits(actual, expected) {
1319
+ actual = actual !== null && actual !== void 0 ? actual : [];
1320
+ expected = expected !== null && expected !== void 0 ? expected : [];
1321
+ let extra = expected.slice(0);
1322
+ let left = actual.slice(0);
1323
+ for (const item of actual) {
1324
+ extra = extra.filter((e) => !this._editsAreEqual(e, item));
1325
+ }
1326
+ for (const item of expected) {
1327
+ left = left.filter((e) => !this._editsAreEqual(e, item));
1328
+ }
1329
+ if (extra.length > 0 || left.length > 0) {
1330
+ this.raiseError(`doesn't contain expected result: ${(0, utils_1.stringify)(extra)}, actual: ${(0, utils_1.stringify)(left)}`);
1331
+ }
1332
+ }
1333
+ verifyCompletionItem(expected, actual) {
1334
+ var _a;
1335
+ assert_1.default.strictEqual(actual.label, expected.label);
1336
+ assert_1.default.strictEqual(actual.detail, expected.detail);
1337
+ assert_1.default.strictEqual(actual.kind, expected.kind);
1338
+ assert_1.default.strictEqual(actual.insertText, expected.insertionText);
1339
+ this._verifyEdit(actual.textEdit, expected.textEdit);
1340
+ this._verifyEdits(actual.additionalTextEdits, expected.additionalTextEdits);
1341
+ if (expected.detailDescription !== undefined) {
1342
+ assert_1.default.strictEqual((_a = actual.labelDetails) === null || _a === void 0 ? void 0 : _a.description, expected.detailDescription);
1343
+ }
1344
+ }
1345
+ }
1346
+ exports.TestState = TestState;
1347
+ function parseAndGetTestState(code, projectRoot = '/', anonymousFileName = 'unnamedFile.py') {
1348
+ const data = (0, fourSlashParser_1.parseTestData)((0, pathUtils_1.normalizeSlashes)(projectRoot), code, anonymousFileName);
1349
+ const state = new TestState((0, pathUtils_1.normalizeSlashes)('/'), data);
1350
+ return { data, state };
1351
+ }
1352
+ exports.parseAndGetTestState = parseAndGetTestState;
1353
+ function getNodeForRange(codeOrState, markerName = 'marker') {
1354
+ const state = (0, core_1.isString)(codeOrState) ? parseAndGetTestState(codeOrState).state : codeOrState;
1355
+ const range = state.getRangeByMarkerName(markerName);
1356
+ (0, assert_1.default)(range);
1357
+ const textRange = textRange_1.TextRange.fromBounds(range.pos, range.end);
1358
+ const node = getNodeAtMarker(state, markerName);
1359
+ let current = node;
1360
+ while (current) {
1361
+ if (textRange_1.TextRange.containsRange(current, textRange)) {
1362
+ return current;
1363
+ }
1364
+ current = current.parent;
1365
+ }
1366
+ return node;
1367
+ }
1368
+ exports.getNodeForRange = getNodeForRange;
1369
+ function getNodeAtMarker(codeOrState, markerName = 'marker') {
1370
+ const state = (0, core_1.isString)(codeOrState) ? parseAndGetTestState(codeOrState).state : codeOrState;
1371
+ const marker = state.getMarkerByName(markerName);
1372
+ const sourceFile = state.program.getBoundSourceFile(marker.fileName);
1373
+ (0, assert_1.default)(sourceFile);
1374
+ const parserResults = sourceFile.getParseResults();
1375
+ (0, assert_1.default)(parserResults);
1376
+ const node = (0, parseTreeUtils_1.findNodeByOffset)(parserResults.parseTree, marker.position);
1377
+ (0, assert_1.default)(node);
1378
+ return node;
1379
+ }
1380
+ exports.getNodeAtMarker = getNodeAtMarker;
1381
+ //# sourceMappingURL=testState.js.map