@zzzen/pyright-internal 1.2.0-dev.20240818 → 1.2.0-dev.20240901

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 (877) hide show
  1. package/dist/analyzer/analyzerFileInfo.d.ts +1 -0
  2. package/dist/analyzer/analyzerFileInfo.js.map +1 -1
  3. package/dist/analyzer/checker.js +2 -4
  4. package/dist/analyzer/checker.js.map +1 -1
  5. package/dist/analyzer/codeFlowEngine.js +16 -1
  6. package/dist/analyzer/codeFlowEngine.js.map +1 -1
  7. package/dist/analyzer/constraintSolution.d.ts +1 -2
  8. package/dist/analyzer/constraintSolution.js +1 -4
  9. package/dist/analyzer/constraintSolution.js.map +1 -1
  10. package/dist/analyzer/constraintSolver.js +2 -1
  11. package/dist/analyzer/constraintSolver.js.map +1 -1
  12. package/dist/analyzer/constraintTracker.js.map +1 -1
  13. package/dist/analyzer/constructorTransform.d.ts +1 -1
  14. package/dist/analyzer/constructorTransform.js +8 -8
  15. package/dist/analyzer/constructorTransform.js.map +1 -1
  16. package/dist/analyzer/constructors.js +10 -8
  17. package/dist/analyzer/constructors.js.map +1 -1
  18. package/dist/analyzer/dataClasses.js +9 -1
  19. package/dist/analyzer/dataClasses.js.map +1 -1
  20. package/dist/analyzer/declarationUtils.d.ts +1 -1
  21. package/dist/analyzer/declarationUtils.js +9 -2
  22. package/dist/analyzer/declarationUtils.js.map +1 -1
  23. package/dist/analyzer/importResolver.d.ts +1 -1
  24. package/dist/analyzer/importResolver.js.map +1 -1
  25. package/dist/analyzer/operations.js +58 -53
  26. package/dist/analyzer/operations.js.map +1 -1
  27. package/dist/analyzer/parseTreeUtils.js +1 -1
  28. package/dist/analyzer/parseTreeUtils.js.map +1 -1
  29. package/dist/analyzer/parseTreeWalker.d.ts +2 -2
  30. package/dist/analyzer/parseTreeWalker.js +5 -5
  31. package/dist/analyzer/parseTreeWalker.js.map +1 -1
  32. package/dist/analyzer/service.d.ts +1 -1
  33. package/dist/analyzer/service.js +41 -42
  34. package/dist/analyzer/service.js.map +1 -1
  35. package/dist/analyzer/sourceFile.d.ts +2 -0
  36. package/dist/analyzer/sourceFile.js +21 -0
  37. package/dist/analyzer/sourceFile.js.map +1 -1
  38. package/dist/analyzer/typeEvaluator.js +330 -250
  39. package/dist/analyzer/typeEvaluator.js.map +1 -1
  40. package/dist/analyzer/typeEvaluatorTypes.js +1 -1
  41. package/dist/analyzer/typeEvaluatorTypes.js.map +1 -1
  42. package/dist/analyzer/typePrinter.js +128 -154
  43. package/dist/analyzer/typePrinter.js.map +1 -1
  44. package/dist/analyzer/typePrinterUtils.d.ts +2 -0
  45. package/dist/analyzer/typePrinterUtils.js +49 -0
  46. package/dist/analyzer/typePrinterUtils.js.map +1 -0
  47. package/dist/analyzer/typeUtils.d.ts +4 -4
  48. package/dist/analyzer/typeUtils.js +27 -22
  49. package/dist/analyzer/typeUtils.js.map +1 -1
  50. package/dist/analyzer/types.d.ts +5 -3
  51. package/dist/analyzer/types.js +3 -3
  52. package/dist/analyzer/types.js.map +1 -1
  53. package/dist/common/commandLineOptions.d.ts +4 -0
  54. package/dist/common/commandLineOptions.js.map +1 -1
  55. package/dist/common/configOptions.d.ts +5 -2
  56. package/dist/common/configOptions.js +40 -33
  57. package/dist/common/configOptions.js.map +1 -1
  58. package/dist/common/extensions.d.ts +1 -3
  59. package/dist/common/extensions.js +1 -0
  60. package/dist/common/extensions.js.map +1 -1
  61. package/dist/common/fileBasedCancellationUtils.js +3 -0
  62. package/dist/common/fileBasedCancellationUtils.js.map +1 -1
  63. package/dist/common/fullAccessHost.d.ts +8 -0
  64. package/dist/common/fullAccessHost.js +30 -7
  65. package/dist/common/fullAccessHost.js.map +1 -1
  66. package/dist/common/languageServerInterface.d.ts +2 -1
  67. package/dist/common/languageServerInterface.js.map +1 -1
  68. package/dist/common/lspUtils.d.ts +2 -1
  69. package/dist/common/lspUtils.js +8 -0
  70. package/dist/common/lspUtils.js.map +1 -1
  71. package/dist/common/pythonVersion.d.ts +1 -0
  72. package/dist/common/pythonVersion.js +16 -0
  73. package/dist/common/pythonVersion.js.map +1 -1
  74. package/dist/languageServerBase.d.ts +3 -52
  75. package/dist/languageServerBase.js +5 -92
  76. package/dist/languageServerBase.js.map +1 -1
  77. package/dist/languageService/analyzerServiceExecutor.js +1 -0
  78. package/dist/languageService/analyzerServiceExecutor.js.map +1 -1
  79. package/dist/languageService/completionProvider.js +3 -0
  80. package/dist/languageService/completionProvider.js.map +1 -1
  81. package/dist/languageService/documentSymbolCollector.js +1 -1
  82. package/dist/languageService/documentSymbolCollector.js.map +1 -1
  83. package/dist/languageService/fileWatcherDynamicFeature.d.ts +2 -2
  84. package/dist/languageService/fileWatcherDynamicFeature.js.map +1 -1
  85. package/dist/localization/localize.d.ts +8 -4
  86. package/dist/localization/localize.js +2 -2
  87. package/dist/localization/localize.js.map +1 -1
  88. package/dist/localization/package.nls.cs.json +8 -1
  89. package/dist/localization/package.nls.de.json +8 -1
  90. package/dist/localization/package.nls.en-us.json +166 -154
  91. package/dist/localization/package.nls.es.json +8 -1
  92. package/dist/localization/package.nls.fr.json +10 -3
  93. package/dist/localization/package.nls.it.json +9 -2
  94. package/dist/localization/package.nls.ja.json +14 -7
  95. package/dist/localization/package.nls.ko.json +8 -1
  96. package/dist/localization/package.nls.pl.json +8 -1
  97. package/dist/localization/package.nls.pt-br.json +8 -1
  98. package/dist/localization/package.nls.qps-ploc.json +12 -5
  99. package/dist/localization/package.nls.ru.json +9 -2
  100. package/dist/localization/package.nls.tr.json +8 -1
  101. package/dist/localization/package.nls.zh-cn.json +8 -1
  102. package/dist/localization/package.nls.zh-tw.json +8 -1
  103. package/dist/parser/parser.d.ts +7 -6
  104. package/dist/parser/parser.js +3 -5
  105. package/dist/parser/parser.js.map +1 -1
  106. package/dist/parser/tokenizer.js +3 -1
  107. package/dist/parser/tokenizer.js.map +1 -1
  108. package/dist/tests/completions.test.js +18 -0
  109. package/dist/tests/completions.test.js.map +1 -1
  110. package/dist/tests/config.test.js +7 -16
  111. package/dist/tests/config.test.js.map +1 -1
  112. package/dist/tests/fourslash/completions.autoimport.Lib.Found.Type.fourslash.d.ts +1 -0
  113. package/dist/tests/fourslash/completions.autoimport.Lib.Found.Type.fourslash.js +2 -1
  114. package/dist/tests/fourslash/completions.autoimport.Lib.Found.Type.fourslash.js.map +1 -1
  115. package/dist/tests/fourslash/completions.autoimport.Lib.Found.duplication.fourslash.d.ts +1 -0
  116. package/dist/tests/fourslash/completions.autoimport.Lib.Found.duplication.fourslash.js +2 -1
  117. package/dist/tests/fourslash/completions.autoimport.Lib.Found.duplication.fourslash.js.map +1 -1
  118. package/dist/tests/fourslash/completions.autoimport.Lib.NotFound.fourslash.d.ts +1 -0
  119. package/dist/tests/fourslash/completions.autoimport.Lib.NotFound.fourslash.js +2 -1
  120. package/dist/tests/fourslash/completions.autoimport.Lib.NotFound.fourslash.js.map +1 -1
  121. package/dist/tests/fourslash/completions.autoimport.disabled.fourslash.d.ts +1 -0
  122. package/dist/tests/fourslash/completions.autoimport.disabled.fourslash.js +2 -1
  123. package/dist/tests/fourslash/completions.autoimport.disabled.fourslash.js.map +1 -1
  124. package/dist/tests/fourslash/completions.autoimport.duplicates.fourslash.d.ts +1 -0
  125. package/dist/tests/fourslash/completions.autoimport.duplicates.fourslash.js +2 -1
  126. package/dist/tests/fourslash/completions.autoimport.duplicates.fourslash.js.map +1 -1
  127. package/dist/tests/fourslash/completions.autoimport.fourslash.d.ts +1 -0
  128. package/dist/tests/fourslash/completions.autoimport.fourslash.js +2 -1
  129. package/dist/tests/fourslash/completions.autoimport.fourslash.js.map +1 -1
  130. package/dist/tests/fourslash/completions.autoimport.fromImport.fourslash.d.ts +1 -0
  131. package/dist/tests/fourslash/completions.autoimport.fromImport.fourslash.js +2 -1
  132. package/dist/tests/fourslash/completions.autoimport.fromImport.fourslash.js.map +1 -1
  133. package/dist/tests/fourslash/completions.autoimport.lib.alias.fourslash.d.ts +1 -0
  134. package/dist/tests/fourslash/completions.autoimport.lib.alias.fourslash.js +2 -1
  135. package/dist/tests/fourslash/completions.autoimport.lib.alias.fourslash.js.map +1 -1
  136. package/dist/tests/fourslash/completions.autoimport.plainText.fourslash.d.ts +1 -0
  137. package/dist/tests/fourslash/completions.autoimport.plainText.fourslash.js +2 -1
  138. package/dist/tests/fourslash/completions.autoimport.plainText.fourslash.js.map +1 -1
  139. package/dist/tests/fourslash/completions.autoimport.shadow.fourslash.d.ts +1 -0
  140. package/dist/tests/fourslash/completions.autoimport.shadow.fourslash.js +2 -1
  141. package/dist/tests/fourslash/completions.autoimport.shadow.fourslash.js.map +1 -1
  142. package/dist/tests/fourslash/completions.autoimport.submodule.fourslash.d.ts +1 -0
  143. package/dist/tests/fourslash/completions.autoimport.submodule.fourslash.js +2 -1
  144. package/dist/tests/fourslash/completions.autoimport.submodule.fourslash.js.map +1 -1
  145. package/dist/tests/fourslash/completions.autoimport.topLevel.fourslash.d.ts +1 -0
  146. package/dist/tests/fourslash/completions.autoimport.topLevel.fourslash.js +2 -1
  147. package/dist/tests/fourslash/completions.autoimport.topLevel.fourslash.js.map +1 -1
  148. package/dist/tests/fourslash/completions.builtinDocstrings.fourslash.d.ts +1 -0
  149. package/dist/tests/fourslash/completions.builtinDocstrings.fourslash.js +2 -1
  150. package/dist/tests/fourslash/completions.builtinDocstrings.fourslash.js.map +1 -1
  151. package/dist/tests/fourslash/completions.builtinOverride.fourslash.d.ts +1 -0
  152. package/dist/tests/fourslash/completions.builtinOverride.fourslash.js +2 -1
  153. package/dist/tests/fourslash/completions.builtinOverride.fourslash.js.map +1 -1
  154. package/dist/tests/fourslash/completions.call.stringLiteral.fourslash.d.ts +1 -0
  155. package/dist/tests/fourslash/completions.call.stringLiteral.fourslash.js +2 -1
  156. package/dist/tests/fourslash/completions.call.stringLiteral.fourslash.js.map +1 -1
  157. package/dist/tests/fourslash/completions.call.typedDict.fourslash.d.ts +1 -0
  158. package/dist/tests/fourslash/completions.call.typedDict.fourslash.js +2 -1
  159. package/dist/tests/fourslash/completions.call.typedDict.fourslash.js.map +1 -1
  160. package/dist/tests/fourslash/completions.call.typedDict.list.fourslash.d.ts +1 -0
  161. package/dist/tests/fourslash/completions.call.typedDict.list.fourslash.js +2 -1
  162. package/dist/tests/fourslash/completions.call.typedDict.list.fourslash.js.map +1 -1
  163. package/dist/tests/fourslash/completions.call.typedDict.states.fourslash.d.ts +1 -0
  164. package/dist/tests/fourslash/completions.call.typedDict.states.fourslash.js +2 -1
  165. package/dist/tests/fourslash/completions.call.typedDict.states.fourslash.js.map +1 -1
  166. package/dist/tests/fourslash/completions.classVariable.fourslash.d.ts +1 -0
  167. package/dist/tests/fourslash/completions.classVariable.fourslash.js +2 -1
  168. package/dist/tests/fourslash/completions.classVariable.fourslash.js.map +1 -1
  169. package/dist/tests/fourslash/completions.comment.fourslash.d.ts +1 -0
  170. package/dist/tests/fourslash/completions.comment.fourslash.js +2 -1
  171. package/dist/tests/fourslash/completions.comment.fourslash.js.map +1 -1
  172. package/dist/tests/fourslash/completions.declNames.class.fourslash.d.ts +1 -0
  173. package/dist/tests/fourslash/completions.declNames.class.fourslash.js +2 -1
  174. package/dist/tests/fourslash/completions.declNames.class.fourslash.js.map +1 -1
  175. package/dist/tests/fourslash/completions.declNames.exception.fourslash.d.ts +1 -0
  176. package/dist/tests/fourslash/completions.declNames.exception.fourslash.js +2 -1
  177. package/dist/tests/fourslash/completions.declNames.exception.fourslash.js.map +1 -1
  178. package/dist/tests/fourslash/completions.declNames.for.fourslash.d.ts +1 -0
  179. package/dist/tests/fourslash/completions.declNames.for.fourslash.js +2 -1
  180. package/dist/tests/fourslash/completions.declNames.for.fourslash.js.map +1 -1
  181. package/dist/tests/fourslash/completions.declNames.importAlias.fourslash.d.ts +1 -0
  182. package/dist/tests/fourslash/completions.declNames.importAlias.fourslash.js +2 -1
  183. package/dist/tests/fourslash/completions.declNames.importAlias.fourslash.js.map +1 -1
  184. package/dist/tests/fourslash/completions.declNames.lambda.fourslash.d.ts +1 -0
  185. package/dist/tests/fourslash/completions.declNames.lambda.fourslash.js +2 -1
  186. package/dist/tests/fourslash/completions.declNames.lambda.fourslash.js.map +1 -1
  187. package/dist/tests/fourslash/completions.declNames.method.fourslash.d.ts +1 -0
  188. package/dist/tests/fourslash/completions.declNames.method.fourslash.js +2 -1
  189. package/dist/tests/fourslash/completions.declNames.method.fourslash.js.map +1 -1
  190. package/dist/tests/fourslash/completions.declNames.overload.fourslash.d.ts +1 -0
  191. package/dist/tests/fourslash/completions.declNames.overload.fourslash.js +2 -1
  192. package/dist/tests/fourslash/completions.declNames.overload.fourslash.js.map +1 -1
  193. package/dist/tests/fourslash/completions.declNames.topLevelOverload.fourslash.d.ts +1 -0
  194. package/dist/tests/fourslash/completions.declNames.topLevelOverload.fourslash.js +2 -1
  195. package/dist/tests/fourslash/completions.declNames.topLevelOverload.fourslash.js.map +1 -1
  196. package/dist/tests/fourslash/completions.dictionary.keys.complex.fourslash.d.ts +1 -0
  197. package/dist/tests/fourslash/completions.dictionary.keys.complex.fourslash.js +2 -1
  198. package/dist/tests/fourslash/completions.dictionary.keys.complex.fourslash.js.map +1 -1
  199. package/dist/tests/fourslash/completions.dictionary.keys.expression.fourslash.d.ts +1 -0
  200. package/dist/tests/fourslash/completions.dictionary.keys.expression.fourslash.js +2 -1
  201. package/dist/tests/fourslash/completions.dictionary.keys.expression.fourslash.js.map +1 -1
  202. package/dist/tests/fourslash/completions.dictionary.keys.literalTypes.fourslash.d.ts +1 -0
  203. package/dist/tests/fourslash/completions.dictionary.keys.literalTypes.fourslash.js +2 -1
  204. package/dist/tests/fourslash/completions.dictionary.keys.literalTypes.fourslash.js.map +1 -1
  205. package/dist/tests/fourslash/completions.dictionary.keys.simple.fourslash.d.ts +1 -0
  206. package/dist/tests/fourslash/completions.dictionary.keys.simple.fourslash.js +2 -1
  207. package/dist/tests/fourslash/completions.dictionary.keys.simple.fourslash.js.map +1 -1
  208. package/dist/tests/fourslash/completions.dictionary.keys.stringLiterals.fourslash.d.ts +1 -0
  209. package/dist/tests/fourslash/completions.dictionary.keys.stringLiterals.fourslash.js +2 -1
  210. package/dist/tests/fourslash/completions.dictionary.keys.stringLiterals.fourslash.js.map +1 -1
  211. package/dist/tests/fourslash/completions.dictionary.keys.symbols.fourslash.d.ts +1 -0
  212. package/dist/tests/fourslash/completions.dictionary.keys.symbols.fourslash.js +2 -1
  213. package/dist/tests/fourslash/completions.dictionary.keys.symbols.fourslash.js.map +1 -1
  214. package/dist/tests/fourslash/completions.dunderNew.Inheritance.fourslash.d.ts +1 -0
  215. package/dist/tests/fourslash/completions.dunderNew.Inheritance.fourslash.js +2 -1
  216. package/dist/tests/fourslash/completions.dunderNew.Inheritance.fourslash.js.map +1 -1
  217. package/dist/tests/fourslash/completions.dunderNew.fourslash.d.ts +1 -0
  218. package/dist/tests/fourslash/completions.dunderNew.fourslash.js +2 -1
  219. package/dist/tests/fourslash/completions.dunderNew.fourslash.js.map +1 -1
  220. package/dist/tests/fourslash/completions.enums.members.fourslash.d.ts +1 -0
  221. package/dist/tests/fourslash/completions.enums.members.fourslash.js +2 -1
  222. package/dist/tests/fourslash/completions.enums.members.fourslash.js.map +1 -1
  223. package/dist/tests/fourslash/completions.errorNodes.fourslash.d.ts +1 -0
  224. package/dist/tests/fourslash/completions.errorNodes.fourslash.js +2 -1
  225. package/dist/tests/fourslash/completions.errorNodes.fourslash.js.map +1 -1
  226. package/dist/tests/fourslash/completions.excluded.fourslash.d.ts +1 -0
  227. package/dist/tests/fourslash/completions.excluded.fourslash.js +2 -1
  228. package/dist/tests/fourslash/completions.excluded.fourslash.js.map +1 -1
  229. package/dist/tests/fourslash/completions.fourslash.d.ts +1 -0
  230. package/dist/tests/fourslash/completions.fourslash.js +2 -1
  231. package/dist/tests/fourslash/completions.fourslash.js.map +1 -1
  232. package/dist/tests/fourslash/completions.fstring.fourslash.d.ts +1 -0
  233. package/dist/tests/fourslash/completions.fstring.fourslash.js +2 -1
  234. package/dist/tests/fourslash/completions.fstring.fourslash.js.map +1 -1
  235. package/dist/tests/fourslash/completions.fstring.stringLiteral.fourslash.d.ts +1 -0
  236. package/dist/tests/fourslash/completions.fstring.stringLiteral.fourslash.js +2 -1
  237. package/dist/tests/fourslash/completions.fstring.stringLiteral.fourslash.js.map +1 -1
  238. package/dist/tests/fourslash/completions.fuzzyMatching.fourslash.d.ts +1 -0
  239. package/dist/tests/fourslash/completions.fuzzyMatching.fourslash.js +2 -1
  240. package/dist/tests/fourslash/completions.fuzzyMatching.fourslash.js.map +1 -1
  241. package/dist/tests/fourslash/completions.import.dunderNames.fourslash.d.ts +1 -0
  242. package/dist/tests/fourslash/completions.import.dunderNames.fourslash.js +2 -1
  243. package/dist/tests/fourslash/completions.import.dunderNames.fourslash.js.map +1 -1
  244. package/dist/tests/fourslash/completions.import.duplicates.fourslash.d.ts +1 -0
  245. package/dist/tests/fourslash/completions.import.duplicates.fourslash.js +1 -0
  246. package/dist/tests/fourslash/completions.import.duplicates.fourslash.js.map +1 -1
  247. package/dist/tests/fourslash/completions.import.exactMatch.fourslash.d.ts +1 -0
  248. package/dist/tests/fourslash/completions.import.exactMatch.fourslash.js +2 -1
  249. package/dist/tests/fourslash/completions.import.exactMatch.fourslash.js.map +1 -1
  250. package/dist/tests/fourslash/completions.import.excludeAlreadyImported.fourslash.d.ts +1 -0
  251. package/dist/tests/fourslash/completions.import.excludeAlreadyImported.fourslash.js +2 -1
  252. package/dist/tests/fourslash/completions.import.excludeAlreadyImported.fourslash.js.map +1 -1
  253. package/dist/tests/fourslash/completions.import.interimFile.fourslash.disabled.d.ts +1 -0
  254. package/dist/tests/fourslash/completions.import.interimFile.fourslash.disabled.js +2 -1
  255. package/dist/tests/fourslash/completions.import.interimFile.fourslash.disabled.js.map +1 -1
  256. package/dist/tests/fourslash/completions.import.privateNoPytyped.fourslash.d.ts +1 -0
  257. package/dist/tests/fourslash/completions.import.privateNoPytyped.fourslash.js +1 -0
  258. package/dist/tests/fourslash/completions.import.privateNoPytyped.fourslash.js.map +1 -1
  259. package/dist/tests/fourslash/completions.import.pytyped.fourslash.d.ts +1 -0
  260. package/dist/tests/fourslash/completions.import.pytyped.fourslash.js +1 -0
  261. package/dist/tests/fourslash/completions.import.pytyped.fourslash.js.map +1 -1
  262. package/dist/tests/fourslash/completions.import.pytypedLocal.fourslash.d.ts +1 -0
  263. package/dist/tests/fourslash/completions.import.pytypedLocal.fourslash.js +1 -0
  264. package/dist/tests/fourslash/completions.import.pytypedLocal.fourslash.js.map +1 -1
  265. package/dist/tests/fourslash/completions.import.submodule.fourslash.d.ts +1 -0
  266. package/dist/tests/fourslash/completions.import.submodule.fourslash.js +2 -1
  267. package/dist/tests/fourslash/completions.import.submodule.fourslash.js.map +1 -1
  268. package/dist/tests/fourslash/completions.inList.fourslash.d.ts +1 -0
  269. package/dist/tests/fourslash/completions.inList.fourslash.js +2 -1
  270. package/dist/tests/fourslash/completions.inList.fourslash.js.map +1 -1
  271. package/dist/tests/fourslash/completions.included.fourslash.d.ts +1 -0
  272. package/dist/tests/fourslash/completions.included.fourslash.js +2 -1
  273. package/dist/tests/fourslash/completions.included.fourslash.js.map +1 -1
  274. package/dist/tests/fourslash/completions.indexer.keys.getitem.fourslash.d.ts +1 -0
  275. package/dist/tests/fourslash/completions.indexer.keys.getitem.fourslash.js +2 -1
  276. package/dist/tests/fourslash/completions.indexer.keys.getitem.fourslash.js.map +1 -1
  277. package/dist/tests/fourslash/completions.inherited.function.docFromStub.fourslash.d.ts +1 -0
  278. package/dist/tests/fourslash/completions.inherited.function.docFromStub.fourslash.js +2 -1
  279. package/dist/tests/fourslash/completions.inherited.function.docFromStub.fourslash.js.map +1 -1
  280. package/dist/tests/fourslash/completions.inherited.overload.docFromScrWithStub.fourslash.d.ts +1 -0
  281. package/dist/tests/fourslash/completions.inherited.overload.docFromScrWithStub.fourslash.js +2 -1
  282. package/dist/tests/fourslash/completions.inherited.overload.docFromScrWithStub.fourslash.js.map +1 -1
  283. package/dist/tests/fourslash/completions.inherited.overload.docFromStub.fourslash.d.ts +1 -0
  284. package/dist/tests/fourslash/completions.inherited.overload.docFromStub.fourslash.js +2 -1
  285. package/dist/tests/fourslash/completions.inherited.overload.docFromStub.fourslash.js.map +1 -1
  286. package/dist/tests/fourslash/completions.inherited.property.docFromSrc.fourslash.d.ts +1 -0
  287. package/dist/tests/fourslash/completions.inherited.property.docFromSrc.fourslash.js +2 -1
  288. package/dist/tests/fourslash/completions.inherited.property.docFromSrc.fourslash.js.map +1 -1
  289. package/dist/tests/fourslash/completions.inherited.property.docFromStub.fourslash.d.ts +1 -0
  290. package/dist/tests/fourslash/completions.inherited.property.docFromStub.fourslash.js +2 -1
  291. package/dist/tests/fourslash/completions.inherited.property.docFromStub.fourslash.js.map +1 -1
  292. package/dist/tests/fourslash/completions.keywords.pythonVersion.fourslash.d.ts +1 -0
  293. package/dist/tests/fourslash/completions.keywords.pythonVersion.fourslash.js +2 -1
  294. package/dist/tests/fourslash/completions.keywords.pythonVersion.fourslash.js.map +1 -1
  295. package/dist/tests/fourslash/completions.libCodeAndStub.fourslash.d.ts +1 -0
  296. package/dist/tests/fourslash/completions.libCodeAndStub.fourslash.js +2 -1
  297. package/dist/tests/fourslash/completions.libCodeAndStub.fourslash.js.map +1 -1
  298. package/dist/tests/fourslash/completions.libCodeNoStub.fourslash.d.ts +1 -0
  299. package/dist/tests/fourslash/completions.libCodeNoStub.fourslash.js +2 -1
  300. package/dist/tests/fourslash/completions.libCodeNoStub.fourslash.js.map +1 -1
  301. package/dist/tests/fourslash/completions.libStub.fourslash.d.ts +1 -0
  302. package/dist/tests/fourslash/completions.libStub.fourslash.js +2 -1
  303. package/dist/tests/fourslash/completions.libStub.fourslash.js.map +1 -1
  304. package/dist/tests/fourslash/completions.literals.fourslash.d.ts +1 -0
  305. package/dist/tests/fourslash/completions.literals.fourslash.js +2 -1
  306. package/dist/tests/fourslash/completions.literals.fourslash.js.map +1 -1
  307. package/dist/tests/fourslash/completions.localCode.fourslash.d.ts +1 -0
  308. package/dist/tests/fourslash/completions.localCode.fourslash.js +2 -1
  309. package/dist/tests/fourslash/completions.localCode.fourslash.js.map +1 -1
  310. package/dist/tests/fourslash/completions.moduleContext.UnknownMemberOnInstance.fourslash.d.ts +1 -0
  311. package/dist/tests/fourslash/completions.moduleContext.UnknownMemberOnInstance.fourslash.js +2 -1
  312. package/dist/tests/fourslash/completions.moduleContext.UnknownMemberOnInstance.fourslash.js.map +1 -1
  313. package/dist/tests/fourslash/completions.moduleContext.UnknownStaticFunctionOnClass.fourslash.d.ts +1 -0
  314. package/dist/tests/fourslash/completions.moduleContext.UnknownStaticFunctionOnClass.fourslash.js +2 -1
  315. package/dist/tests/fourslash/completions.moduleContext.UnknownStaticFunctionOnClass.fourslash.js.map +1 -1
  316. package/dist/tests/fourslash/completions.moduleContext.libCodeNoStub.fourslash.d.ts +1 -0
  317. package/dist/tests/fourslash/completions.moduleContext.libCodeNoStub.fourslash.js +2 -1
  318. package/dist/tests/fourslash/completions.moduleContext.libCodeNoStub.fourslash.js.map +1 -1
  319. package/dist/tests/fourslash/completions.overloads.fourslash.d.ts +1 -0
  320. package/dist/tests/fourslash/completions.overloads.fourslash.js +2 -1
  321. package/dist/tests/fourslash/completions.overloads.fourslash.js.map +1 -1
  322. package/dist/tests/fourslash/completions.override.default.fourslash.d.ts +1 -0
  323. package/dist/tests/fourslash/completions.override.default.fourslash.js +2 -1
  324. package/dist/tests/fourslash/completions.override.default.fourslash.js.map +1 -1
  325. package/dist/tests/fourslash/completions.override.default.importStub.d.ts +1 -0
  326. package/dist/tests/fourslash/completions.override.default.importStub.js +2 -1
  327. package/dist/tests/fourslash/completions.override.default.importStub.js.map +1 -1
  328. package/dist/tests/fourslash/completions.override.default.imported.fourslash.d.ts +1 -0
  329. package/dist/tests/fourslash/completions.override.default.imported.fourslash.js +2 -1
  330. package/dist/tests/fourslash/completions.override.default.imported.fourslash.js.map +1 -1
  331. package/dist/tests/fourslash/completions.override.default.stub.fourslash.d.ts +1 -0
  332. package/dist/tests/fourslash/completions.override.default.stub.fourslash.js +2 -1
  333. package/dist/tests/fourslash/completions.override.default.stub.fourslash.js.map +1 -1
  334. package/dist/tests/fourslash/completions.override.fourslash.d.ts +1 -0
  335. package/dist/tests/fourslash/completions.override.fourslash.js +2 -1
  336. package/dist/tests/fourslash/completions.override.fourslash.js.map +1 -1
  337. package/dist/tests/fourslash/completions.override.property.fourslash.d.ts +1 -0
  338. package/dist/tests/fourslash/completions.override.property.fourslash.js +2 -1
  339. package/dist/tests/fourslash/completions.override.property.fourslash.js.map +1 -1
  340. package/dist/tests/fourslash/completions.override.property.stub.fourslash.d.ts +1 -0
  341. package/dist/tests/fourslash/completions.override.property.stub.fourslash.js +2 -1
  342. package/dist/tests/fourslash/completions.override.property.stub.fourslash.js.map +1 -1
  343. package/dist/tests/fourslash/completions.override.staticAndClassmethod.fourslash.d.ts +1 -0
  344. package/dist/tests/fourslash/completions.override.staticAndClassmethod.fourslash.js +2 -1
  345. package/dist/tests/fourslash/completions.override.staticAndClassmethod.fourslash.js.map +1 -1
  346. package/dist/tests/fourslash/completions.override.stub.fourslash.d.ts +1 -0
  347. package/dist/tests/fourslash/completions.override.stub.fourslash.js +2 -1
  348. package/dist/tests/fourslash/completions.override.stub.fourslash.js.map +1 -1
  349. package/dist/tests/fourslash/completions.override2.fourslash.d.ts +1 -0
  350. package/dist/tests/fourslash/completions.override2.fourslash.js +2 -1
  351. package/dist/tests/fourslash/completions.override2.fourslash.js.map +1 -1
  352. package/dist/tests/fourslash/completions.parameters.fourslash.d.ts +1 -0
  353. package/dist/tests/fourslash/completions.parameters.fourslash.js +2 -1
  354. package/dist/tests/fourslash/completions.parameters.fourslash.js.map +1 -1
  355. package/dist/tests/fourslash/completions.params.fourslash.d.ts +1 -0
  356. package/dist/tests/fourslash/completions.params.fourslash.js +2 -1
  357. package/dist/tests/fourslash/completions.params.fourslash.js.map +1 -1
  358. package/dist/tests/fourslash/completions.parentFolder.fourslash.d.ts +1 -0
  359. package/dist/tests/fourslash/completions.parentFolder.fourslash.js +2 -1
  360. package/dist/tests/fourslash/completions.parentFolder.fourslash.js.map +1 -1
  361. package/dist/tests/fourslash/completions.parentFolders.fourslash.d.ts +1 -0
  362. package/dist/tests/fourslash/completions.parentFolders.fourslash.js +2 -1
  363. package/dist/tests/fourslash/completions.parentFolders.fourslash.js.map +1 -1
  364. package/dist/tests/fourslash/completions.plainText.fourslash.d.ts +1 -0
  365. package/dist/tests/fourslash/completions.plainText.fourslash.js +2 -1
  366. package/dist/tests/fourslash/completions.plainText.fourslash.js.map +1 -1
  367. package/dist/tests/fourslash/completions.private.fourslash.d.ts +1 -0
  368. package/dist/tests/fourslash/completions.private.fourslash.js +2 -1
  369. package/dist/tests/fourslash/completions.private.fourslash.js.map +1 -1
  370. package/dist/tests/fourslash/completions.property.fourslash.d.ts +1 -0
  371. package/dist/tests/fourslash/completions.property.fourslash.js +2 -1
  372. package/dist/tests/fourslash/completions.property.fourslash.js.map +1 -1
  373. package/dist/tests/fourslash/completions.propertyDocStrings.fourslash.d.ts +1 -0
  374. package/dist/tests/fourslash/completions.propertyDocStrings.fourslash.js +2 -1
  375. package/dist/tests/fourslash/completions.propertyDocStrings.fourslash.js.map +1 -1
  376. package/dist/tests/fourslash/completions.self.fourslash.d.ts +1 -0
  377. package/dist/tests/fourslash/completions.self.fourslash.js +2 -1
  378. package/dist/tests/fourslash/completions.self.fourslash.js.map +1 -1
  379. package/dist/tests/fourslash/completions.stringLiteral.escape.fourslash.d.ts +1 -0
  380. package/dist/tests/fourslash/completions.stringLiteral.escape.fourslash.js +2 -1
  381. package/dist/tests/fourslash/completions.stringLiteral.escape.fourslash.js.map +1 -1
  382. package/dist/tests/fourslash/completions.stringLiteral.fourslash.d.ts +1 -0
  383. package/dist/tests/fourslash/completions.stringLiteral.fourslash.js +2 -1
  384. package/dist/tests/fourslash/completions.stringLiteral.fourslash.js.map +1 -1
  385. package/dist/tests/fourslash/completions.triggers.fourslash.d.ts +1 -0
  386. package/dist/tests/fourslash/completions.triggers.fourslash.js +2 -1
  387. package/dist/tests/fourslash/completions.triggers.fourslash.js.map +1 -1
  388. package/dist/tests/fourslash/completions.typeAlias.fourslash.d.ts +1 -0
  389. package/dist/tests/fourslash/completions.typeAlias.fourslash.js +2 -1
  390. package/dist/tests/fourslash/completions.typeAlias.fourslash.js.map +1 -1
  391. package/dist/tests/fourslash/completions.typeshed.fourslash.d.ts +1 -0
  392. package/dist/tests/fourslash/completions.typeshed.fourslash.js +2 -1
  393. package/dist/tests/fourslash/completions.typeshed.fourslash.js.map +1 -1
  394. package/dist/tests/fourslash/completions.vardecls.fourslash.d.ts +1 -0
  395. package/dist/tests/fourslash/completions.vardecls.fourslash.js +2 -1
  396. package/dist/tests/fourslash/completions.vardecls.fourslash.js.map +1 -1
  397. package/dist/tests/fourslash/completions.variableDocStrings.fourslash.d.ts +1 -0
  398. package/dist/tests/fourslash/completions.variableDocStrings.fourslash.js +2 -1
  399. package/dist/tests/fourslash/completions.variableDocStrings.fourslash.js.map +1 -1
  400. package/dist/tests/fourslash/completions.wildcardimports.fourslash.d.ts +1 -0
  401. package/dist/tests/fourslash/completions.wildcardimports.fourslash.js +2 -1
  402. package/dist/tests/fourslash/completions.wildcardimports.fourslash.js.map +1 -1
  403. package/dist/tests/fourslash/completions.with.fourslash.d.ts +1 -0
  404. package/dist/tests/fourslash/completions.with.fourslash.js +2 -1
  405. package/dist/tests/fourslash/completions.with.fourslash.js.map +1 -1
  406. package/dist/tests/fourslash/diagnostics.missingModuleSource.fourslash.d.ts +1 -0
  407. package/dist/tests/fourslash/diagnostics.missingModuleSource.fourslash.js +2 -1
  408. package/dist/tests/fourslash/diagnostics.missingModuleSource.fourslash.js.map +1 -1
  409. package/dist/tests/fourslash/findDefinitions.builtinClass.fourslash.d.ts +1 -0
  410. package/dist/tests/fourslash/findDefinitions.builtinClass.fourslash.js +2 -1
  411. package/dist/tests/fourslash/findDefinitions.builtinClass.fourslash.js.map +1 -1
  412. package/dist/tests/fourslash/findDefinitions.classes.fourslash.d.ts +1 -0
  413. package/dist/tests/fourslash/findDefinitions.classes.fourslash.js +2 -1
  414. package/dist/tests/fourslash/findDefinitions.classes.fourslash.js.map +1 -1
  415. package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.fourslash.d.ts +1 -0
  416. package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.fourslash.js +2 -1
  417. package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.fourslash.js.map +1 -1
  418. package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.onlyStubs.d.ts +1 -0
  419. package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.onlyStubs.js +2 -1
  420. package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.onlyStubs.js.map +1 -1
  421. package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.fourslash.d.ts +1 -0
  422. package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.fourslash.js +2 -1
  423. package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.fourslash.js.map +1 -1
  424. package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.onlySource.fourslash.d.ts +1 -0
  425. package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.onlySource.fourslash.js +2 -1
  426. package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.onlySource.fourslash.js.map +1 -1
  427. package/dist/tests/fourslash/findDefinitions.fields.fourslash.d.ts +1 -0
  428. package/dist/tests/fourslash/findDefinitions.fields.fourslash.js +2 -1
  429. package/dist/tests/fourslash/findDefinitions.fields.fourslash.js.map +1 -1
  430. package/dist/tests/fourslash/findDefinitions.functions.fourslash.d.ts +1 -0
  431. package/dist/tests/fourslash/findDefinitions.functions.fourslash.js +2 -1
  432. package/dist/tests/fourslash/findDefinitions.functions.fourslash.js.map +1 -1
  433. package/dist/tests/fourslash/findDefinitions.methods.fourslash.d.ts +1 -0
  434. package/dist/tests/fourslash/findDefinitions.methods.fourslash.js +2 -1
  435. package/dist/tests/fourslash/findDefinitions.methods.fourslash.js.map +1 -1
  436. package/dist/tests/fourslash/findDefinitions.modules.fourslash.d.ts +1 -0
  437. package/dist/tests/fourslash/findDefinitions.modules.fourslash.js +2 -1
  438. package/dist/tests/fourslash/findDefinitions.modules.fourslash.js.map +1 -1
  439. package/dist/tests/fourslash/findDefinitions.namespaceImport.fourslash.d.ts +1 -0
  440. package/dist/tests/fourslash/findDefinitions.namespaceImport.fourslash.js +2 -1
  441. package/dist/tests/fourslash/findDefinitions.namespaceImport.fourslash.js.map +1 -1
  442. package/dist/tests/fourslash/findDefinitions.namespaceImportWithInit.fourslash.d.ts +1 -0
  443. package/dist/tests/fourslash/findDefinitions.namespaceImportWithInit.fourslash.js +2 -1
  444. package/dist/tests/fourslash/findDefinitions.namespaceImportWithInit.fourslash.js.map +1 -1
  445. package/dist/tests/fourslash/findDefinitions.overloads.fourslash.d.ts +1 -0
  446. package/dist/tests/fourslash/findDefinitions.overloads.fourslash.js +2 -1
  447. package/dist/tests/fourslash/findDefinitions.overloads.fourslash.js.map +1 -1
  448. package/dist/tests/fourslash/findDefinitions.parameters.fourslash.d.ts +1 -0
  449. package/dist/tests/fourslash/findDefinitions.parameters.fourslash.js +2 -1
  450. package/dist/tests/fourslash/findDefinitions.parameters.fourslash.js.map +1 -1
  451. package/dist/tests/fourslash/findDefinitions.sourceAndStub.function.fourslash.d.ts +1 -0
  452. package/dist/tests/fourslash/findDefinitions.sourceAndStub.function.fourslash.js +2 -1
  453. package/dist/tests/fourslash/findDefinitions.sourceAndStub.function.fourslash.js.map +1 -1
  454. package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClass.fourslash.d.ts +1 -0
  455. package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClass.fourslash.js +2 -1
  456. package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClass.fourslash.js.map +1 -1
  457. package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClassMethod.fourslash.d.ts +1 -0
  458. package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClassMethod.fourslash.js +2 -1
  459. package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClassMethod.fourslash.js.map +1 -1
  460. package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClass.fourslash.d.ts +1 -0
  461. package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClass.fourslash.js +2 -1
  462. package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClass.fourslash.js.map +1 -1
  463. package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassMethod.fourslash.d.ts +1 -0
  464. package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassMethod.fourslash.js +2 -1
  465. package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassMethod.fourslash.js.map +1 -1
  466. package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadOnly.fourslash.d.ts +1 -0
  467. package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadOnly.fourslash.js +2 -1
  468. package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadOnly.fourslash.js.map +1 -1
  469. package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadWrite.fourslash.d.ts +1 -0
  470. package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadWrite.fourslash.js +2 -1
  471. package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadWrite.fourslash.js.map +1 -1
  472. package/dist/tests/fourslash/findDefinitions.sourceOnly.class.fourslash.d.ts +1 -0
  473. package/dist/tests/fourslash/findDefinitions.sourceOnly.class.fourslash.js +2 -1
  474. package/dist/tests/fourslash/findDefinitions.sourceOnly.class.fourslash.js.map +1 -1
  475. package/dist/tests/fourslash/findDefinitions.sourceOnly.function1.fourslash.d.ts +1 -0
  476. package/dist/tests/fourslash/findDefinitions.sourceOnly.function1.fourslash.js +2 -1
  477. package/dist/tests/fourslash/findDefinitions.sourceOnly.function1.fourslash.js.map +1 -1
  478. package/dist/tests/fourslash/findDefinitions.sourceOnly.function2.fourslash.d.ts +1 -0
  479. package/dist/tests/fourslash/findDefinitions.sourceOnly.function2.fourslash.js +2 -1
  480. package/dist/tests/fourslash/findDefinitions.sourceOnly.function2.fourslash.js.map +1 -1
  481. package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport1.fourslash.d.ts +1 -0
  482. package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport1.fourslash.js +2 -1
  483. package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport1.fourslash.js.map +1 -1
  484. package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport2.fourslash.d.ts +1 -0
  485. package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport2.fourslash.js +2 -1
  486. package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport2.fourslash.js.map +1 -1
  487. package/dist/tests/fourslash/findDefinitions.stubOnly.fourslash.d.ts +1 -0
  488. package/dist/tests/fourslash/findDefinitions.stubOnly.fourslash.js +2 -1
  489. package/dist/tests/fourslash/findDefinitions.stubOnly.fourslash.js.map +1 -1
  490. package/dist/tests/fourslash/findDefinitions.stubPackages.fourslash.d.ts +1 -0
  491. package/dist/tests/fourslash/findDefinitions.stubPackages.fourslash.js +2 -1
  492. package/dist/tests/fourslash/findDefinitions.stubPackages.fourslash.js.map +1 -1
  493. package/dist/tests/fourslash/findDefinitions.typedDict.keys.fourslash.d.ts +1 -0
  494. package/dist/tests/fourslash/findDefinitions.typedDict.keys.fourslash.js +2 -1
  495. package/dist/tests/fourslash/findDefinitions.typedDict.keys.fourslash.js.map +1 -1
  496. package/dist/tests/fourslash/findDefinitions.variables.fourslash.d.ts +1 -0
  497. package/dist/tests/fourslash/findDefinitions.variables.fourslash.js +2 -1
  498. package/dist/tests/fourslash/findDefinitions.variables.fourslash.js.map +1 -1
  499. package/dist/tests/fourslash/findDefinitions.wildcardimports.fourslash.d.ts +1 -0
  500. package/dist/tests/fourslash/findDefinitions.wildcardimports.fourslash.js +2 -1
  501. package/dist/tests/fourslash/findDefinitions.wildcardimports.fourslash.js.map +1 -1
  502. package/dist/tests/fourslash/findTypeDefinitions.builtinClass.fourslash.d.ts +1 -0
  503. package/dist/tests/fourslash/findTypeDefinitions.builtinClass.fourslash.js +2 -1
  504. package/dist/tests/fourslash/findTypeDefinitions.builtinClass.fourslash.js.map +1 -1
  505. package/dist/tests/fourslash/findTypeDefinitions.classes.fourslash.d.ts +1 -0
  506. package/dist/tests/fourslash/findTypeDefinitions.classes.fourslash.js +2 -1
  507. package/dist/tests/fourslash/findTypeDefinitions.classes.fourslash.js.map +1 -1
  508. package/dist/tests/fourslash/findTypeDefinitions.unions.fourslash.d.ts +1 -0
  509. package/dist/tests/fourslash/findTypeDefinitions.unions.fourslash.js +2 -1
  510. package/dist/tests/fourslash/findTypeDefinitions.unions.fourslash.js.map +1 -1
  511. package/dist/tests/fourslash/findallreferences.classPropertyReadWrite.d.ts +1 -0
  512. package/dist/tests/fourslash/findallreferences.classPropertyReadWrite.js +2 -1
  513. package/dist/tests/fourslash/findallreferences.classPropertyReadWrite.js.map +1 -1
  514. package/dist/tests/fourslash/findallreferences.fourslash.d.ts +1 -0
  515. package/dist/tests/fourslash/findallreferences.fourslash.js +2 -1
  516. package/dist/tests/fourslash/findallreferences.fourslash.js.map +1 -1
  517. package/dist/tests/fourslash/findallreferences.importalias.fourslash.d.ts +1 -0
  518. package/dist/tests/fourslash/findallreferences.importalias.fourslash.js +2 -1
  519. package/dist/tests/fourslash/findallreferences.importalias.fourslash.js.map +1 -1
  520. package/dist/tests/fourslash/findallreferences.invokedFromLibrary.fourslash.d.ts +1 -0
  521. package/dist/tests/fourslash/findallreferences.invokedFromLibrary.fourslash.js +2 -1
  522. package/dist/tests/fourslash/findallreferences.invokedFromLibrary.fourslash.js.map +1 -1
  523. package/dist/tests/fourslash/findallreferences.module.nested.fourslash.d.ts +1 -0
  524. package/dist/tests/fourslash/findallreferences.module.nested.fourslash.js +2 -1
  525. package/dist/tests/fourslash/findallreferences.module.nested.fourslash.js.map +1 -1
  526. package/dist/tests/fourslash/findallreferences.modules.duplicated.fourslash.d.ts +1 -0
  527. package/dist/tests/fourslash/findallreferences.modules.duplicated.fourslash.js +2 -1
  528. package/dist/tests/fourslash/findallreferences.modules.duplicated.fourslash.js.map +1 -1
  529. package/dist/tests/fourslash/findallreferences.modules.fourslash.d.ts +1 -0
  530. package/dist/tests/fourslash/findallreferences.modules.fourslash.js +2 -1
  531. package/dist/tests/fourslash/findallreferences.modules.fourslash.js.map +1 -1
  532. package/dist/tests/fourslash/findallreferences.modules.shadow.fourslash.d.ts +1 -0
  533. package/dist/tests/fourslash/findallreferences.modules.shadow.fourslash.js +2 -1
  534. package/dist/tests/fourslash/findallreferences.modules.shadow.fourslash.js.map +1 -1
  535. package/dist/tests/fourslash/findallreferences.openFiles.fourslash.d.ts +1 -0
  536. package/dist/tests/fourslash/findallreferences.openFiles.fourslash.js +2 -1
  537. package/dist/tests/fourslash/findallreferences.openFiles.fourslash.js.map +1 -1
  538. package/dist/tests/fourslash/findallreferences.parameter.fourslash.d.ts +1 -0
  539. package/dist/tests/fourslash/findallreferences.parameter.fourslash.js +2 -1
  540. package/dist/tests/fourslash/findallreferences.parameter.fourslash.js.map +1 -1
  541. package/dist/tests/fourslash/findallreferences.sourceAndStub.class.fourslash.d.ts +1 -0
  542. package/dist/tests/fourslash/findallreferences.sourceAndStub.class.fourslash.js +2 -1
  543. package/dist/tests/fourslash/findallreferences.sourceAndStub.class.fourslash.js.map +1 -1
  544. package/dist/tests/fourslash/findallreferences.sourceAndStub.classMethod.fourslash.d.ts +1 -0
  545. package/dist/tests/fourslash/findallreferences.sourceAndStub.classMethod.fourslash.js +2 -1
  546. package/dist/tests/fourslash/findallreferences.sourceAndStub.classMethod.fourslash.js.map +1 -1
  547. package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadOnly.fourslash.d.ts +1 -0
  548. package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadOnly.fourslash.js +2 -1
  549. package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadOnly.fourslash.js.map +1 -1
  550. package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadWrite.fourslash.skip.d.ts +1 -0
  551. package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadWrite.fourslash.skip.js +2 -1
  552. package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadWrite.fourslash.skip.js.map +1 -1
  553. package/dist/tests/fourslash/findallreferences.sourceAndStub.function.fourslash.d.ts +1 -0
  554. package/dist/tests/fourslash/findallreferences.sourceAndStub.function.fourslash.js +2 -1
  555. package/dist/tests/fourslash/findallreferences.sourceAndStub.function.fourslash.js.map +1 -1
  556. package/dist/tests/fourslash/findallreferences.variable.fourslash.d.ts +1 -0
  557. package/dist/tests/fourslash/findallreferences.variable.fourslash.js +2 -1
  558. package/dist/tests/fourslash/findallreferences.variable.fourslash.js.map +1 -1
  559. package/dist/tests/fourslash/highlightreferences.attributes.fourslash.d.ts +1 -0
  560. package/dist/tests/fourslash/highlightreferences.attributes.fourslash.js +2 -1
  561. package/dist/tests/fourslash/highlightreferences.attributes.fourslash.js.map +1 -1
  562. package/dist/tests/fourslash/hover.async.fourslash.d.ts +1 -0
  563. package/dist/tests/fourslash/hover.async.fourslash.js +2 -1
  564. package/dist/tests/fourslash/hover.async.fourslash.js.map +1 -1
  565. package/dist/tests/fourslash/hover.builtinDocstrings.builtinInheritedByBuiltin.fourslash.d.ts +1 -0
  566. package/dist/tests/fourslash/hover.builtinDocstrings.builtinInheritedByBuiltin.fourslash.js +2 -1
  567. package/dist/tests/fourslash/hover.builtinDocstrings.builtinInheritedByBuiltin.fourslash.js.map +1 -1
  568. package/dist/tests/fourslash/hover.builtinDocstrings.builtinInheritedByUserCode.fourslash.d.ts +1 -0
  569. package/dist/tests/fourslash/hover.builtinDocstrings.builtinInheritedByUserCode.fourslash.js +2 -1
  570. package/dist/tests/fourslash/hover.builtinDocstrings.builtinInheritedByUserCode.fourslash.js.map +1 -1
  571. package/dist/tests/fourslash/hover.builtinDocstrings.fourslash.d.ts +1 -0
  572. package/dist/tests/fourslash/hover.builtinDocstrings.fourslash.js +2 -1
  573. package/dist/tests/fourslash/hover.builtinDocstrings.fourslash.js.map +1 -1
  574. package/dist/tests/fourslash/hover.class.docString.fourslash.d.ts +1 -0
  575. package/dist/tests/fourslash/hover.class.docString.fourslash.js +2 -1
  576. package/dist/tests/fourslash/hover.class.docString.fourslash.js.map +1 -1
  577. package/dist/tests/fourslash/hover.classNoInit.fourslash.d.ts +1 -0
  578. package/dist/tests/fourslash/hover.classNoInit.fourslash.js +2 -1
  579. package/dist/tests/fourslash/hover.classNoInit.fourslash.js.map +1 -1
  580. package/dist/tests/fourslash/hover.docFromSrc.fourslash.d.ts +1 -0
  581. package/dist/tests/fourslash/hover.docFromSrc.fourslash.js +2 -1
  582. package/dist/tests/fourslash/hover.docFromSrc.fourslash.js.map +1 -1
  583. package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module1.fourslash.d.ts +1 -0
  584. package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module1.fourslash.js +2 -1
  585. package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module1.fourslash.js.map +1 -1
  586. package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module2.fourslash.d.ts +1 -0
  587. package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module2.fourslash.js +2 -1
  588. package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module2.fourslash.js.map +1 -1
  589. package/dist/tests/fourslash/hover.docFromSrc.relativeImport1.fourslash.d.ts +1 -0
  590. package/dist/tests/fourslash/hover.docFromSrc.relativeImport1.fourslash.js +2 -1
  591. package/dist/tests/fourslash/hover.docFromSrc.relativeImport1.fourslash.js.map +1 -1
  592. package/dist/tests/fourslash/hover.docFromSrc.relativeImport2.fourslash.d.ts +1 -0
  593. package/dist/tests/fourslash/hover.docFromSrc.relativeImport2.fourslash.js +2 -1
  594. package/dist/tests/fourslash/hover.docFromSrc.relativeImport2.fourslash.js.map +1 -1
  595. package/dist/tests/fourslash/hover.docFromSrc.relativeImport3.fourslash.d.ts +1 -0
  596. package/dist/tests/fourslash/hover.docFromSrc.relativeImport3.fourslash.js +2 -1
  597. package/dist/tests/fourslash/hover.docFromSrc.relativeImport3.fourslash.js.map +1 -1
  598. package/dist/tests/fourslash/hover.docFromSrc.stringFormat.fourslash.d.ts +1 -0
  599. package/dist/tests/fourslash/hover.docFromSrc.stringFormat.fourslash.js +2 -1
  600. package/dist/tests/fourslash/hover.docFromSrc.stringFormat.fourslash.js.map +1 -1
  601. package/dist/tests/fourslash/hover.docFromSrc.stubs-package.fourslash.d.ts +1 -0
  602. package/dist/tests/fourslash/hover.docFromSrc.stubs-package.fourslash.js +2 -1
  603. package/dist/tests/fourslash/hover.docFromSrc.stubs-package.fourslash.js.map +1 -1
  604. package/dist/tests/fourslash/hover.docFromSrc.typeshed.fourslash.d.ts +1 -0
  605. package/dist/tests/fourslash/hover.docFromSrc.typeshed.fourslash.js +2 -1
  606. package/dist/tests/fourslash/hover.docFromSrc.typeshed.fourslash.js.map +1 -1
  607. package/dist/tests/fourslash/hover.docstring.alias.fourslash.d.ts +1 -0
  608. package/dist/tests/fourslash/hover.docstring.alias.fourslash.js +2 -1
  609. package/dist/tests/fourslash/hover.docstring.alias.fourslash.js.map +1 -1
  610. package/dist/tests/fourslash/hover.docstring.links.fourslash.d.ts +1 -0
  611. package/dist/tests/fourslash/hover.docstring.links.fourslash.js +2 -1
  612. package/dist/tests/fourslash/hover.docstring.links.fourslash.js.map +1 -1
  613. package/dist/tests/fourslash/hover.docstring.overloads.fourslash.d.ts +1 -0
  614. package/dist/tests/fourslash/hover.docstring.overloads.fourslash.js +2 -1
  615. package/dist/tests/fourslash/hover.docstring.overloads.fourslash.js.map +1 -1
  616. package/dist/tests/fourslash/hover.docstring.parameter.fourslash.d.ts +1 -0
  617. package/dist/tests/fourslash/hover.docstring.parameter.fourslash.js +2 -1
  618. package/dist/tests/fourslash/hover.docstring.parameter.fourslash.js.map +1 -1
  619. package/dist/tests/fourslash/hover.docstring.split.fourslash.d.ts +1 -0
  620. package/dist/tests/fourslash/hover.docstring.split.fourslash.js +2 -1
  621. package/dist/tests/fourslash/hover.docstring.split.fourslash.js.map +1 -1
  622. package/dist/tests/fourslash/hover.dunderNew.basic.fourslash.d.ts +1 -0
  623. package/dist/tests/fourslash/hover.dunderNew.basic.fourslash.js +2 -1
  624. package/dist/tests/fourslash/hover.dunderNew.basic.fourslash.js.map +1 -1
  625. package/dist/tests/fourslash/hover.dunderNew.inheritance.fourslash.d.ts +1 -0
  626. package/dist/tests/fourslash/hover.dunderNew.inheritance.fourslash.js +2 -1
  627. package/dist/tests/fourslash/hover.dunderNew.inheritance.fourslash.js.map +1 -1
  628. package/dist/tests/fourslash/hover.dunderNew.inheritance2.fourslash.d.ts +1 -0
  629. package/dist/tests/fourslash/hover.dunderNew.inheritance2.fourslash.js +2 -1
  630. package/dist/tests/fourslash/hover.dunderNew.inheritance2.fourslash.js.map +1 -1
  631. package/dist/tests/fourslash/hover.dunderNew.overloads.fourslash.d.ts +1 -0
  632. package/dist/tests/fourslash/hover.dunderNew.overloads.fourslash.js +2 -1
  633. package/dist/tests/fourslash/hover.dunderNew.overloads.fourslash.js.map +1 -1
  634. package/dist/tests/fourslash/hover.dunderNew.withInit.fourslash.d.ts +1 -0
  635. package/dist/tests/fourslash/hover.dunderNew.withInit.fourslash.js +2 -1
  636. package/dist/tests/fourslash/hover.dunderNew.withInit.fourslash.js.map +1 -1
  637. package/dist/tests/fourslash/hover.formatted.fourslash.d.ts +1 -0
  638. package/dist/tests/fourslash/hover.formatted.fourslash.js +2 -1
  639. package/dist/tests/fourslash/hover.formatted.fourslash.js.map +1 -1
  640. package/dist/tests/fourslash/hover.fourslash.d.ts +1 -0
  641. package/dist/tests/fourslash/hover.fourslash.js +2 -1
  642. package/dist/tests/fourslash/hover.fourslash.js.map +1 -1
  643. package/dist/tests/fourslash/hover.import.django.view.fourslash.d.ts +1 -0
  644. package/dist/tests/fourslash/hover.import.django.view.fourslash.js +2 -1
  645. package/dist/tests/fourslash/hover.import.django.view.fourslash.js.map +1 -1
  646. package/dist/tests/fourslash/hover.import.fourslash.d.ts +1 -0
  647. package/dist/tests/fourslash/hover.import.fourslash.js +2 -1
  648. package/dist/tests/fourslash/hover.import.fourslash.js.map +1 -1
  649. package/dist/tests/fourslash/hover.inferred.fourslash.d.ts +1 -0
  650. package/dist/tests/fourslash/hover.inferred.fourslash.js +2 -1
  651. package/dist/tests/fourslash/hover.inferred.fourslash.js.map +1 -1
  652. package/dist/tests/fourslash/hover.inherited.docFromSrc.fourslash.d.ts +1 -0
  653. package/dist/tests/fourslash/hover.inherited.docFromSrc.fourslash.js +2 -1
  654. package/dist/tests/fourslash/hover.inherited.docFromSrc.fourslash.js.map +1 -1
  655. package/dist/tests/fourslash/hover.inherited.docFromSrcWithStub.fourslash.d.ts +1 -0
  656. package/dist/tests/fourslash/hover.inherited.docFromSrcWithStub.fourslash.js +2 -1
  657. package/dist/tests/fourslash/hover.inherited.docFromSrcWithStub.fourslash.js.map +1 -1
  658. package/dist/tests/fourslash/hover.inherited.docFromStub.fourslash.d.ts +1 -0
  659. package/dist/tests/fourslash/hover.inherited.docFromStub.fourslash.js +2 -1
  660. package/dist/tests/fourslash/hover.inherited.docFromStub.fourslash.js.map +1 -1
  661. package/dist/tests/fourslash/hover.inherited.overload.docFromSrcWithStub.fourslash.d.ts +1 -0
  662. package/dist/tests/fourslash/hover.inherited.overload.docFromSrcWithStub.fourslash.js +2 -1
  663. package/dist/tests/fourslash/hover.inherited.overload.docFromSrcWithStub.fourslash.js.map +1 -1
  664. package/dist/tests/fourslash/hover.inherited.overload.docFromStub.fourslash.d.ts +1 -0
  665. package/dist/tests/fourslash/hover.inherited.overload.docFromStub.fourslash.js +2 -1
  666. package/dist/tests/fourslash/hover.inherited.overload.docFromStub.fourslash.js.map +1 -1
  667. package/dist/tests/fourslash/hover.inherited.property.docFromSrcWithStub.fourslash.d.ts +1 -0
  668. package/dist/tests/fourslash/hover.inherited.property.docFromSrcWithStub.fourslash.js +2 -1
  669. package/dist/tests/fourslash/hover.inherited.property.docFromSrcWithStub.fourslash.js.map +1 -1
  670. package/dist/tests/fourslash/hover.inherited.property.docFromStub.fourslash.d.ts +1 -0
  671. package/dist/tests/fourslash/hover.inherited.property.docFromStub.fourslash.js +2 -1
  672. package/dist/tests/fourslash/hover.inherited.property.docFromStub.fourslash.js.map +1 -1
  673. package/dist/tests/fourslash/hover.init.fourslash.d.ts +1 -0
  674. package/dist/tests/fourslash/hover.init.fourslash.js +2 -1
  675. package/dist/tests/fourslash/hover.init.fourslash.js.map +1 -1
  676. package/dist/tests/fourslash/hover.libCodeAndStub.fourslash.d.ts +1 -0
  677. package/dist/tests/fourslash/hover.libCodeAndStub.fourslash.js +2 -1
  678. package/dist/tests/fourslash/hover.libCodeAndStub.fourslash.js.map +1 -1
  679. package/dist/tests/fourslash/hover.libCodeNoStub.fourslash.d.ts +1 -0
  680. package/dist/tests/fourslash/hover.libCodeNoStub.fourslash.js +2 -1
  681. package/dist/tests/fourslash/hover.libCodeNoStub.fourslash.js.map +1 -1
  682. package/dist/tests/fourslash/hover.libStub.fourslash.d.ts +1 -0
  683. package/dist/tests/fourslash/hover.libStub.fourslash.js +2 -1
  684. package/dist/tests/fourslash/hover.libStub.fourslash.js.map +1 -1
  685. package/dist/tests/fourslash/hover.optionalAliasParameter.fourslash.d.ts +1 -0
  686. package/dist/tests/fourslash/hover.optionalAliasParameter.fourslash.js +2 -1
  687. package/dist/tests/fourslash/hover.optionalAliasParameter.fourslash.js.map +1 -1
  688. package/dist/tests/fourslash/hover.overloadedFunction.fourslash.d.ts +1 -0
  689. package/dist/tests/fourslash/hover.overloadedFunction.fourslash.js +2 -1
  690. package/dist/tests/fourslash/hover.overloadedFunction.fourslash.js.map +1 -1
  691. package/dist/tests/fourslash/hover.plainText.fourslash.d.ts +1 -0
  692. package/dist/tests/fourslash/hover.plainText.fourslash.js +2 -1
  693. package/dist/tests/fourslash/hover.plainText.fourslash.js.map +1 -1
  694. package/dist/tests/fourslash/hover.slots.fourslash.d.ts +1 -0
  695. package/dist/tests/fourslash/hover.slots.fourslash.js +2 -1
  696. package/dist/tests/fourslash/hover.slots.fourslash.js.map +1 -1
  697. package/dist/tests/fourslash/hover.typedDict.key.fourslash.d.ts +1 -0
  698. package/dist/tests/fourslash/hover.typedDict.key.fourslash.js +2 -1
  699. package/dist/tests/fourslash/hover.typedDict.key.fourslash.js.map +1 -1
  700. package/dist/tests/fourslash/hover.unpackedTypedDict.key.fourslash.d.ts +1 -0
  701. package/dist/tests/fourslash/hover.unpackedTypedDict.key.fourslash.js +2 -1
  702. package/dist/tests/fourslash/hover.unpackedTypedDict.key.fourslash.js.map +1 -1
  703. package/dist/tests/fourslash/hover.variable.docString.fourslash.d.ts +1 -0
  704. package/dist/tests/fourslash/hover.variable.docString.fourslash.js +2 -1
  705. package/dist/tests/fourslash/hover.variable.docString.fourslash.js.map +1 -1
  706. package/dist/tests/fourslash/hover.wildcardimports.fourslash.d.ts +1 -0
  707. package/dist/tests/fourslash/hover.wildcardimports.fourslash.js +2 -1
  708. package/dist/tests/fourslash/hover.wildcardimports.fourslash.js.map +1 -1
  709. package/dist/tests/fourslash/import.multipart.fourslash.d.ts +1 -0
  710. package/dist/tests/fourslash/import.multipart.fourslash.js +2 -1
  711. package/dist/tests/fourslash/import.multipart.fourslash.js.map +1 -1
  712. package/dist/tests/fourslash/import.nameconflict.fourslash.d.ts +1 -0
  713. package/dist/tests/fourslash/import.nameconflict.fourslash.js +2 -1
  714. package/dist/tests/fourslash/import.nameconflict.fourslash.js.map +1 -1
  715. package/dist/tests/fourslash/import.publicSymbols.fourslash.d.ts +1 -0
  716. package/dist/tests/fourslash/import.publicSymbols.fourslash.js +2 -1
  717. package/dist/tests/fourslash/import.publicSymbols.fourslash.js.map +1 -1
  718. package/dist/tests/fourslash/import.pytyped.dunderAll.fourslash.d.ts +1 -0
  719. package/dist/tests/fourslash/import.pytyped.dunderAll.fourslash.js +2 -1
  720. package/dist/tests/fourslash/import.pytyped.dunderAll.fourslash.js.map +1 -1
  721. package/dist/tests/fourslash/import.pytyped.privateSymbols.fourslash.d.ts +1 -0
  722. package/dist/tests/fourslash/import.pytyped.privateSymbols.fourslash.js +2 -1
  723. package/dist/tests/fourslash/import.pytyped.privateSymbols.fourslash.js.map +1 -1
  724. package/dist/tests/fourslash/import.pytyped.typeCheckingBasic.fourslash.d.ts +1 -0
  725. package/dist/tests/fourslash/import.pytyped.typeCheckingBasic.fourslash.js +2 -1
  726. package/dist/tests/fourslash/import.pytyped.typeCheckingBasic.fourslash.js.map +1 -1
  727. package/dist/tests/fourslash/import.pytyped.typeCheckingOff.fourslash.d.ts +1 -0
  728. package/dist/tests/fourslash/import.pytyped.typeCheckingOff.fourslash.js +2 -1
  729. package/dist/tests/fourslash/import.pytyped.typeCheckingOff.fourslash.js.map +1 -1
  730. package/dist/tests/fourslash/import.wildcard.fourslash.d.ts +1 -0
  731. package/dist/tests/fourslash/import.wildcard.fourslash.js +2 -1
  732. package/dist/tests/fourslash/import.wildcard.fourslash.js.map +1 -1
  733. package/dist/tests/fourslash/importnotresolved.fourslash.d.ts +1 -0
  734. package/dist/tests/fourslash/importnotresolved.fourslash.js +2 -1
  735. package/dist/tests/fourslash/importnotresolved.fourslash.js.map +1 -1
  736. package/dist/tests/fourslash/missingModuleSource.disablingInStrictMode.fourslash.d.ts +1 -0
  737. package/dist/tests/fourslash/missingModuleSource.disablingInStrictMode.fourslash.js +2 -1
  738. package/dist/tests/fourslash/missingModuleSource.disablingInStrictMode.fourslash.js.map +1 -1
  739. package/dist/tests/fourslash/missingModuleSource.fourslash.d.ts +1 -0
  740. package/dist/tests/fourslash/missingModuleSource.fourslash.js +2 -1
  741. package/dist/tests/fourslash/missingModuleSource.fourslash.js.map +1 -1
  742. package/dist/tests/fourslash/missingTypeStub.codeAction.fourslash.d.ts +1 -0
  743. package/dist/tests/fourslash/missingTypeStub.codeAction.fourslash.js +2 -1
  744. package/dist/tests/fourslash/missingTypeStub.codeAction.fourslash.js.map +1 -1
  745. package/dist/tests/fourslash/missingTypeStub.command.multipart.fourslash.d.ts +1 -6
  746. package/dist/tests/fourslash/missingTypeStub.command.multipart.fourslash.js +2 -1
  747. package/dist/tests/fourslash/missingTypeStub.command.multipart.fourslash.js.map +1 -1
  748. package/dist/tests/fourslash/missingTypeStub.command.singlefile.fourslash.d.ts +1 -6
  749. package/dist/tests/fourslash/missingTypeStub.command.singlefile.fourslash.js +2 -1
  750. package/dist/tests/fourslash/missingTypeStub.command.singlefile.fourslash.js.map +1 -1
  751. package/dist/tests/fourslash/missingTypeStub.command.singlepart.fourslash.d.ts +1 -6
  752. package/dist/tests/fourslash/missingTypeStub.command.singlepart.fourslash.js +2 -1
  753. package/dist/tests/fourslash/missingTypeStub.command.singlepart.fourslash.js.map +1 -1
  754. package/dist/tests/fourslash/missingTypeStub.command.trycatchImport.fourslash.d.ts +1 -6
  755. package/dist/tests/fourslash/missingTypeStub.command.trycatchImport.fourslash.js +2 -1
  756. package/dist/tests/fourslash/missingTypeStub.command.trycatchImport.fourslash.js.map +1 -1
  757. package/dist/tests/fourslash/missingTypeStub.fourslash.d.ts +1 -0
  758. package/dist/tests/fourslash/missingTypeStub.fourslash.js +2 -1
  759. package/dist/tests/fourslash/missingTypeStub.fourslash.js.map +1 -1
  760. package/dist/tests/fourslash/missingTypeStub.invokeCodeAction.fourslash.d.ts +1 -0
  761. package/dist/tests/fourslash/missingTypeStub.invokeCodeAction.fourslash.js +2 -1
  762. package/dist/tests/fourslash/missingTypeStub.invokeCodeAction.fourslash.js.map +1 -1
  763. package/dist/tests/fourslash/noerrors.fourslash.d.ts +1 -0
  764. package/dist/tests/fourslash/noerrors.fourslash.js +2 -1
  765. package/dist/tests/fourslash/noerrors.fourslash.js.map +1 -1
  766. package/dist/tests/fourslash/orderImports1.command.fourslash.d.ts +1 -0
  767. package/dist/tests/fourslash/orderImports1.command.fourslash.js +2 -1
  768. package/dist/tests/fourslash/orderImports1.command.fourslash.js.map +1 -1
  769. package/dist/tests/fourslash/orderImports2.command.fourslash.d.ts +1 -0
  770. package/dist/tests/fourslash/orderImports2.command.fourslash.js +2 -1
  771. package/dist/tests/fourslash/orderImports2.command.fourslash.js.map +1 -1
  772. package/dist/tests/fourslash/rename.args.fourslash.d.ts +1 -0
  773. package/dist/tests/fourslash/rename.args.fourslash.js +2 -1
  774. package/dist/tests/fourslash/rename.args.fourslash.js.map +1 -1
  775. package/dist/tests/fourslash/rename.externallyHidden.fourslash.d.ts +1 -0
  776. package/dist/tests/fourslash/rename.externallyHidden.fourslash.js +2 -1
  777. package/dist/tests/fourslash/rename.externallyHidden.fourslash.js.map +1 -1
  778. package/dist/tests/fourslash/rename.externallyHidden.params.fourslash.d.ts +1 -0
  779. package/dist/tests/fourslash/rename.externallyHidden.params.fourslash.js +2 -1
  780. package/dist/tests/fourslash/rename.externallyHidden.params.fourslash.js.map +1 -1
  781. package/dist/tests/fourslash/rename.fourslash.d.ts +1 -0
  782. package/dist/tests/fourslash/rename.fourslash.js +2 -1
  783. package/dist/tests/fourslash/rename.fourslash.js.map +1 -1
  784. package/dist/tests/fourslash/rename.function.untitledFile.fourslash.d.ts +1 -0
  785. package/dist/tests/fourslash/rename.function.untitledFile.fourslash.js +2 -1
  786. package/dist/tests/fourslash/rename.function.untitledFile.fourslash.js.map +1 -1
  787. package/dist/tests/fourslash/rename.init.fourslash.d.ts +1 -0
  788. package/dist/tests/fourslash/rename.init.fourslash.js +2 -1
  789. package/dist/tests/fourslash/rename.init.fourslash.js.map +1 -1
  790. package/dist/tests/fourslash/rename.library.fourslash.d.ts +1 -0
  791. package/dist/tests/fourslash/rename.library.fourslash.js +2 -1
  792. package/dist/tests/fourslash/rename.library.fourslash.js.map +1 -1
  793. package/dist/tests/fourslash/rename.library.sourceAndStub.fourslash.d.ts +1 -0
  794. package/dist/tests/fourslash/rename.library.sourceAndStub.fourslash.js +2 -1
  795. package/dist/tests/fourslash/rename.library.sourceAndStub.fourslash.js.map +1 -1
  796. package/dist/tests/fourslash/rename.multipleDecl.fourslash.d.ts +1 -1
  797. package/dist/tests/fourslash/rename.multipleDecl.fourslash.js +2 -1
  798. package/dist/tests/fourslash/rename.multipleDecl.fourslash.js.map +1 -1
  799. package/dist/tests/fourslash/rename.parens.fourslash.d.ts +1 -0
  800. package/dist/tests/fourslash/rename.parens.fourslash.js +2 -1
  801. package/dist/tests/fourslash/rename.parens.fourslash.js.map +1 -1
  802. package/dist/tests/fourslash/rename.sourceAndStub.fourslash.d.ts +1 -0
  803. package/dist/tests/fourslash/rename.sourceAndStub.fourslash.js +2 -1
  804. package/dist/tests/fourslash/rename.sourceAndStub.fourslash.js.map +1 -1
  805. package/dist/tests/fourslash/rename.string.excluded.fourslash.d.ts +1 -0
  806. package/dist/tests/fourslash/rename.string.excluded.fourslash.js +2 -1
  807. package/dist/tests/fourslash/rename.string.excluded.fourslash.js.map +1 -1
  808. package/dist/tests/fourslash/rename.string.fourslash.d.ts +1 -0
  809. package/dist/tests/fourslash/rename.string.fourslash.js +2 -1
  810. package/dist/tests/fourslash/rename.string.fourslash.js.map +1 -1
  811. package/dist/tests/fourslash/shadowedImports.fourslash.d.ts +1 -0
  812. package/dist/tests/fourslash/shadowedImports.fourslash.js +2 -1
  813. package/dist/tests/fourslash/shadowedImports.fourslash.js.map +1 -1
  814. package/dist/tests/fourslash/showcallhierarchy.incomingCalls.aliasedFunction.fourslash.d.ts +1 -0
  815. package/dist/tests/fourslash/showcallhierarchy.incomingCalls.aliasedFunction.fourslash.js +2 -1
  816. package/dist/tests/fourslash/showcallhierarchy.incomingCalls.aliasedFunction.fourslash.js.map +1 -1
  817. package/dist/tests/fourslash/showcallhierarchy.incomingCalls.aliasedVariable.fourslash.d.ts +1 -0
  818. package/dist/tests/fourslash/showcallhierarchy.incomingCalls.aliasedVariable.fourslash.js +2 -1
  819. package/dist/tests/fourslash/showcallhierarchy.incomingCalls.aliasedVariable.fourslash.js.map +1 -1
  820. package/dist/tests/fourslash/showcallhierarchy.incomingCalls.function.fourslash.d.ts +1 -0
  821. package/dist/tests/fourslash/showcallhierarchy.incomingCalls.function.fourslash.js +2 -1
  822. package/dist/tests/fourslash/showcallhierarchy.incomingCalls.function.fourslash.js.map +1 -1
  823. package/dist/tests/fourslash/showcallhierarchy.outgoingCalls.aliasedFunction1.fourslash.d.ts +1 -0
  824. package/dist/tests/fourslash/showcallhierarchy.outgoingCalls.aliasedFunction1.fourslash.js +2 -1
  825. package/dist/tests/fourslash/showcallhierarchy.outgoingCalls.aliasedFunction1.fourslash.js.map +1 -1
  826. package/dist/tests/fourslash/showcallhierarchy.outgoingCalls.aliasedFunction2.fourslash.d.ts +1 -0
  827. package/dist/tests/fourslash/showcallhierarchy.outgoingCalls.aliasedFunction2.fourslash.js +2 -1
  828. package/dist/tests/fourslash/showcallhierarchy.outgoingCalls.aliasedFunction2.fourslash.js.map +1 -1
  829. package/dist/tests/fourslash/showcallhierarchy.outgoingCalls.function.fourslash.d.ts +1 -0
  830. package/dist/tests/fourslash/showcallhierarchy.outgoingCalls.function.fourslash.js +2 -1
  831. package/dist/tests/fourslash/showcallhierarchy.outgoingCalls.function.fourslash.js.map +1 -1
  832. package/dist/tests/fourslash/signature.builtinDocstrings.fourslash.d.ts +1 -0
  833. package/dist/tests/fourslash/signature.builtinDocstrings.fourslash.js +2 -1
  834. package/dist/tests/fourslash/signature.builtinDocstrings.fourslash.js.map +1 -1
  835. package/dist/tests/fourslash/signature.complicated.fourslash.d.ts +1 -0
  836. package/dist/tests/fourslash/signature.complicated.fourslash.js +2 -1
  837. package/dist/tests/fourslash/signature.complicated.fourslash.js.map +1 -1
  838. package/dist/tests/fourslash/signature.cornercases.fourslash.d.ts +1 -0
  839. package/dist/tests/fourslash/signature.cornercases.fourslash.js +2 -1
  840. package/dist/tests/fourslash/signature.cornercases.fourslash.js.map +1 -1
  841. package/dist/tests/fourslash/signature.docstrings.fourslash.d.ts +1 -0
  842. package/dist/tests/fourslash/signature.docstrings.fourslash.js +2 -1
  843. package/dist/tests/fourslash/signature.docstrings.fourslash.js.map +1 -1
  844. package/dist/tests/fourslash/signature.docstrings.overloaded.fourslash.d.ts +1 -0
  845. package/dist/tests/fourslash/signature.docstrings.overloaded.fourslash.js +2 -1
  846. package/dist/tests/fourslash/signature.docstrings.overloaded.fourslash.js.map +1 -1
  847. package/dist/tests/fourslash/signature.docstrings.wildcardimports.fourslash.d.ts +1 -0
  848. package/dist/tests/fourslash/signature.docstrings.wildcardimports.fourslash.js +2 -1
  849. package/dist/tests/fourslash/signature.docstrings.wildcardimports.fourslash.js.map +1 -1
  850. package/dist/tests/fourslash/signature.dunderNew.fourslash.d.ts +1 -0
  851. package/dist/tests/fourslash/signature.dunderNew.fourslash.js +2 -1
  852. package/dist/tests/fourslash/signature.dunderNew.fourslash.js.map +1 -1
  853. package/dist/tests/fourslash/signature.overload.fourslash.d.ts +1 -0
  854. package/dist/tests/fourslash/signature.overload.fourslash.js +2 -1
  855. package/dist/tests/fourslash/signature.overload.fourslash.js.map +1 -1
  856. package/dist/tests/fourslash/signature.simple.fourslash.d.ts +1 -0
  857. package/dist/tests/fourslash/signature.simple.fourslash.js +2 -1
  858. package/dist/tests/fourslash/signature.simple.fourslash.js.map +1 -1
  859. package/dist/tests/fourslash/typeVerifier.fourslash.d.ts +1 -0
  860. package/dist/tests/fourslash/typeVerifier.fourslash.js +2 -1
  861. package/dist/tests/fourslash/typeVerifier.fourslash.js.map +1 -1
  862. package/dist/tests/harness/fourslash/testState.js +11 -9
  863. package/dist/tests/harness/fourslash/testState.js.map +1 -1
  864. package/dist/tests/lsp/languageServerTestUtils.js +1 -1
  865. package/dist/tests/lsp/languageServerTestUtils.js.map +1 -1
  866. package/dist/tests/testState.test.js +3 -3
  867. package/dist/tests/typeEvaluator2.test.js +2 -2
  868. package/dist/tests/typeEvaluator4.test.js +1 -1
  869. package/dist/tests/typeEvaluator6.test.js +34 -36
  870. package/dist/tests/typeEvaluator6.test.js.map +1 -1
  871. package/dist/workspaceFactory.d.ts +12 -12
  872. package/dist/workspaceFactory.js +21 -141
  873. package/dist/workspaceFactory.js.map +1 -1
  874. package/package.json +5 -4
  875. package/dist/tests/fourslash/fourslash.d.ts +0 -338
  876. package/dist/tests/fourslash/fourslash.js +0 -25
  877. package/dist/tests/fourslash/fourslash.js.map +0 -1
@@ -617,13 +617,12 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
617
617
  break;
618
618
  }
619
619
  case 48 /* ParseNodeType.StringList */: {
620
- const isExpectingType = (flags & 8 /* EvalFlags.StrLiteralAsType */) !== 0 && !isAnnotationLiteralValue(node);
621
- if (isExpectingType) {
620
+ if ((flags & 8 /* EvalFlags.StrLiteralAsType */) !== 0) {
622
621
  // Don't report expecting type errors again. We will have already
623
622
  // reported them when analyzing the contents of the string.
624
623
  expectingInstantiable = false;
625
624
  }
626
- typeResult = getTypeOfStringList(node, flags, isExpectingType);
625
+ typeResult = getTypeOfStringList(node, flags);
627
626
  break;
628
627
  }
629
628
  case 40 /* ParseNodeType.Number */: {
@@ -889,92 +888,102 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
889
888
  }
890
889
  return typeResult;
891
890
  }
892
- function getTypeOfStringList(node, flags, isExpectingType) {
891
+ function getTypeOfStringList(node, flags) {
893
892
  let typeResult;
894
- if (isExpectingType) {
895
- let updatedFlags = flags | 4 /* EvalFlags.ForwardRefs */ | 128 /* EvalFlags.InstantiableType */;
896
- // In most cases, annotations within a string are not parsed by the interpreter.
897
- // There are a few exceptions (e.g. the "bound" value for a TypeVar constructor).
898
- if ((flags & 8388608 /* EvalFlags.ParsesStringLiteral */) === 0) {
899
- updatedFlags |= 524288 /* EvalFlags.NotParsed */;
900
- }
901
- if (node.d.annotation) {
902
- typeResult = getTypeOfExpression(node.d.annotation, updatedFlags);
903
- }
904
- else if (!node.d.annotation && node.d.strings.length === 1) {
905
- const tokenFlags = node.d.strings[0].d.token.flags;
906
- if (tokenFlags & 32 /* StringTokenFlags.Bytes */) {
907
- addDiagnostic(diagnosticRules_1.DiagnosticRule.reportGeneralTypeIssues, localize_1.LocMessage.annotationBytesString(), node);
908
- typeResult = { type: types_1.UnknownType.create() };
893
+ if ((flags & 8 /* EvalFlags.StrLiteralAsType */) !== 0) {
894
+ return getTypeOfStringListAsType(node, flags);
895
+ }
896
+ let isLiteralString = true;
897
+ let isIncomplete = false;
898
+ node.d.strings.forEach((expr) => {
899
+ const typeResult = getTypeOfString(expr);
900
+ if (typeResult.isIncomplete) {
901
+ isIncomplete = true;
902
+ }
903
+ let isExprLiteralString = false;
904
+ if ((0, types_1.isClassInstance)(typeResult.type)) {
905
+ if (types_1.ClassType.isBuiltIn(typeResult.type, 'str') && typeResult.type.priv.literalValue !== undefined) {
906
+ isExprLiteralString = true;
909
907
  }
910
- else if (tokenFlags & 8 /* StringTokenFlags.Raw */) {
911
- addDiagnostic(diagnosticRules_1.DiagnosticRule.reportGeneralTypeIssues, localize_1.LocMessage.annotationRawString(), node);
912
- typeResult = { type: types_1.UnknownType.create() };
908
+ else if (types_1.ClassType.isBuiltIn(typeResult === null || typeResult === void 0 ? void 0 : typeResult.type, 'LiteralString')) {
909
+ isExprLiteralString = true;
913
910
  }
914
- else if (tokenFlags & 64 /* StringTokenFlags.Format */) {
915
- addDiagnostic(diagnosticRules_1.DiagnosticRule.reportGeneralTypeIssues, localize_1.LocMessage.annotationFormatString(), node);
916
- typeResult = { type: types_1.UnknownType.create() };
917
- }
918
- else {
919
- // We didn't know at parse time that this string node was going
920
- // to be evaluated as a forward-referenced type. We need
921
- // to re-invoke the parser at this stage.
922
- const expr = parseStringAsTypeAnnotation(node);
923
- if (expr) {
924
- typeResult = getTypeOfExpression(expr, updatedFlags);
925
- }
911
+ }
912
+ if (!isExprLiteralString) {
913
+ isLiteralString = false;
914
+ }
915
+ });
916
+ const isBytes = (node.d.strings[0].d.token.flags & 32 /* StringTokenFlags.Bytes */) !== 0;
917
+ // Don't create a literal type if it's an f-string.
918
+ if (node.d.strings.some((str) => str.nodeType === 30 /* ParseNodeType.FormatString */)) {
919
+ if (isLiteralString) {
920
+ const literalStringType = getTypingType(node, 'LiteralString');
921
+ if (literalStringType && (0, types_1.isInstantiableClass)(literalStringType)) {
922
+ typeResult = { type: types_1.ClassType.cloneAsInstance(literalStringType) };
926
923
  }
927
924
  }
928
925
  if (!typeResult) {
929
- addDiagnostic(diagnosticRules_1.DiagnosticRule.reportGeneralTypeIssues, localize_1.LocMessage.expectedTypeNotString(), node);
930
- typeResult = { type: types_1.UnknownType.create() };
926
+ typeResult = {
927
+ type: getBuiltInObject(node, isBytes ? 'bytes' : 'str'),
928
+ isIncomplete,
929
+ };
931
930
  }
932
931
  }
933
932
  else {
934
- // Evaluate the format string expressions in this context.
935
- let isLiteralString = true;
936
- let isIncomplete = false;
937
- node.d.strings.forEach((expr) => {
938
- const typeResult = getTypeOfString(expr);
939
- if (typeResult.isIncomplete) {
940
- isIncomplete = true;
941
- }
942
- let isExprLiteralString = false;
943
- if ((0, types_1.isClassInstance)(typeResult.type)) {
944
- if (types_1.ClassType.isBuiltIn(typeResult.type, 'str') &&
945
- typeResult.type.priv.literalValue !== undefined) {
946
- isExprLiteralString = true;
947
- }
948
- else if (types_1.ClassType.isBuiltIn(typeResult === null || typeResult === void 0 ? void 0 : typeResult.type, 'LiteralString')) {
949
- isExprLiteralString = true;
950
- }
951
- }
952
- if (!isExprLiteralString) {
953
- isLiteralString = false;
933
+ typeResult = {
934
+ type: cloneBuiltinObjectWithLiteral(node, isBytes ? 'bytes' : 'str', node.d.strings.map((s) => s.d.value).join('')),
935
+ isIncomplete,
936
+ };
937
+ }
938
+ return typeResult;
939
+ }
940
+ function getTypeOfStringListAsType(node, flags) {
941
+ const reportTypeErrors = (flags & 8 /* EvalFlags.StrLiteralAsType */) !== 0;
942
+ let updatedFlags = flags | 4 /* EvalFlags.ForwardRefs */ | 128 /* EvalFlags.InstantiableType */;
943
+ let typeResult;
944
+ // In most cases, annotations within a string are not parsed by the interpreter.
945
+ // There are a few exceptions (e.g. the "bound" value for a TypeVar constructor).
946
+ if ((flags & 8388608 /* EvalFlags.ParsesStringLiteral */) === 0) {
947
+ updatedFlags |= 524288 /* EvalFlags.NotParsed */;
948
+ }
949
+ if (node.d.annotation) {
950
+ return getTypeOfExpression(node.d.annotation, updatedFlags);
951
+ }
952
+ if (node.d.strings.length === 1) {
953
+ const tokenFlags = node.d.strings[0].d.token.flags;
954
+ if (tokenFlags & 32 /* StringTokenFlags.Bytes */) {
955
+ if (reportTypeErrors) {
956
+ addDiagnostic(diagnosticRules_1.DiagnosticRule.reportGeneralTypeIssues, localize_1.LocMessage.annotationBytesString(), node);
954
957
  }
955
- });
956
- const isBytes = (node.d.strings[0].d.token.flags & 32 /* StringTokenFlags.Bytes */) !== 0;
957
- // Don't create a literal type if it's an f-string.
958
- if (node.d.strings.some((str) => str.nodeType === 30 /* ParseNodeType.FormatString */)) {
959
- if (isLiteralString) {
960
- const literalStringType = getTypingType(node, 'LiteralString');
961
- if (literalStringType && (0, types_1.isInstantiableClass)(literalStringType)) {
962
- typeResult = { type: types_1.ClassType.cloneAsInstance(literalStringType) };
963
- }
958
+ return { type: types_1.UnknownType.create() };
959
+ }
960
+ if (tokenFlags & 8 /* StringTokenFlags.Raw */) {
961
+ if (reportTypeErrors) {
962
+ addDiagnostic(diagnosticRules_1.DiagnosticRule.reportGeneralTypeIssues, localize_1.LocMessage.annotationRawString(), node);
964
963
  }
965
- if (!typeResult) {
966
- typeResult = {
967
- type: getBuiltInObject(node, isBytes ? 'bytes' : 'str'),
968
- isIncomplete,
969
- };
964
+ return { type: types_1.UnknownType.create() };
965
+ }
966
+ if (tokenFlags & 64 /* StringTokenFlags.Format */) {
967
+ if (reportTypeErrors) {
968
+ addDiagnostic(diagnosticRules_1.DiagnosticRule.reportGeneralTypeIssues, localize_1.LocMessage.annotationFormatString(), node);
970
969
  }
970
+ return { type: types_1.UnknownType.create() };
971
971
  }
972
- else {
973
- typeResult = {
974
- type: cloneBuiltinObjectWithLiteral(node, isBytes ? 'bytes' : 'str', node.d.strings.map((s) => s.d.value).join('')),
975
- isIncomplete,
976
- };
972
+ // We didn't know at parse time that this string node was going
973
+ // to be evaluated as a forward-referenced type. We need
974
+ // to re-invoke the parser at this stage.
975
+ const expr = parseStringAsTypeAnnotation(node, reportTypeErrors);
976
+ if (expr) {
977
+ typeResult = useSpeculativeMode(reportTypeErrors ? undefined : node, () => {
978
+ return getTypeOfExpression(expr, updatedFlags);
979
+ });
980
+ }
981
+ }
982
+ if (!typeResult) {
983
+ if (reportTypeErrors) {
984
+ addDiagnostic(diagnosticRules_1.DiagnosticRule.reportGeneralTypeIssues, localize_1.LocMessage.expectedTypeNotString(), node);
977
985
  }
986
+ typeResult = { type: types_1.UnknownType.create() };
978
987
  }
979
988
  return typeResult;
980
989
  }
@@ -1046,7 +1055,7 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
1046
1055
  var _a;
1047
1056
  if ((0, types_1.isClass)(subtype)) {
1048
1057
  if (subtype.priv.literalValue !== undefined) {
1049
- return types_1.ClassType.cloneWithLiteral(subtype, /* value */ undefined);
1058
+ subtype = types_1.ClassType.cloneWithLiteral(subtype, /* value */ undefined);
1050
1059
  }
1051
1060
  if (types_1.ClassType.isBuiltIn(subtype, 'LiteralString')) {
1052
1061
  // Handle "LiteralString" specially.
@@ -2094,20 +2103,6 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
2094
2103
  return (codeFlowEngine.getFlowNodeReachability(sinkFlowNode, sourceFlowNode, /* ignoreNoReturn */ true) ===
2095
2104
  typeEvaluatorTypes_1.Reachability.Reachable);
2096
2105
  }
2097
- // Determines whether the specified string literal is part
2098
- // of a Literal['xxx'] statement. If so, we will not treat
2099
- // the string as a normal forward-declared type annotation.
2100
- function isAnnotationLiteralValue(node) {
2101
- if (node.parent && node.parent.nodeType === 27 /* ParseNodeType.Index */) {
2102
- const baseType = getTypeOfExpression(node.parent.d.leftExpr).type;
2103
- if (baseType && (0, types_1.isInstantiableClass)(baseType)) {
2104
- if (types_1.ClassType.isSpecialBuiltIn(baseType, 'Literal')) {
2105
- return true;
2106
- }
2107
- }
2108
- }
2109
- return false;
2110
- }
2111
2106
  function addInformation(message, node, range) {
2112
2107
  return addDiagnosticWithSuppressionCheck('information', message, node, range);
2113
2108
  }
@@ -3138,7 +3133,7 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
3138
3133
  // evaluated in a value expression context, convert it from its special
3139
3134
  // meaning to its runtime value.
3140
3135
  function convertSpecialFormToRuntimeValue(type, flags) {
3141
- var _a, _b, _c;
3136
+ var _a, _b;
3142
3137
  const exemptFlags = 256 /* EvalFlags.TypeExpression */ | 128 /* EvalFlags.InstantiableType */ | 33554432 /* EvalFlags.NoConvertSpecialForm */;
3143
3138
  if ((flags & exemptFlags) !== 0) {
3144
3139
  return type;
@@ -3150,7 +3145,10 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
3150
3145
  return type;
3151
3146
  }
3152
3147
  }
3153
- return (_c = (_b = type.props) === null || _b === void 0 ? void 0 : _b.specialForm) !== null && _c !== void 0 ? _c : type;
3148
+ if (!((_b = type.props) === null || _b === void 0 ? void 0 : _b.specialForm)) {
3149
+ return type;
3150
+ }
3151
+ return type.props.specialForm;
3154
3152
  }
3155
3153
  // Handles the case where a variable or parameter is defined in an outer
3156
3154
  // scope and captured by an inner scope (a function, lambda, or comprehension).
@@ -3367,7 +3365,7 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
3367
3365
  // type arguments. If so, it fills in these type arguments with Unknown
3368
3366
  // and optionally reports an error.
3369
3367
  function reportMissingTypeArgs(node, type, flags) {
3370
- var _a, _b, _c;
3368
+ var _a, _b;
3371
3369
  if ((flags & 2 /* EvalFlags.NoSpecialize */) !== 0) {
3372
3370
  return type;
3373
3371
  }
@@ -3387,49 +3385,8 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
3387
3385
  }
3388
3386
  }
3389
3387
  // Is this a generic type alias that needs to be specialized?
3390
- const aliasInfo = (_c = type.props) === null || _c === void 0 ? void 0 : _c.typeAliasInfo;
3391
- if ((flags & 128 /* EvalFlags.InstantiableType */) !== 0 &&
3392
- aliasInfo &&
3393
- aliasInfo.typeParams &&
3394
- aliasInfo.typeParams.length > 0 &&
3395
- !aliasInfo.typeArgs) {
3396
- let reportMissingTypeArgs = false;
3397
- const defaultTypeArgs = [];
3398
- const constraints = new constraintTracker_1.ConstraintTracker();
3399
- aliasInfo.typeParams.forEach((param) => {
3400
- if (!param.shared.isDefaultExplicit) {
3401
- reportMissingTypeArgs = true;
3402
- }
3403
- let defaultType;
3404
- if (param.shared.isDefaultExplicit || (0, types_1.isParamSpec)(param)) {
3405
- defaultType = solveAndApplyConstraints(param, constraints, {
3406
- replaceUnsolved: {
3407
- scopeIds: [aliasInfo.typeVarScopeId],
3408
- tupleClassType: getTupleClassType(),
3409
- },
3410
- });
3411
- }
3412
- else if ((0, types_1.isTypeVarTuple)(param) && tupleClass && (0, types_1.isInstantiableClass)(tupleClass)) {
3413
- defaultType = makeTupleObject([{ type: types_1.UnknownType.create(), isUnbounded: true }],
3414
- /* isUnpacked */ true);
3415
- }
3416
- else {
3417
- defaultType = types_1.UnknownType.create();
3418
- }
3419
- defaultTypeArgs.push(defaultType);
3420
- constraints.setBounds(param, defaultType);
3421
- });
3422
- if (reportMissingTypeArgs) {
3423
- addDiagnostic(diagnosticRules_1.DiagnosticRule.reportMissingTypeArgument, localize_1.LocMessage.typeArgsMissingForAlias().format({
3424
- name: aliasInfo.name,
3425
- }), node);
3426
- }
3427
- type = types_1.TypeBase.cloneForTypeAlias(solveAndApplyConstraints(type, constraints, {
3428
- replaceUnsolved: {
3429
- scopeIds: [aliasInfo.typeVarScopeId],
3430
- tupleClassType: getTupleClassType(),
3431
- },
3432
- }), { ...aliasInfo, typeArgs: defaultTypeArgs });
3388
+ if ((flags & 128 /* EvalFlags.InstantiableType */) !== 0) {
3389
+ type = specializeTypeAliasWithDefaults(type, node);
3433
3390
  }
3434
3391
  return type;
3435
3392
  }
@@ -4716,6 +4673,59 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
4716
4673
  }
4717
4674
  return true;
4718
4675
  }
4676
+ // If the type is a generic type alias that is not specialized, provides
4677
+ // default type arguments for the type alias. It optionally logs diagnostics
4678
+ // for missing type arguments.
4679
+ function specializeTypeAliasWithDefaults(type, errorNode) {
4680
+ var _a;
4681
+ // Is this a type alias?
4682
+ const aliasInfo = (_a = type.props) === null || _a === void 0 ? void 0 : _a.typeAliasInfo;
4683
+ if (!aliasInfo) {
4684
+ return type;
4685
+ }
4686
+ // Is this a generic type alias that needs specializing?
4687
+ if (!aliasInfo.typeParams || aliasInfo.typeParams.length === 0 || aliasInfo.typeArgs) {
4688
+ return type;
4689
+ }
4690
+ let reportDiag = false;
4691
+ const defaultTypeArgs = [];
4692
+ const constraints = new constraintTracker_1.ConstraintTracker();
4693
+ aliasInfo.typeParams.forEach((param) => {
4694
+ if (!param.shared.isDefaultExplicit) {
4695
+ reportDiag = true;
4696
+ }
4697
+ let defaultType;
4698
+ if (param.shared.isDefaultExplicit || (0, types_1.isParamSpec)(param)) {
4699
+ defaultType = solveAndApplyConstraints(param, constraints, {
4700
+ replaceUnsolved: {
4701
+ scopeIds: [aliasInfo.typeVarScopeId],
4702
+ tupleClassType: getTupleClassType(),
4703
+ },
4704
+ });
4705
+ }
4706
+ else if ((0, types_1.isTypeVarTuple)(param) && tupleClass && (0, types_1.isInstantiableClass)(tupleClass)) {
4707
+ defaultType = makeTupleObject([{ type: types_1.UnknownType.create(), isUnbounded: true }],
4708
+ /* isUnpacked */ true);
4709
+ }
4710
+ else {
4711
+ defaultType = types_1.UnknownType.create();
4712
+ }
4713
+ defaultTypeArgs.push(defaultType);
4714
+ constraints.setBounds(param, defaultType);
4715
+ });
4716
+ if (reportDiag && errorNode) {
4717
+ addDiagnostic(diagnosticRules_1.DiagnosticRule.reportMissingTypeArgument, localize_1.LocMessage.typeArgsMissingForAlias().format({
4718
+ name: aliasInfo.name,
4719
+ }), errorNode);
4720
+ }
4721
+ type = types_1.TypeBase.cloneForTypeAlias(solveAndApplyConstraints(type, constraints, {
4722
+ replaceUnsolved: {
4723
+ scopeIds: [aliasInfo.typeVarScopeId],
4724
+ tupleClassType: getTupleClassType(),
4725
+ },
4726
+ }), { ...aliasInfo, typeArgs: defaultTypeArgs });
4727
+ return type;
4728
+ }
4719
4729
  // Handles index expressions that are providing type arguments for a
4720
4730
  // generic type alias.
4721
4731
  function createSpecializedTypeAlias(node, baseType, flags) {
@@ -9129,7 +9139,7 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
9129
9139
  }
9130
9140
  // Specifically disallow Annotated.
9131
9141
  if (((_d = baseClass.props) === null || _d === void 0 ? void 0 : _d.specialForm) &&
9132
- (0, types_1.isInstantiableClass)(baseClass.props.specialForm) &&
9142
+ (0, types_1.isClassInstance)(baseClass.props.specialForm) &&
9133
9143
  types_1.ClassType.isBuiltIn(baseClass.props.specialForm, 'Annotated')) {
9134
9144
  addDiagnostic(diagnosticRules_1.DiagnosticRule.reportGeneralTypeIssues, localize_1.LocMessage.newTypeNotAClass(), argList[1].node || errorNode);
9135
9145
  return undefined;
@@ -10083,7 +10093,7 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
10083
10093
  paramsArePositionOnly = false;
10084
10094
  }
10085
10095
  }
10086
- const functionParam = types_1.FunctionParam.create(param.d.category, paramType !== null && paramType !== void 0 ? paramType : types_1.UnknownType.create(), types_1.FunctionParamFlags.TypeDeclared, param.d.name ? param.d.name.d.value : undefined, param.d.defaultValue ? types_1.AnyType.create(/* isEllipsis */ true) : undefined);
10096
+ const functionParam = types_1.FunctionParam.create(param.d.category, paramType !== null && paramType !== void 0 ? paramType : types_1.UnknownType.create(), types_1.FunctionParamFlags.TypeDeclared, param.d.name ? param.d.name.d.value : undefined, param.d.defaultValue ? types_1.AnyType.create(/* isEllipsis */ true) : undefined, param.d.defaultValue);
10087
10097
  types_1.FunctionType.addParam(functionType, functionParam);
10088
10098
  });
10089
10099
  if (paramsArePositionOnly && functionType.shared.parameters.length > 0) {
@@ -10351,7 +10361,7 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
10351
10361
  function createCallableType(classType, typeArgs, errorNode) {
10352
10362
  const functionType = types_1.FunctionType.createInstantiable(0 /* FunctionTypeFlags.None */);
10353
10363
  let paramSpec;
10354
- types_1.TypeBase.setSpecialForm(functionType, classType);
10364
+ types_1.TypeBase.setSpecialForm(functionType, types_1.ClassType.cloneAsInstance(classType));
10355
10365
  functionType.shared.declaredReturnType = types_1.UnknownType.create();
10356
10366
  functionType.shared.typeVarScopeId = ParseTreeUtils.getScopeIdForNode(errorNode);
10357
10367
  if (typeArgs && typeArgs.length > 0) {
@@ -10623,6 +10633,27 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
10623
10633
  }
10624
10634
  return type;
10625
10635
  }
10636
+ function createTypeFormType(classType, errorNode, typeArgs) {
10637
+ // If no type arguments are provided, the resulting type
10638
+ // depends on whether we're evaluating a type annotation or
10639
+ // we're in some other context.
10640
+ if (!typeArgs) {
10641
+ return classType;
10642
+ }
10643
+ if (typeArgs.length > 1) {
10644
+ addDiagnostic(diagnosticRules_1.DiagnosticRule.reportInvalidTypeForm, localize_1.LocMessage.typeArgsTooMany().format({
10645
+ name: classType.priv.aliasName || classType.shared.name,
10646
+ expected: 1,
10647
+ received: typeArgs.length,
10648
+ }), typeArgs[1].node);
10649
+ return types_1.UnknownType.create();
10650
+ }
10651
+ const convertedTypeArgs = typeArgs.map((typeArg) => {
10652
+ return (0, typeUtils_1.convertToInstance)(validateTypeArg(typeArg) ? typeArg.type : types_1.UnknownType.create());
10653
+ });
10654
+ const resultType = types_1.ClassType.specialize(classType, convertedTypeArgs);
10655
+ return resultType;
10656
+ }
10626
10657
  // Creates a "TypeGuard" and "TypeIs" type.
10627
10658
  function createTypeGuardType(classType, errorNode, typeArgs, flags) {
10628
10659
  // If no type arguments are provided, the resulting type
@@ -10641,7 +10672,8 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
10641
10672
  const convertedTypeArgs = typeArgs.map((typeArg) => {
10642
10673
  return (0, typeUtils_1.convertToInstance)(validateTypeArg(typeArg) ? typeArg.type : types_1.UnknownType.create());
10643
10674
  });
10644
- return types_1.ClassType.specialize(classType, convertedTypeArgs);
10675
+ const resultType = types_1.ClassType.specialize(classType, convertedTypeArgs);
10676
+ return resultType;
10645
10677
  }
10646
10678
  function createSelfType(classType, errorNode, typeArgs, flags) {
10647
10679
  var _a;
@@ -10716,11 +10748,13 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
10716
10748
  return { type: classType };
10717
10749
  }
10718
10750
  if (!typeArgs || typeArgs.length !== 1) {
10719
- addDiagnostic(diagnosticRules_1.DiagnosticRule.reportInvalidTypeForm, classType.shared.name === 'ReadOnly'
10720
- ? localize_1.LocMessage.readOnlyArgCount()
10721
- : classType.shared.name === 'Required'
10722
- ? localize_1.LocMessage.requiredArgCount()
10723
- : localize_1.LocMessage.notRequiredArgCount(), errorNode);
10751
+ if ((flags & 256 /* EvalFlags.TypeExpression */) !== 0) {
10752
+ addDiagnostic(diagnosticRules_1.DiagnosticRule.reportInvalidTypeForm, classType.shared.name === 'ReadOnly'
10753
+ ? localize_1.LocMessage.readOnlyArgCount()
10754
+ : classType.shared.name === 'Required'
10755
+ ? localize_1.LocMessage.requiredArgCount()
10756
+ : localize_1.LocMessage.notRequiredArgCount(), errorNode);
10757
+ }
10724
10758
  return { type: classType };
10725
10759
  }
10726
10760
  const typeArgType = typeArgs[0].type;
@@ -10758,25 +10792,23 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
10758
10792
  isNotRequired = classType.shared.name === 'NotRequired';
10759
10793
  }
10760
10794
  if (!isUsageLegal) {
10761
- addDiagnostic(diagnosticRules_1.DiagnosticRule.reportInvalidTypeForm, classType.shared.name === 'ReadOnly'
10762
- ? localize_1.LocMessage.readOnlyNotInTypedDict()
10763
- : classType.shared.name === 'Required'
10764
- ? localize_1.LocMessage.requiredNotInTypedDict()
10765
- : localize_1.LocMessage.notRequiredNotInTypedDict(), errorNode);
10766
- return { type: types_1.ClassType.specialize(classType, [(0, typeUtils_1.convertToInstance)(typeArgType)], !!typeArgs) };
10795
+ if ((flags & 256 /* EvalFlags.TypeExpression */) !== 0) {
10796
+ addDiagnostic(diagnosticRules_1.DiagnosticRule.reportInvalidTypeForm, classType.shared.name === 'ReadOnly'
10797
+ ? localize_1.LocMessage.readOnlyNotInTypedDict()
10798
+ : classType.shared.name === 'Required'
10799
+ ? localize_1.LocMessage.requiredNotInTypedDict()
10800
+ : localize_1.LocMessage.notRequiredNotInTypedDict(), errorNode);
10801
+ }
10802
+ return { type: classType };
10767
10803
  }
10768
10804
  return { type: typeArgType, isReadOnly, isRequired, isNotRequired };
10769
10805
  }
10770
10806
  function createUnpackType(classType, errorNode, typeArgs, flags) {
10771
- // If no type arguments are provided, the resulting type
10772
- // depends on whether we're evaluating a type annotation or
10773
- // we're in some other context.
10774
- if (!typeArgs && (flags & 256 /* EvalFlags.TypeExpression */) === 0) {
10775
- return classType;
10776
- }
10777
10807
  if (!typeArgs || typeArgs.length !== 1) {
10778
- addDiagnostic(diagnosticRules_1.DiagnosticRule.reportInvalidTypeForm, localize_1.LocMessage.unpackArgCount(), errorNode);
10779
- return types_1.UnknownType.create();
10808
+ if ((flags & 256 /* EvalFlags.TypeExpression */) !== 0) {
10809
+ addDiagnostic(diagnosticRules_1.DiagnosticRule.reportInvalidTypeForm, localize_1.LocMessage.unpackArgCount(), errorNode);
10810
+ }
10811
+ return classType;
10780
10812
  }
10781
10813
  let typeArgType = typeArgs[0].type;
10782
10814
  if ((0, types_1.isUnion)(typeArgType) && typeArgType.priv.subtypes.length === 1) {
@@ -10789,6 +10821,9 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
10789
10821
  if ((0, types_1.isTypeVarTuple)(typeArgType) && !typeArgType.priv.isUnpacked) {
10790
10822
  return types_1.TypeVarType.cloneForUnpacked(typeArgType);
10791
10823
  }
10824
+ if ((flags & 256 /* EvalFlags.TypeExpression */) === 0) {
10825
+ return classType;
10826
+ }
10792
10827
  addDiagnostic(diagnosticRules_1.DiagnosticRule.reportGeneralTypeIssues, localize_1.LocMessage.unpackExpectedTypeVarTuple(), errorNode);
10793
10828
  return types_1.UnknownType.create();
10794
10829
  }
@@ -10796,19 +10831,27 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
10796
10831
  if ((0, types_1.isInstantiableClass)(typeArgType) && types_1.ClassType.isTypedDictClass(typeArgType)) {
10797
10832
  return types_1.ClassType.cloneForUnpacked(typeArgType);
10798
10833
  }
10834
+ if ((flags & 256 /* EvalFlags.TypeExpression */) === 0) {
10835
+ return classType;
10836
+ }
10799
10837
  addDiagnostic(diagnosticRules_1.DiagnosticRule.reportGeneralTypeIssues, localize_1.LocMessage.unpackExpectedTypedDict(), errorNode);
10800
10838
  return types_1.UnknownType.create();
10801
10839
  }
10840
+ if ((flags & 256 /* EvalFlags.TypeExpression */) === 0) {
10841
+ return classType;
10842
+ }
10802
10843
  addDiagnostic(diagnosticRules_1.DiagnosticRule.reportGeneralTypeIssues, localize_1.LocMessage.unpackNotAllowed(), errorNode);
10803
10844
  return types_1.UnknownType.create();
10804
10845
  }
10805
10846
  // Creates a "Final" type.
10806
10847
  function createFinalType(classType, errorNode, typeArgs, flags) {
10807
10848
  if (flags & 16 /* EvalFlags.NoFinal */) {
10808
- addDiagnostic(diagnosticRules_1.DiagnosticRule.reportInvalidTypeForm, localize_1.LocMessage.finalContext(), errorNode);
10849
+ if ((flags & 256 /* EvalFlags.TypeExpression */) !== 0) {
10850
+ addDiagnostic(diagnosticRules_1.DiagnosticRule.reportInvalidTypeForm, localize_1.LocMessage.finalContext(), errorNode);
10851
+ }
10809
10852
  return classType;
10810
10853
  }
10811
- if (!typeArgs || typeArgs.length === 0) {
10854
+ if ((flags & 256 /* EvalFlags.TypeExpression */) === 0 || !typeArgs || typeArgs.length === 0) {
10812
10855
  return classType;
10813
10856
  }
10814
10857
  if (typeArgs.length > 1) {
@@ -10818,8 +10861,10 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
10818
10861
  }
10819
10862
  function createConcatenateType(classType, errorNode, typeArgs, flags) {
10820
10863
  if ((flags & 134217728 /* EvalFlags.AllowConcatenate */) === 0) {
10821
- addDiagnostic(diagnosticRules_1.DiagnosticRule.reportInvalidTypeForm, localize_1.LocMessage.concatenateContext(), errorNode);
10822
- return types_1.AnyType.create();
10864
+ if ((flags & 256 /* EvalFlags.TypeExpression */) !== 0) {
10865
+ addDiagnostic(diagnosticRules_1.DiagnosticRule.reportInvalidTypeForm, localize_1.LocMessage.concatenateContext(), errorNode);
10866
+ }
10867
+ return classType;
10823
10868
  }
10824
10869
  if (!typeArgs || typeArgs.length === 0) {
10825
10870
  addDiagnostic(diagnosticRules_1.DiagnosticRule.reportInvalidTypeForm, localize_1.LocMessage.concatenateTypeArgsMissing(), errorNode);
@@ -10847,69 +10892,81 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
10847
10892
  return createSpecialType(classType, typeArgs, /* paramLimit */ undefined, /* allowParamSpec */ true);
10848
10893
  }
10849
10894
  function createAnnotatedType(classType, errorNode, typeArgs, flags) {
10895
+ let type;
10850
10896
  const typeExprFlags = 256 /* EvalFlags.TypeExpression */ | 33554432 /* EvalFlags.NoConvertSpecialForm */;
10851
10897
  if ((flags & typeExprFlags) === 0) {
10852
- return { type: classType };
10898
+ type = types_1.ClassType.cloneAsInstance(classType);
10899
+ return { type };
10853
10900
  }
10854
- if (typeArgs) {
10901
+ if (typeArgs && typeArgs.length > 0) {
10902
+ type = typeArgs[0].type;
10855
10903
  if (typeArgs.length < 2) {
10856
10904
  addDiagnostic(diagnosticRules_1.DiagnosticRule.reportInvalidTypeForm, localize_1.LocMessage.annotatedTypeArgMissing(), errorNode);
10857
10905
  }
10858
10906
  else {
10859
- validateAnnotatedMetadata(errorNode, typeArgs[0].type, typeArgs.slice(1));
10907
+ type = validateAnnotatedMetadata(errorNode, typeArgs[0].type, typeArgs.slice(1));
10860
10908
  }
10861
10909
  }
10862
- if (!typeArgs || typeArgs.length === 0) {
10910
+ if (!type || !typeArgs || typeArgs.length === 0) {
10863
10911
  return { type: types_1.AnyType.create() };
10864
10912
  }
10865
10913
  if (typeArgs[0].typeList) {
10866
10914
  addDiagnostic(diagnosticRules_1.DiagnosticRule.reportInvalidTypeForm, localize_1.LocMessage.typeArgListNotAllowed(), typeArgs[0].node);
10867
10915
  }
10868
10916
  return {
10869
- type: types_1.TypeBase.cloneAsSpecialForm(typeArgs[0].type, classType),
10917
+ type: types_1.TypeBase.cloneAsSpecialForm(type, types_1.ClassType.cloneAsInstance(classType)),
10870
10918
  isReadOnly: typeArgs[0].isReadOnly,
10871
10919
  isRequired: typeArgs[0].isRequired,
10872
10920
  isNotRequired: typeArgs[0].isNotRequired,
10873
10921
  };
10874
10922
  }
10875
10923
  // Enforces metadata consistency as specified in PEP 746.
10876
- function validateAnnotatedMetadata(errorNode, annotatedType, metaArgs) {
10924
+ function validateAnnotatedMetadata(errorNode, baseType, metaArgs) {
10925
+ for (const metaArg of metaArgs) {
10926
+ validateTypeMetadata(errorNode, baseType, metaArg);
10927
+ }
10928
+ return baseType;
10929
+ }
10930
+ // Determines whether the metadata object is compatible with the base type.
10931
+ function validateTypeMetadata(errorNode, baseType, metaArg) {
10877
10932
  var _a;
10878
10933
  // This is an experimental feature because PEP 746 hasn't been accepted.
10879
10934
  if (!AnalyzerNodeInfo.getFileInfo(errorNode).diagnosticRuleSet.enableExperimentalFeatures) {
10880
- return;
10935
+ return true;
10881
10936
  }
10882
- for (const metaArg of metaArgs) {
10883
- if ((0, types_1.isClass)(metaArg.type)) {
10884
- const supportsTypeMethod = (_a = getTypeOfBoundMember(
10885
- /* errorNode */ undefined, metaArg.type, '__supports_type__')) === null || _a === void 0 ? void 0 : _a.type;
10886
- if (!supportsTypeMethod) {
10887
- continue;
10888
- }
10889
- // "Call" the __supports_type__ method to determine if the type is supported.
10890
- const callResult = useSpeculativeMode(errorNode, () => validateCallArgs(errorNode, [
10891
- {
10892
- argCategory: 0 /* ArgCategory.Simple */,
10893
- typeResult: { type: (0, typeUtils_1.convertToInstance)(annotatedType) },
10894
- },
10895
- ], { type: supportsTypeMethod },
10896
- /* constraints */ undefined,
10897
- /* skipUnknownArgCheck */ true,
10898
- /* inferenceContext */ undefined));
10899
- if (callResult.isTypeIncomplete || !callResult.returnType) {
10900
- continue;
10901
- }
10902
- // If there are no errors and the return type is potentially truthy,
10903
- // we know that the type is supported by this metadata object.
10904
- if (!callResult.argumentErrors && canBeTruthy(callResult.returnType)) {
10905
- continue;
10906
- }
10907
- addDiagnostic(diagnosticRules_1.DiagnosticRule.reportInvalidTypeArguments, localize_1.LocMessage.annotatedMetadataInconsistent().format({
10908
- metadataType: printType(metaArg.type),
10909
- type: printType((0, typeUtils_1.convertToInstance)(annotatedType)),
10910
- }), metaArg.node);
10911
- }
10937
+ if (!(0, types_1.isClass)(metaArg.type)) {
10938
+ return true;
10939
+ }
10940
+ const supportsTypeMethod = (_a = getTypeOfBoundMember(
10941
+ /* errorNode */ undefined, metaArg.type, '__supports_type__')) === null || _a === void 0 ? void 0 : _a.type;
10942
+ if (!supportsTypeMethod) {
10943
+ return true;
10944
+ }
10945
+ // "Call" the __supports_type__ method to determine if the type is supported.
10946
+ const callResult = useSpeculativeMode(errorNode, () => validateCallArgs(errorNode, [
10947
+ {
10948
+ argCategory: 0 /* ArgCategory.Simple */,
10949
+ typeResult: { type: (0, typeUtils_1.convertToInstance)(baseType) },
10950
+ },
10951
+ ], { type: supportsTypeMethod },
10952
+ /* constraints */ undefined,
10953
+ /* skipUnknownArgCheck */ true,
10954
+ /* inferenceContext */ undefined));
10955
+ if (!callResult.returnType) {
10956
+ return true;
10912
10957
  }
10958
+ // If there are no errors and the return type is potentially truthy,
10959
+ // we know that the type is supported by this metadata object.
10960
+ if (!callResult.argumentErrors && canBeTruthy(callResult.returnType)) {
10961
+ return true;
10962
+ }
10963
+ if (!callResult.isTypeIncomplete) {
10964
+ addDiagnostic(diagnosticRules_1.DiagnosticRule.reportInvalidTypeArguments, localize_1.LocMessage.annotatedMetadataInconsistent().format({
10965
+ metadataType: printType(metaArg.type),
10966
+ type: printType((0, typeUtils_1.convertToInstance)(baseType)),
10967
+ }), metaArg.node);
10968
+ }
10969
+ return false;
10913
10970
  }
10914
10971
  // Creates one of several "special" types that are defined in typing.pyi
10915
10972
  // but not declared in their entirety. This includes the likes of "Tuple",
@@ -11312,6 +11369,7 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
11312
11369
  typeParamVariance: 2 /* Variance.Invariant */,
11313
11370
  },
11314
11371
  ],
11372
+ ['TypeForm', { alias: '', module: 'builtins', isSpecialForm: true, typeParamVariance: 3 /* Variance.Covariant */ }],
11315
11373
  ]);
11316
11374
  const aliasMapEntry = specialTypes.get(assignedName);
11317
11375
  if (aliasMapEntry) {
@@ -12822,7 +12880,7 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
12822
12880
  }
12823
12881
  paramType = paramType !== null && paramType !== void 0 ? paramType : types_1.UnknownType.create();
12824
12882
  const functionParam = types_1.FunctionParam.create(param.d.category, paramType, (isTypeInferred ? types_1.FunctionParamFlags.TypeInferred : types_1.FunctionParamFlags.None) |
12825
- (paramTypeNode ? types_1.FunctionParamFlags.TypeDeclared : types_1.FunctionParamFlags.None), param.d.name ? param.d.name.d.value : undefined, defaultValueType);
12883
+ (paramTypeNode ? types_1.FunctionParamFlags.TypeDeclared : types_1.FunctionParamFlags.None), param.d.name ? param.d.name.d.value : undefined, defaultValueType, param.d.defaultValue);
12826
12884
  types_1.FunctionType.addParam(functionType, functionParam);
12827
12885
  if (types_1.FunctionParam.isTypeDeclared(functionParam)) {
12828
12886
  (0, typeUtils_1.addTypeVarsToListIfUnique)(typeParamsSeen, (0, typeUtils_1.getTypeVarArgsRecursive)(paramType), functionType.shared.typeVarScopeId);
@@ -14264,17 +14322,13 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
14264
14322
  case 'Callable': {
14265
14323
  return { type: createCallableType(classType, typeArgs, errorNode) };
14266
14324
  }
14267
- case 'Never': {
14268
- if (typeArgs && typeArgs.length > 0) {
14269
- addDiagnostic(diagnosticRules_1.DiagnosticRule.reportInvalidTypeForm, localize_1.LocMessage.typeArgsExpectingNone().format({ name: 'Never' }), typeArgs[0].node);
14270
- }
14271
- return { type: types_1.NeverType.createNever() };
14272
- }
14325
+ case 'Never':
14273
14326
  case 'NoReturn': {
14274
14327
  if (typeArgs && typeArgs.length > 0) {
14275
- addDiagnostic(diagnosticRules_1.DiagnosticRule.reportInvalidTypeForm, localize_1.LocMessage.typeArgsExpectingNone().format({ name: 'NoReturn' }), typeArgs[0].node);
14328
+ addDiagnostic(diagnosticRules_1.DiagnosticRule.reportInvalidTypeForm, localize_1.LocMessage.typeArgsExpectingNone().format({ name: aliasedName }), typeArgs[0].node);
14276
14329
  }
14277
- return { type: types_1.NeverType.createNoReturn() };
14330
+ const resultType = aliasedName === 'Never' ? types_1.NeverType.createNever() : types_1.NeverType.createNoReturn();
14331
+ return { type: resultType };
14278
14332
  }
14279
14333
  case 'Optional': {
14280
14334
  return { type: createOptionalType(classType, errorNode, typeArgs, flags) };
@@ -14361,6 +14415,9 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
14361
14415
  case 'LiteralString': {
14362
14416
  return { type: createSpecialType(classType, typeArgs, 0) };
14363
14417
  }
14418
+ case 'TypeForm': {
14419
+ return { type: createTypeFormType(classType, errorNode, typeArgs) };
14420
+ }
14364
14421
  }
14365
14422
  }
14366
14423
  const fileInfo = AnalyzerNodeInfo.getFileInfo(errorNode);
@@ -14391,12 +14448,11 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
14391
14448
  // Handle "tuple" specially, since it needs to act like "Tuple"
14392
14449
  // in Python 3.9 and newer.
14393
14450
  if ((0, typeUtils_1.isTupleClass)(classType)) {
14394
- return {
14395
- type: createSpecialType(classType, typeArgs,
14396
- /* paramLimit */ undefined,
14397
- /* allowParamSpec */ undefined,
14398
- /* isSpecialForm */ false),
14399
- };
14451
+ const specializedClass = createSpecialType(classType, typeArgs,
14452
+ /* paramLimit */ undefined,
14453
+ /* allowParamSpec */ undefined,
14454
+ /* isSpecialForm */ false);
14455
+ return { type: specializedClass };
14400
14456
  }
14401
14457
  }
14402
14458
  let typeArgCount = typeArgs ? typeArgs.length : 0;
@@ -15058,7 +15114,7 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
15058
15114
  // Synthesize an alias declaration for this name part. The only
15059
15115
  // time this case is used is for IDE services such as
15060
15116
  // the find all references, hover provider and etc.
15061
- declarations.push((0, declarationUtils_1.createSynthesizedAliasDeclaration)(importInfo.resolvedUris[namePartIndex]));
15117
+ declarations.push((0, declarationUtils_1.synthesizeAliasDeclaration)(importInfo.resolvedUris[namePartIndex]));
15062
15118
  }
15063
15119
  }
15064
15120
  }
@@ -16537,18 +16593,12 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
16537
16593
  inferVarianceForClass(destType);
16538
16594
  // If we're enforcing invariance, literal types must match.
16539
16595
  if ((flags & 1 /* AssignTypeFlags.Invariant */) !== 0) {
16540
- const srcIsLiteral = srcType.priv.literalValue !== undefined;
16541
- const destIsLiteral = destType.priv.literalValue !== undefined;
16596
+ const srcIsLiteral = (0, typeUtils_1.isLiteralLikeType)(srcType);
16597
+ const destIsLiteral = (0, typeUtils_1.isLiteralLikeType)(destType);
16542
16598
  if (srcIsLiteral !== destIsLiteral) {
16543
16599
  return false;
16544
16600
  }
16545
16601
  }
16546
- else {
16547
- // If the dest is an 'object', it's assignable.
16548
- if (types_1.ClassType.isBuiltIn(destType, 'object')) {
16549
- return true;
16550
- }
16551
- }
16552
16602
  for (let ancestorIndex = inheritanceChain.length - 1; ancestorIndex >= 0; ancestorIndex--) {
16553
16603
  const ancestorType = inheritanceChain[ancestorIndex];
16554
16604
  // If we've hit an "unknown", all bets are off, and we need to assume
@@ -16585,14 +16635,6 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
16585
16635
  }
16586
16636
  prevSrcType = curSrcType;
16587
16637
  }
16588
- // If we're enforcing invariance, literal types must match as well.
16589
- if ((flags & 1 /* AssignTypeFlags.Invariant */) !== 0) {
16590
- const srcIsLiteral = srcType.priv.literalValue !== undefined;
16591
- const destIsLiteral = destType.priv.literalValue !== undefined;
16592
- if (srcIsLiteral !== destIsLiteral) {
16593
- return false;
16594
- }
16595
- }
16596
16638
  // Handle tuple, which supports a variable number of type arguments.
16597
16639
  if (destType.priv.tupleTypeArgs && curSrcType.priv.tupleTypeArgs) {
16598
16640
  return (0, tuples_1.assignTupleTypeArgs)(evaluatorInterface, destType, curSrcType, diag, constraints, flags, recursionCount);
@@ -17078,7 +17120,8 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
17078
17120
  assignType(destType, concreteSrcType.priv.literalValue.itemType)) {
17079
17121
  return true;
17080
17122
  }
17081
- if (destType.priv.literalValue !== undefined) {
17123
+ if (destType.priv.literalValue !== undefined &&
17124
+ types_1.ClassType.isSameGenericClass(destType, concreteSrcType)) {
17082
17125
  const srcLiteral = concreteSrcType.priv.literalValue;
17083
17126
  if (srcLiteral === undefined || !types_1.ClassType.isLiteralValueSame(concreteSrcType, destType)) {
17084
17127
  diag === null || diag === void 0 ? void 0 : diag.addMessage(localize_1.LocAddendum.literalAssignmentMismatch().format({
@@ -17929,11 +17972,21 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
17929
17972
  }
17930
17973
  }
17931
17974
  }
17932
- if (destParam.defaultType && !srcParam.defaultType && paramIndex !== srcParamDetails.argsIndex) {
17933
- diag === null || diag === void 0 ? void 0 : diag.createAddendum().addMessage(localize_1.LocAddendum.functionParamDefaultMissing().format({
17934
- name: srcParamName,
17935
- }));
17936
- canAssign = false;
17975
+ if (destParam.defaultType) {
17976
+ if (!srcParam.defaultType && paramIndex !== srcParamDetails.argsIndex) {
17977
+ diag === null || diag === void 0 ? void 0 : diag.createAddendum().addMessage(localize_1.LocAddendum.functionParamDefaultMissing().format({
17978
+ name: srcParamName,
17979
+ }));
17980
+ canAssign = false;
17981
+ }
17982
+ // If we're performing a partial overload match and both the source
17983
+ // and dest parameters provide defaults, assume that there could
17984
+ // be a match.
17985
+ if ((flags & 32 /* AssignTypeFlags.PartialOverloadOverlap */) !== 0) {
17986
+ if (srcParam.defaultType) {
17987
+ continue;
17988
+ }
17989
+ }
17937
17990
  }
17938
17991
  // Handle the special case of an overloaded __init__ method whose self
17939
17992
  // parameter is annotated.
@@ -18004,7 +18057,9 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
18004
18057
  // fixed.
18005
18058
  if (defaultArgType &&
18006
18059
  !assignType(paramInfo.type, defaultArgType, diag === null || diag === void 0 ? void 0 : diag.createAddendum(), constraints, flags, recursionCount)) {
18007
- canAssign = false;
18060
+ if ((flags & 32 /* AssignTypeFlags.PartialOverloadOverlap */) === 0) {
18061
+ canAssign = false;
18062
+ }
18008
18063
  }
18009
18064
  continue;
18010
18065
  }
@@ -18062,6 +18117,14 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
18062
18117
  if (destParamDetails.argsIndex !== undefined && destParamDetails.argsIndex < destPositionalCount) {
18063
18118
  adjDestPositionalCount--;
18064
18119
  }
18120
+ // If we're doing a partial overload overlap check, ignore dest positional
18121
+ // params with default values.
18122
+ if ((flags & 32 /* AssignTypeFlags.PartialOverloadOverlap */) !== 0) {
18123
+ while (adjDestPositionalCount > 0 &&
18124
+ destParamDetails.params[adjDestPositionalCount - 1].defaultType) {
18125
+ adjDestPositionalCount--;
18126
+ }
18127
+ }
18065
18128
  if (srcPositionalCount < adjDestPositionalCount) {
18066
18129
  diag === null || diag === void 0 ? void 0 : diag.addMessage(localize_1.LocAddendum.functionTooManyParams().format({
18067
18130
  expected: srcPositionalCount,
@@ -18152,7 +18215,9 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
18152
18215
  const defaultArgType = (_a = srcParamInfo.defaultType) !== null && _a !== void 0 ? _a : srcParamInfo.defaultType;
18153
18216
  if (defaultArgType &&
18154
18217
  !assignType(srcParamInfo.type, defaultArgType, diag === null || diag === void 0 ? void 0 : diag.createAddendum(), constraints, flags, recursionCount)) {
18155
- canAssign = false;
18218
+ if ((flags & 32 /* AssignTypeFlags.PartialOverloadOverlap */) === 0) {
18219
+ canAssign = false;
18220
+ }
18156
18221
  }
18157
18222
  }
18158
18223
  }
@@ -18258,7 +18323,7 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
18258
18323
  else {
18259
18324
  remainingParams.push(types_1.FunctionParam.create(p.category, types_1.FunctionType.getParamType(effectiveSrcType, index), p.flags, p.name, types_1.FunctionType.getParamDefaultType(effectiveSrcType, index)
18260
18325
  ? types_1.AnyType.create(/* isEllipsis */ true)
18261
- : undefined));
18326
+ : undefined, p.defaultExpr));
18262
18327
  }
18263
18328
  });
18264
18329
  // If there are remaining parameters and the source and dest do not contain
@@ -19009,7 +19074,7 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
19009
19074
  }
19010
19075
  const baseObj = (0, types_1.isClassInstance)(baseType)
19011
19076
  ? baseType
19012
- : types_1.ClassType.cloneAsInstance((0, typeUtils_1.specializeClassType)(baseType));
19077
+ : types_1.ClassType.cloneAsInstance((0, typeUtils_1.specializeWithDefaultTypeArgs)(baseType));
19013
19078
  let stripFirstParam = false;
19014
19079
  if ((0, types_1.isClassInstance)(baseType)) {
19015
19080
  stripFirstParam = true;
@@ -19080,7 +19145,15 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
19080
19145
  // evaluating (and caching) the inferred return type if there is no defined return type.
19081
19146
  getEffectiveReturnType(memberType);
19082
19147
  const specializedFunction = solveAndApplyConstraints(memberType, constraints);
19083
- return types_1.FunctionType.clone(specializedFunction, stripFirstParam, baseType);
19148
+ if ((0, types_1.isFunction)(specializedFunction)) {
19149
+ return types_1.FunctionType.clone(specializedFunction, stripFirstParam, baseType);
19150
+ }
19151
+ if ((0, types_1.isOverloaded)(specializedFunction)) {
19152
+ // For overloaded functions, use the first overload. This isn't
19153
+ // strictly correct, but this is an extreme edge case.
19154
+ return types_1.FunctionType.clone(types_1.OverloadedType.getOverloads(specializedFunction)[0], stripFirstParam, baseType);
19155
+ }
19156
+ return undefined;
19084
19157
  }
19085
19158
  function isFinalVariable(symbol) {
19086
19159
  return symbol.getDeclarations().some((decl) => isFinalVariableDeclaration(decl));
@@ -19251,7 +19324,7 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
19251
19324
  // call produces an expression tree that is not attached to the main parse
19252
19325
  // expression tree because we don't want to mutate the latter; the
19253
19326
  // expression tree created by this function is therefore used only temporarily.
19254
- function parseStringAsTypeAnnotation(node) {
19327
+ function parseStringAsTypeAnnotation(node, reportErrors) {
19255
19328
  const fileInfo = AnalyzerNodeInfo.getFileInfo(node);
19256
19329
  const parser = new parser_1.Parser();
19257
19330
  const textValue = node.d.strings[0].d.value;
@@ -19269,14 +19342,21 @@ function createTypeEvaluator(importLookup, evaluatorOptions, wrapWithLogger) {
19269
19342
  parseOptions.isStubFile = fileInfo.isStubFile;
19270
19343
  parseOptions.pythonVersion = fileInfo.executionEnvironment.pythonVersion;
19271
19344
  parseOptions.reportErrorsForParsedStringContents = true;
19272
- const parseResults = parser.parseTextExpression(dummyFileContents, valueOffset, textValue.length, parseOptions,
19273
- /* parseTextMode */ undefined,
19345
+ const parseResults = parser.parseTextExpression(dummyFileContents, valueOffset, textValue.length, parseOptions, 0 /* ParseTextMode.Expression */,
19274
19346
  /* initialParenDepth */ undefined, fileInfo.typingSymbolAliases);
19275
- if (parseResults.parseTree && parseResults.parseTree.nodeType !== 62 /* ParseNodeType.FunctionAnnotation */) {
19276
- parseResults.diagnostics.forEach((diag) => {
19277
- addDiagnosticWithSuppressionCheck('error', diag.message, node);
19278
- });
19347
+ if (parseResults.parseTree) {
19348
+ if (reportErrors) {
19349
+ const fileInfo = AnalyzerNodeInfo.getFileInfo(node);
19350
+ parseResults.diagnostics.forEach((diag) => {
19351
+ fileInfo.diagnosticSink.addDiagnosticWithTextRange('error', diag.message, node);
19352
+ });
19353
+ }
19279
19354
  parseResults.parseTree.parent = node;
19355
+ // Optionally add the new subtree to the parse tree so it can
19356
+ // participate in language server operations like find and replace.
19357
+ if (reportErrors) {
19358
+ node.d.annotation = parseResults.parseTree;
19359
+ }
19280
19360
  return parseResults.parseTree;
19281
19361
  }
19282
19362
  return undefined;