brighterscript 1.0.0-alpha.5 → 1.0.0-alpha.51

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 (652) hide show
  1. package/README.md +79 -138
  2. package/bsconfig.schema.json +196 -5
  3. package/dist/ActionPipeline.d.ts +10 -0
  4. package/dist/ActionPipeline.js +40 -0
  5. package/dist/ActionPipeline.js.map +1 -0
  6. package/dist/AstValidationSegmenter.d.ts +45 -0
  7. package/dist/AstValidationSegmenter.js +322 -0
  8. package/dist/AstValidationSegmenter.js.map +1 -0
  9. package/dist/BsConfig.d.ts +161 -43
  10. package/dist/BusyStatusTracker.d.ts +61 -0
  11. package/dist/BusyStatusTracker.js +148 -0
  12. package/dist/BusyStatusTracker.js.map +1 -0
  13. package/dist/Cache.d.ts +3 -8
  14. package/dist/Cache.js +9 -14
  15. package/dist/Cache.js.map +1 -1
  16. package/dist/CacheVerifier.d.ts +7 -0
  17. package/dist/CacheVerifier.js +20 -0
  18. package/dist/CacheVerifier.js.map +1 -0
  19. package/dist/CodeActionUtil.d.ts +29 -4
  20. package/dist/CodeActionUtil.js +22 -5
  21. package/dist/CodeActionUtil.js.map +1 -1
  22. package/dist/CommentFlagProcessor.d.ts +20 -15
  23. package/dist/CommentFlagProcessor.js +143 -58
  24. package/dist/CommentFlagProcessor.js.map +1 -1
  25. package/dist/CrossScopeValidator.d.ts +68 -0
  26. package/dist/CrossScopeValidator.js +650 -0
  27. package/dist/CrossScopeValidator.js.map +1 -0
  28. package/dist/DependencyGraph.d.ts +8 -3
  29. package/dist/DependencyGraph.js +49 -16
  30. package/dist/DependencyGraph.js.map +1 -1
  31. package/dist/DiagnosticCollection.d.ts +21 -5
  32. package/dist/DiagnosticCollection.js +77 -24
  33. package/dist/DiagnosticCollection.js.map +1 -1
  34. package/dist/DiagnosticFilterer.d.ts +27 -6
  35. package/dist/DiagnosticFilterer.js +273 -60
  36. package/dist/DiagnosticFilterer.js.map +1 -1
  37. package/dist/DiagnosticManager.d.ts +83 -0
  38. package/dist/DiagnosticManager.js +422 -0
  39. package/dist/DiagnosticManager.js.map +1 -0
  40. package/dist/DiagnosticMessages.d.ts +602 -196
  41. package/dist/DiagnosticMessages.js +926 -342
  42. package/dist/DiagnosticMessages.js.map +1 -1
  43. package/dist/DiagnosticSeverityAdjuster.d.ts +7 -0
  44. package/dist/DiagnosticSeverityAdjuster.js +45 -0
  45. package/dist/DiagnosticSeverityAdjuster.js.map +1 -0
  46. package/dist/FunctionScope.d.ts +28 -0
  47. package/dist/FunctionScope.js +52 -0
  48. package/dist/FunctionScope.js.map +1 -0
  49. package/dist/KeyedThrottler.d.ts +3 -3
  50. package/dist/KeyedThrottler.js +3 -3
  51. package/dist/KeyedThrottler.js.map +1 -1
  52. package/dist/LanguageServer.d.ts +136 -104
  53. package/dist/LanguageServer.js +577 -741
  54. package/dist/LanguageServer.js.map +1 -1
  55. package/dist/Logger.d.ts +17 -13
  56. package/dist/Logger.js +64 -34
  57. package/dist/Logger.js.map +1 -1
  58. package/dist/PluginInterface.d.ts +32 -10
  59. package/dist/PluginInterface.js +117 -7
  60. package/dist/PluginInterface.js.map +1 -1
  61. package/dist/Program.d.ts +302 -98
  62. package/dist/Program.js +1613 -726
  63. package/dist/Program.js.map +1 -1
  64. package/dist/ProgramBuilder.d.ts +39 -22
  65. package/dist/ProgramBuilder.js +245 -179
  66. package/dist/ProgramBuilder.js.map +1 -1
  67. package/dist/Scope.d.ts +227 -106
  68. package/dist/Scope.js +609 -557
  69. package/dist/Scope.js.map +1 -1
  70. package/dist/ScopeNamespaceLookup.d.ts +73 -0
  71. package/dist/ScopeNamespaceLookup.js +242 -0
  72. package/dist/ScopeNamespaceLookup.js.map +1 -0
  73. package/dist/SemanticTokenUtils.js +5 -1
  74. package/dist/SemanticTokenUtils.js.map +1 -1
  75. package/dist/Stopwatch.d.ts +4 -0
  76. package/dist/Stopwatch.js +8 -1
  77. package/dist/Stopwatch.js.map +1 -1
  78. package/dist/SymbolTable.d.ts +145 -26
  79. package/dist/SymbolTable.js +575 -64
  80. package/dist/SymbolTable.js.map +1 -1
  81. package/dist/SymbolTypeFlag.d.ts +9 -0
  82. package/dist/SymbolTypeFlag.js +14 -0
  83. package/dist/SymbolTypeFlag.js.map +1 -0
  84. package/dist/Throttler.d.ts +12 -0
  85. package/dist/Throttler.js +39 -0
  86. package/dist/Throttler.js.map +1 -1
  87. package/dist/Watcher.d.ts +0 -3
  88. package/dist/Watcher.js +0 -3
  89. package/dist/Watcher.js.map +1 -1
  90. package/dist/XmlScope.d.ts +5 -15
  91. package/dist/XmlScope.js +34 -90
  92. package/dist/XmlScope.js.map +1 -1
  93. package/dist/astUtils/CachedLookups.d.ts +50 -0
  94. package/dist/astUtils/CachedLookups.js +337 -0
  95. package/dist/astUtils/CachedLookups.js.map +1 -0
  96. package/dist/astUtils/Editor.d.ts +69 -0
  97. package/dist/astUtils/Editor.js +245 -0
  98. package/dist/astUtils/Editor.js.map +1 -0
  99. package/dist/astUtils/creators.d.ts +54 -19
  100. package/dist/astUtils/creators.js +242 -42
  101. package/dist/astUtils/creators.js.map +1 -1
  102. package/dist/astUtils/reflection.d.ts +199 -85
  103. package/dist/astUtils/reflection.js +518 -145
  104. package/dist/astUtils/reflection.js.map +1 -1
  105. package/dist/astUtils/stackedVisitor.js.map +1 -1
  106. package/dist/astUtils/visitors.d.ts +117 -53
  107. package/dist/astUtils/visitors.js +95 -15
  108. package/dist/astUtils/visitors.js.map +1 -1
  109. package/dist/astUtils/xml.d.ts +9 -8
  110. package/dist/astUtils/xml.js +12 -7
  111. package/dist/astUtils/xml.js.map +1 -1
  112. package/dist/bscPlugin/BscPlugin.d.ts +26 -4
  113. package/dist/bscPlugin/BscPlugin.js +96 -4
  114. package/dist/bscPlugin/BscPlugin.js.map +1 -1
  115. package/dist/bscPlugin/CallExpressionInfo.d.ts +36 -0
  116. package/dist/bscPlugin/CallExpressionInfo.js +142 -0
  117. package/dist/bscPlugin/CallExpressionInfo.js.map +1 -0
  118. package/dist/bscPlugin/FileWriter.d.ts +19 -0
  119. package/dist/bscPlugin/FileWriter.js +79 -0
  120. package/dist/bscPlugin/FileWriter.js.map +1 -0
  121. package/dist/bscPlugin/SignatureHelpUtil.d.ts +10 -0
  122. package/dist/bscPlugin/SignatureHelpUtil.js +137 -0
  123. package/dist/bscPlugin/SignatureHelpUtil.js.map +1 -0
  124. package/dist/bscPlugin/codeActions/CodeActionsProcessor.d.ts +109 -7
  125. package/dist/bscPlugin/codeActions/CodeActionsProcessor.js +676 -26
  126. package/dist/bscPlugin/codeActions/CodeActionsProcessor.js.map +1 -1
  127. package/dist/bscPlugin/codeActions/FixAllCodeActionsProcessor.d.ts +17 -0
  128. package/dist/bscPlugin/codeActions/FixAllCodeActionsProcessor.js +66 -0
  129. package/dist/bscPlugin/codeActions/FixAllCodeActionsProcessor.js.map +1 -0
  130. package/dist/bscPlugin/codeActions/codeActionHelpers.d.ts +18 -0
  131. package/dist/bscPlugin/codeActions/codeActionHelpers.js +31 -0
  132. package/dist/bscPlugin/codeActions/codeActionHelpers.js.map +1 -0
  133. package/dist/bscPlugin/completions/CompletionsProcessor.d.ts +65 -0
  134. package/dist/bscPlugin/completions/CompletionsProcessor.js +633 -0
  135. package/dist/bscPlugin/completions/CompletionsProcessor.js.map +1 -0
  136. package/dist/bscPlugin/definition/DefinitionProvider.d.ts +13 -0
  137. package/dist/bscPlugin/definition/DefinitionProvider.js +220 -0
  138. package/dist/bscPlugin/definition/DefinitionProvider.js.map +1 -0
  139. package/dist/bscPlugin/fileProviders/FileProvider.d.ts +9 -0
  140. package/dist/bscPlugin/fileProviders/FileProvider.js +51 -0
  141. package/dist/bscPlugin/fileProviders/FileProvider.js.map +1 -0
  142. package/dist/bscPlugin/hover/HoverProcessor.d.ts +18 -0
  143. package/dist/bscPlugin/hover/HoverProcessor.js +238 -0
  144. package/dist/bscPlugin/hover/HoverProcessor.js.map +1 -0
  145. package/dist/bscPlugin/references/ReferencesProvider.d.ts +12 -0
  146. package/dist/bscPlugin/references/ReferencesProvider.js +57 -0
  147. package/dist/bscPlugin/references/ReferencesProvider.js.map +1 -0
  148. package/dist/bscPlugin/selectionRanges/SelectionRangesProcessor.d.ts +7 -0
  149. package/dist/bscPlugin/selectionRanges/SelectionRangesProcessor.js +77 -0
  150. package/dist/bscPlugin/selectionRanges/SelectionRangesProcessor.js.map +1 -0
  151. package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.d.ts +14 -0
  152. package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.js +164 -0
  153. package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.js.map +1 -0
  154. package/dist/bscPlugin/serialize/BslibManager.d.ts +12 -0
  155. package/dist/bscPlugin/serialize/BslibManager.js +46 -0
  156. package/dist/bscPlugin/serialize/BslibManager.js.map +1 -0
  157. package/dist/bscPlugin/serialize/FileSerializer.d.ts +9 -0
  158. package/dist/bscPlugin/serialize/FileSerializer.js +80 -0
  159. package/dist/bscPlugin/serialize/FileSerializer.js.map +1 -0
  160. package/dist/bscPlugin/symbols/DocumentSymbolProcessor.d.ts +7 -0
  161. package/dist/bscPlugin/symbols/DocumentSymbolProcessor.js +22 -0
  162. package/dist/bscPlugin/symbols/DocumentSymbolProcessor.js.map +1 -0
  163. package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.d.ts +7 -0
  164. package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.js +26 -0
  165. package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.js.map +1 -0
  166. package/dist/bscPlugin/symbols/symbolUtils.d.ts +5 -0
  167. package/dist/bscPlugin/symbols/symbolUtils.js +141 -0
  168. package/dist/bscPlugin/symbols/symbolUtils.js.map +1 -0
  169. package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.d.ts +34 -0
  170. package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.js +504 -0
  171. package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.js.map +1 -0
  172. package/dist/bscPlugin/transpile/XmlFilePreTranspileProcessor.d.ts +12 -0
  173. package/dist/bscPlugin/transpile/XmlFilePreTranspileProcessor.js +99 -0
  174. package/dist/bscPlugin/transpile/XmlFilePreTranspileProcessor.js.map +1 -0
  175. package/dist/bscPlugin/validation/BrsFileAfterValidator.d.ts +7 -0
  176. package/dist/bscPlugin/validation/BrsFileAfterValidator.js +18 -0
  177. package/dist/bscPlugin/validation/BrsFileAfterValidator.js.map +1 -0
  178. package/dist/bscPlugin/validation/BrsFileValidator.d.ts +51 -0
  179. package/dist/bscPlugin/validation/BrsFileValidator.js +714 -0
  180. package/dist/bscPlugin/validation/BrsFileValidator.js.map +1 -0
  181. package/dist/bscPlugin/validation/ProgramValidator.d.ts +11 -0
  182. package/dist/bscPlugin/validation/ProgramValidator.js +33 -0
  183. package/dist/bscPlugin/validation/ProgramValidator.js.map +1 -0
  184. package/dist/bscPlugin/validation/ScopeValidator.d.ts +158 -0
  185. package/dist/bscPlugin/validation/ScopeValidator.js +1481 -0
  186. package/dist/bscPlugin/validation/ScopeValidator.js.map +1 -0
  187. package/dist/bscPlugin/validation/XmlFileValidator.d.ts +8 -0
  188. package/dist/bscPlugin/validation/XmlFileValidator.js +50 -0
  189. package/dist/bscPlugin/validation/XmlFileValidator.js.map +1 -0
  190. package/dist/cli.js +140 -28
  191. package/dist/cli.js.map +1 -1
  192. package/dist/common/Sequencer.d.ts +53 -0
  193. package/dist/common/Sequencer.js +233 -0
  194. package/dist/common/Sequencer.js.map +1 -0
  195. package/dist/deferred.d.ts +5 -3
  196. package/dist/deferred.js +10 -0
  197. package/dist/deferred.js.map +1 -1
  198. package/dist/diagnosticUtils.d.ts +61 -4
  199. package/dist/diagnosticUtils.js +285 -25
  200. package/dist/diagnosticUtils.js.map +1 -1
  201. package/dist/examples/plugins/removePrint.d.ts +2 -2
  202. package/dist/examples/plugins/removePrint.js +8 -12
  203. package/dist/examples/plugins/removePrint.js.map +1 -1
  204. package/dist/files/AssetFile.d.ts +24 -0
  205. package/dist/files/AssetFile.js +25 -0
  206. package/dist/files/AssetFile.js.map +1 -0
  207. package/dist/files/BrsFile.d.ts +161 -87
  208. package/dist/files/BrsFile.js +919 -936
  209. package/dist/files/BrsFile.js.map +1 -1
  210. package/dist/files/BscFile.d.ts +102 -0
  211. package/dist/files/BscFile.js +15 -0
  212. package/dist/files/BscFile.js.map +1 -0
  213. package/dist/files/Factory.d.ts +25 -0
  214. package/dist/files/Factory.js +22 -0
  215. package/dist/files/Factory.js.map +1 -0
  216. package/dist/files/LazyFileData.d.ts +21 -0
  217. package/dist/files/LazyFileData.js +54 -0
  218. package/dist/files/LazyFileData.js.map +1 -0
  219. package/dist/files/XmlFile.d.ts +80 -41
  220. package/dist/files/XmlFile.js +162 -137
  221. package/dist/files/XmlFile.js.map +1 -1
  222. package/dist/globalCallables.d.ts +3 -1
  223. package/dist/globalCallables.js +424 -184
  224. package/dist/globalCallables.js.map +1 -1
  225. package/dist/index.d.ts +32 -4
  226. package/dist/index.js +54 -7
  227. package/dist/index.js.map +1 -1
  228. package/dist/interfaces.d.ts +987 -125
  229. package/dist/interfaces.js +21 -0
  230. package/dist/interfaces.js.map +1 -1
  231. package/dist/lexer/Lexer.d.ts +51 -12
  232. package/dist/lexer/Lexer.js +214 -65
  233. package/dist/lexer/Lexer.js.map +1 -1
  234. package/dist/lexer/Token.d.ts +27 -11
  235. package/dist/lexer/Token.js +10 -2
  236. package/dist/lexer/Token.js.map +1 -1
  237. package/dist/lexer/TokenKind.d.ts +48 -2
  238. package/dist/lexer/TokenKind.js +167 -10
  239. package/dist/lexer/TokenKind.js.map +1 -1
  240. package/dist/logging.d.ts +14 -0
  241. package/dist/logging.js +29 -0
  242. package/dist/logging.js.map +1 -0
  243. package/dist/lsp/ActionQueue.d.ts +35 -0
  244. package/dist/lsp/ActionQueue.js +115 -0
  245. package/dist/lsp/ActionQueue.js.map +1 -0
  246. package/dist/lsp/DocumentManager.d.ts +63 -0
  247. package/dist/lsp/DocumentManager.js +122 -0
  248. package/dist/lsp/DocumentManager.js.map +1 -0
  249. package/dist/lsp/LspProject.d.ts +287 -0
  250. package/dist/lsp/LspProject.js +3 -0
  251. package/dist/lsp/LspProject.js.map +1 -0
  252. package/dist/lsp/PathFilterer.d.ts +75 -0
  253. package/dist/lsp/PathFilterer.js +196 -0
  254. package/dist/lsp/PathFilterer.js.map +1 -0
  255. package/dist/lsp/Project.d.ts +200 -0
  256. package/dist/lsp/Project.js +562 -0
  257. package/dist/lsp/Project.js.map +1 -0
  258. package/dist/lsp/ProjectManager.d.ts +288 -0
  259. package/dist/lsp/ProjectManager.js +967 -0
  260. package/dist/lsp/ProjectManager.js.map +1 -0
  261. package/dist/lsp/ReaderWriterManager.d.ts +21 -0
  262. package/dist/lsp/ReaderWriterManager.js +60 -0
  263. package/dist/lsp/ReaderWriterManager.js.map +1 -0
  264. package/dist/lsp/worker/MessageHandler.d.ts +99 -0
  265. package/dist/lsp/worker/MessageHandler.js +138 -0
  266. package/dist/lsp/worker/MessageHandler.js.map +1 -0
  267. package/dist/lsp/worker/WorkerPool.d.ts +38 -0
  268. package/dist/lsp/worker/WorkerPool.js +78 -0
  269. package/dist/lsp/worker/WorkerPool.js.map +1 -0
  270. package/dist/lsp/worker/WorkerThreadProject.d.ts +168 -0
  271. package/dist/lsp/worker/WorkerThreadProject.js +205 -0
  272. package/dist/lsp/worker/WorkerThreadProject.js.map +1 -0
  273. package/dist/lsp/worker/WorkerThreadProjectRunner.d.ts +15 -0
  274. package/dist/lsp/worker/WorkerThreadProjectRunner.js +58 -0
  275. package/dist/lsp/worker/WorkerThreadProjectRunner.js.map +1 -0
  276. package/dist/lsp/worker/run.js +14 -0
  277. package/dist/lsp/worker/run.js.map +1 -0
  278. package/dist/parser/AstNode.d.ts +205 -0
  279. package/dist/parser/AstNode.js +305 -0
  280. package/dist/parser/AstNode.js.map +1 -0
  281. package/dist/parser/BrightScriptDocParser.d.ts +56 -0
  282. package/dist/parser/BrightScriptDocParser.js +294 -0
  283. package/dist/parser/BrightScriptDocParser.js.map +1 -0
  284. package/dist/parser/BrsTranspileState.d.ts +22 -3
  285. package/dist/parser/BrsTranspileState.js +19 -0
  286. package/dist/parser/BrsTranspileState.js.map +1 -1
  287. package/dist/parser/Expression.d.ts +601 -220
  288. package/dist/parser/Expression.js +1516 -502
  289. package/dist/parser/Expression.js.map +1 -1
  290. package/dist/parser/Parser.d.ts +137 -121
  291. package/dist/parser/Parser.js +1808 -982
  292. package/dist/parser/Parser.js.map +1 -1
  293. package/dist/parser/SGParser.d.ts +30 -13
  294. package/dist/parser/SGParser.js +94 -56
  295. package/dist/parser/SGParser.js.map +1 -1
  296. package/dist/parser/SGTypes.d.ts +134 -46
  297. package/dist/parser/SGTypes.js +206 -115
  298. package/dist/parser/SGTypes.js.map +1 -1
  299. package/dist/parser/Statement.d.ts +854 -267
  300. package/dist/parser/Statement.js +2416 -621
  301. package/dist/parser/Statement.js.map +1 -1
  302. package/dist/parser/TranspileState.d.ts +30 -14
  303. package/dist/parser/TranspileState.js +124 -27
  304. package/dist/parser/TranspileState.js.map +1 -1
  305. package/dist/preprocessor/Manifest.d.ts +6 -6
  306. package/dist/preprocessor/Manifest.js +17 -38
  307. package/dist/preprocessor/Manifest.js.map +1 -1
  308. package/dist/roku-types/data.json +20554 -0
  309. package/dist/roku-types/index.d.ts +5726 -0
  310. package/dist/roku-types/index.js +11 -0
  311. package/dist/roku-types/index.js.map +1 -0
  312. package/dist/types/ArrayType.d.ts +12 -5
  313. package/dist/types/ArrayType.js +95 -25
  314. package/dist/types/ArrayType.js.map +1 -1
  315. package/dist/types/AssociativeArrayType.d.ts +15 -0
  316. package/dist/types/AssociativeArrayType.js +64 -0
  317. package/dist/types/AssociativeArrayType.js.map +1 -0
  318. package/dist/types/BaseFunctionType.d.ts +10 -0
  319. package/dist/types/BaseFunctionType.js +26 -0
  320. package/dist/types/BaseFunctionType.js.map +1 -0
  321. package/dist/types/BooleanType.d.ts +9 -5
  322. package/dist/types/BooleanType.js +19 -8
  323. package/dist/types/BooleanType.js.map +1 -1
  324. package/dist/types/BscType.d.ts +41 -3
  325. package/dist/types/BscType.js +152 -0
  326. package/dist/types/BscType.js.map +1 -1
  327. package/dist/types/BscTypeKind.d.ts +28 -0
  328. package/dist/types/BscTypeKind.js +33 -0
  329. package/dist/types/BscTypeKind.js.map +1 -0
  330. package/dist/types/BuiltInInterfaceAdder.d.ts +28 -0
  331. package/dist/types/BuiltInInterfaceAdder.js +212 -0
  332. package/dist/types/BuiltInInterfaceAdder.js.map +1 -0
  333. package/dist/types/CallFuncableType.d.ts +24 -0
  334. package/dist/types/CallFuncableType.js +91 -0
  335. package/dist/types/CallFuncableType.js.map +1 -0
  336. package/dist/types/ClassType.d.ts +17 -0
  337. package/dist/types/ClassType.js +63 -0
  338. package/dist/types/ClassType.js.map +1 -0
  339. package/dist/types/ComponentType.d.ts +22 -0
  340. package/dist/types/ComponentType.js +110 -0
  341. package/dist/types/ComponentType.js.map +1 -0
  342. package/dist/types/DoubleType.d.ts +10 -5
  343. package/dist/types/DoubleType.js +21 -17
  344. package/dist/types/DoubleType.js.map +1 -1
  345. package/dist/types/DynamicType.d.ts +13 -5
  346. package/dist/types/DynamicType.js +26 -5
  347. package/dist/types/DynamicType.js.map +1 -1
  348. package/dist/types/EnumType.d.ts +42 -0
  349. package/dist/types/EnumType.js +101 -0
  350. package/dist/types/EnumType.js.map +1 -0
  351. package/dist/types/FloatType.d.ts +10 -5
  352. package/dist/types/FloatType.js +21 -17
  353. package/dist/types/FloatType.js.map +1 -1
  354. package/dist/types/FunctionType.d.ts +8 -22
  355. package/dist/types/FunctionType.js +25 -63
  356. package/dist/types/FunctionType.js.map +1 -1
  357. package/dist/types/InheritableType.d.ts +29 -0
  358. package/dist/types/InheritableType.js +173 -0
  359. package/dist/types/InheritableType.js.map +1 -0
  360. package/dist/types/InlineInterfaceType.d.ts +5 -0
  361. package/dist/types/InlineInterfaceType.js +17 -0
  362. package/dist/types/InlineInterfaceType.js.map +1 -0
  363. package/dist/types/IntegerType.d.ts +10 -5
  364. package/dist/types/IntegerType.js +21 -17
  365. package/dist/types/IntegerType.js.map +1 -1
  366. package/dist/types/InterfaceType.d.ts +14 -6
  367. package/dist/types/InterfaceType.js +30 -15
  368. package/dist/types/InterfaceType.js.map +1 -1
  369. package/dist/types/IntersectionType.d.ts +29 -0
  370. package/dist/types/IntersectionType.js +256 -0
  371. package/dist/types/IntersectionType.js.map +1 -0
  372. package/dist/types/InvalidType.d.ts +10 -5
  373. package/dist/types/InvalidType.js +21 -9
  374. package/dist/types/InvalidType.js.map +1 -1
  375. package/dist/types/LongIntegerType.d.ts +10 -5
  376. package/dist/types/LongIntegerType.js +21 -17
  377. package/dist/types/LongIntegerType.js.map +1 -1
  378. package/dist/types/NamespaceType.d.ts +12 -0
  379. package/dist/types/NamespaceType.js +28 -0
  380. package/dist/types/NamespaceType.js.map +1 -0
  381. package/dist/types/ObjectType.d.ts +12 -5
  382. package/dist/types/ObjectType.js +25 -8
  383. package/dist/types/ObjectType.js.map +1 -1
  384. package/dist/types/ReferenceType.d.ts +123 -0
  385. package/dist/types/ReferenceType.js +726 -0
  386. package/dist/types/ReferenceType.js.map +1 -0
  387. package/dist/types/StringType.d.ts +12 -5
  388. package/dist/types/StringType.js +23 -8
  389. package/dist/types/StringType.js.map +1 -1
  390. package/dist/types/TypeStatementType.d.ts +19 -0
  391. package/dist/types/TypeStatementType.js +56 -0
  392. package/dist/types/TypeStatementType.js.map +1 -0
  393. package/dist/types/TypedFunctionType.d.ts +34 -0
  394. package/dist/types/TypedFunctionType.js +157 -0
  395. package/dist/types/TypedFunctionType.js.map +1 -0
  396. package/dist/types/UninitializedType.d.ts +11 -6
  397. package/dist/types/UninitializedType.js +20 -11
  398. package/dist/types/UninitializedType.js.map +1 -1
  399. package/dist/types/UnionType.d.ts +27 -0
  400. package/dist/types/UnionType.js +196 -0
  401. package/dist/types/UnionType.js.map +1 -0
  402. package/dist/types/VoidType.d.ts +11 -5
  403. package/dist/types/VoidType.js +22 -8
  404. package/dist/types/VoidType.js.map +1 -1
  405. package/dist/types/helpers.d.ts +51 -0
  406. package/dist/types/helpers.js +329 -0
  407. package/dist/types/helpers.js.map +1 -0
  408. package/dist/types/index.d.ts +22 -0
  409. package/dist/types/index.js +39 -0
  410. package/dist/types/index.js.map +1 -0
  411. package/dist/types/roFunctionType.d.ts +11 -0
  412. package/dist/types/roFunctionType.js +37 -0
  413. package/dist/types/roFunctionType.js.map +1 -0
  414. package/dist/util.d.ts +325 -185
  415. package/dist/util.js +2135 -568
  416. package/dist/util.js.map +1 -1
  417. package/dist/validators/ClassValidator.d.ts +9 -15
  418. package/dist/validators/ClassValidator.js +93 -138
  419. package/dist/validators/ClassValidator.js.map +1 -1
  420. package/package.json +183 -138
  421. package/CHANGELOG.md +0 -1188
  422. package/dist/astUtils/creators.spec.js +0 -21
  423. package/dist/astUtils/creators.spec.js.map +0 -1
  424. package/dist/astUtils/index.d.ts +0 -7
  425. package/dist/astUtils/index.js +0 -26
  426. package/dist/astUtils/index.js.map +0 -1
  427. package/dist/astUtils/reflection.spec.d.ts +0 -1
  428. package/dist/astUtils/reflection.spec.js +0 -292
  429. package/dist/astUtils/reflection.spec.js.map +0 -1
  430. package/dist/astUtils/stackedVisitor.spec.d.ts +0 -1
  431. package/dist/astUtils/stackedVisitor.spec.js +0 -79
  432. package/dist/astUtils/stackedVisitor.spec.js.map +0 -1
  433. package/dist/astUtils/visitors.spec.d.ts +0 -1
  434. package/dist/astUtils/visitors.spec.js +0 -854
  435. package/dist/astUtils/visitors.spec.js.map +0 -1
  436. package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.d.ts +0 -1
  437. package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js +0 -194
  438. package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js.map +0 -1
  439. package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.d.ts +0 -7
  440. package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.js +0 -63
  441. package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.js.map +0 -1
  442. package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.spec.d.ts +0 -1
  443. package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.spec.js +0 -45
  444. package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.spec.js.map +0 -1
  445. package/dist/files/BrsFile.Class.spec.d.ts +0 -1
  446. package/dist/files/BrsFile.Class.spec.js +0 -1081
  447. package/dist/files/BrsFile.Class.spec.js.map +0 -1
  448. package/dist/files/BrsFile.spec.d.ts +0 -1
  449. package/dist/files/BrsFile.spec.js +0 -2524
  450. package/dist/files/BrsFile.spec.js.map +0 -1
  451. package/dist/files/XmlFile.spec.d.ts +0 -1
  452. package/dist/files/XmlFile.spec.js +0 -1065
  453. package/dist/files/XmlFile.spec.js.map +0 -1
  454. package/dist/files/tests/imports.spec.d.ts +0 -1
  455. package/dist/files/tests/imports.spec.js +0 -241
  456. package/dist/files/tests/imports.spec.js.map +0 -1
  457. package/dist/lexer/Character.spec.d.ts +0 -1
  458. package/dist/lexer/Character.spec.js +0 -27
  459. package/dist/lexer/Character.spec.js.map +0 -1
  460. package/dist/lexer/Lexer.spec.d.ts +0 -1
  461. package/dist/lexer/Lexer.spec.js +0 -1101
  462. package/dist/lexer/Lexer.spec.js.map +0 -1
  463. package/dist/lexer/index.d.ts +0 -3
  464. package/dist/lexer/index.js +0 -17
  465. package/dist/lexer/index.js.map +0 -1
  466. package/dist/parser/Parser.Class.spec.d.ts +0 -1
  467. package/dist/parser/Parser.Class.spec.js +0 -390
  468. package/dist/parser/Parser.Class.spec.js.map +0 -1
  469. package/dist/parser/Parser.spec.d.ts +0 -4
  470. package/dist/parser/Parser.spec.js +0 -1216
  471. package/dist/parser/Parser.spec.js.map +0 -1
  472. package/dist/parser/SGParser.spec.d.ts +0 -1
  473. package/dist/parser/SGParser.spec.js +0 -145
  474. package/dist/parser/SGParser.spec.js.map +0 -1
  475. package/dist/parser/SGTypes.spec.d.ts +0 -1
  476. package/dist/parser/SGTypes.spec.js +0 -351
  477. package/dist/parser/SGTypes.spec.js.map +0 -1
  478. package/dist/parser/Statement.spec.d.ts +0 -1
  479. package/dist/parser/Statement.spec.js +0 -94
  480. package/dist/parser/Statement.spec.js.map +0 -1
  481. package/dist/parser/index.d.ts +0 -3
  482. package/dist/parser/index.js +0 -16
  483. package/dist/parser/index.js.map +0 -1
  484. package/dist/parser/tests/Parser.spec.d.ts +0 -18
  485. package/dist/parser/tests/Parser.spec.js +0 -35
  486. package/dist/parser/tests/Parser.spec.js.map +0 -1
  487. package/dist/parser/tests/controlFlow/For.spec.d.ts +0 -1
  488. package/dist/parser/tests/controlFlow/For.spec.js +0 -161
  489. package/dist/parser/tests/controlFlow/For.spec.js.map +0 -1
  490. package/dist/parser/tests/controlFlow/ForEach.spec.d.ts +0 -1
  491. package/dist/parser/tests/controlFlow/ForEach.spec.js +0 -106
  492. package/dist/parser/tests/controlFlow/ForEach.spec.js.map +0 -1
  493. package/dist/parser/tests/controlFlow/If.spec.d.ts +0 -1
  494. package/dist/parser/tests/controlFlow/If.spec.js +0 -551
  495. package/dist/parser/tests/controlFlow/If.spec.js.map +0 -1
  496. package/dist/parser/tests/controlFlow/While.spec.d.ts +0 -1
  497. package/dist/parser/tests/controlFlow/While.spec.js +0 -107
  498. package/dist/parser/tests/controlFlow/While.spec.js.map +0 -1
  499. package/dist/parser/tests/expression/Additive.spec.d.ts +0 -1
  500. package/dist/parser/tests/expression/Additive.spec.js +0 -99
  501. package/dist/parser/tests/expression/Additive.spec.js.map +0 -1
  502. package/dist/parser/tests/expression/ArrayLiterals.spec.d.ts +0 -1
  503. package/dist/parser/tests/expression/ArrayLiterals.spec.js +0 -254
  504. package/dist/parser/tests/expression/ArrayLiterals.spec.js.map +0 -1
  505. package/dist/parser/tests/expression/AssociativeArrayLiterals.spec.d.ts +0 -1
  506. package/dist/parser/tests/expression/AssociativeArrayLiterals.spec.js +0 -266
  507. package/dist/parser/tests/expression/AssociativeArrayLiterals.spec.js.map +0 -1
  508. package/dist/parser/tests/expression/Boolean.spec.d.ts +0 -1
  509. package/dist/parser/tests/expression/Boolean.spec.js +0 -83
  510. package/dist/parser/tests/expression/Boolean.spec.js.map +0 -1
  511. package/dist/parser/tests/expression/Call.spec.d.ts +0 -1
  512. package/dist/parser/tests/expression/Call.spec.js +0 -134
  513. package/dist/parser/tests/expression/Call.spec.js.map +0 -1
  514. package/dist/parser/tests/expression/Exponential.spec.d.ts +0 -1
  515. package/dist/parser/tests/expression/Exponential.spec.js +0 -37
  516. package/dist/parser/tests/expression/Exponential.spec.js.map +0 -1
  517. package/dist/parser/tests/expression/Function.spec.d.ts +0 -1
  518. package/dist/parser/tests/expression/Function.spec.js +0 -403
  519. package/dist/parser/tests/expression/Function.spec.js.map +0 -1
  520. package/dist/parser/tests/expression/Indexing.spec.d.ts +0 -1
  521. package/dist/parser/tests/expression/Indexing.spec.js +0 -219
  522. package/dist/parser/tests/expression/Indexing.spec.js.map +0 -1
  523. package/dist/parser/tests/expression/Multiplicative.spec.d.ts +0 -1
  524. package/dist/parser/tests/expression/Multiplicative.spec.js +0 -67
  525. package/dist/parser/tests/expression/Multiplicative.spec.js.map +0 -1
  526. package/dist/parser/tests/expression/NullCoalescenceExpression.spec.d.ts +0 -1
  527. package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js +0 -201
  528. package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js.map +0 -1
  529. package/dist/parser/tests/expression/PrefixUnary.spec.d.ts +0 -1
  530. package/dist/parser/tests/expression/PrefixUnary.spec.js +0 -105
  531. package/dist/parser/tests/expression/PrefixUnary.spec.js.map +0 -1
  532. package/dist/parser/tests/expression/Primary.spec.d.ts +0 -1
  533. package/dist/parser/tests/expression/Primary.spec.js +0 -149
  534. package/dist/parser/tests/expression/Primary.spec.js.map +0 -1
  535. package/dist/parser/tests/expression/Relational.spec.d.ts +0 -1
  536. package/dist/parser/tests/expression/Relational.spec.js +0 -83
  537. package/dist/parser/tests/expression/Relational.spec.js.map +0 -1
  538. package/dist/parser/tests/expression/SourceLiteralExpression.spec.d.ts +0 -1
  539. package/dist/parser/tests/expression/SourceLiteralExpression.spec.js +0 -201
  540. package/dist/parser/tests/expression/SourceLiteralExpression.spec.js.map +0 -1
  541. package/dist/parser/tests/expression/TemplateStringExpression.spec.d.ts +0 -1
  542. package/dist/parser/tests/expression/TemplateStringExpression.spec.js +0 -202
  543. package/dist/parser/tests/expression/TemplateStringExpression.spec.js.map +0 -1
  544. package/dist/parser/tests/expression/TernaryExpression.spec.d.ts +0 -1
  545. package/dist/parser/tests/expression/TernaryExpression.spec.js +0 -323
  546. package/dist/parser/tests/expression/TernaryExpression.spec.js.map +0 -1
  547. package/dist/parser/tests/statement/AssignmentOperators.spec.d.ts +0 -1
  548. package/dist/parser/tests/statement/AssignmentOperators.spec.js +0 -79
  549. package/dist/parser/tests/statement/AssignmentOperators.spec.js.map +0 -1
  550. package/dist/parser/tests/statement/Declaration.spec.d.ts +0 -1
  551. package/dist/parser/tests/statement/Declaration.spec.js +0 -108
  552. package/dist/parser/tests/statement/Declaration.spec.js.map +0 -1
  553. package/dist/parser/tests/statement/Dim.spec.d.ts +0 -1
  554. package/dist/parser/tests/statement/Dim.spec.js +0 -73
  555. package/dist/parser/tests/statement/Dim.spec.js.map +0 -1
  556. package/dist/parser/tests/statement/Function.spec.d.ts +0 -1
  557. package/dist/parser/tests/statement/Function.spec.js +0 -332
  558. package/dist/parser/tests/statement/Function.spec.js.map +0 -1
  559. package/dist/parser/tests/statement/Goto.spec.d.ts +0 -1
  560. package/dist/parser/tests/statement/Goto.spec.js +0 -50
  561. package/dist/parser/tests/statement/Goto.spec.js.map +0 -1
  562. package/dist/parser/tests/statement/Increment.spec.d.ts +0 -1
  563. package/dist/parser/tests/statement/Increment.spec.js +0 -117
  564. package/dist/parser/tests/statement/Increment.spec.js.map +0 -1
  565. package/dist/parser/tests/statement/LibraryStatement.spec.d.ts +0 -1
  566. package/dist/parser/tests/statement/LibraryStatement.spec.js +0 -74
  567. package/dist/parser/tests/statement/LibraryStatement.spec.js.map +0 -1
  568. package/dist/parser/tests/statement/Misc.spec.d.ts +0 -1
  569. package/dist/parser/tests/statement/Misc.spec.js +0 -333
  570. package/dist/parser/tests/statement/Misc.spec.js.map +0 -1
  571. package/dist/parser/tests/statement/PrintStatement.spec.d.ts +0 -1
  572. package/dist/parser/tests/statement/PrintStatement.spec.js +0 -181
  573. package/dist/parser/tests/statement/PrintStatement.spec.js.map +0 -1
  574. package/dist/parser/tests/statement/ReturnStatement.spec.d.ts +0 -1
  575. package/dist/parser/tests/statement/ReturnStatement.spec.js +0 -94
  576. package/dist/parser/tests/statement/ReturnStatement.spec.js.map +0 -1
  577. package/dist/parser/tests/statement/Set.spec.d.ts +0 -1
  578. package/dist/parser/tests/statement/Set.spec.js +0 -218
  579. package/dist/parser/tests/statement/Set.spec.js.map +0 -1
  580. package/dist/parser/tests/statement/Stop.spec.d.ts +0 -1
  581. package/dist/parser/tests/statement/Stop.spec.js +0 -37
  582. package/dist/parser/tests/statement/Stop.spec.js.map +0 -1
  583. package/dist/parser/tests/statement/Throw.spec.d.ts +0 -1
  584. package/dist/parser/tests/statement/Throw.spec.js +0 -35
  585. package/dist/parser/tests/statement/Throw.spec.js.map +0 -1
  586. package/dist/parser/tests/statement/TryCatch.spec.d.ts +0 -1
  587. package/dist/parser/tests/statement/TryCatch.spec.js +0 -140
  588. package/dist/parser/tests/statement/TryCatch.spec.js.map +0 -1
  589. package/dist/preprocessor/Chunk.d.ts +0 -82
  590. package/dist/preprocessor/Chunk.js +0 -77
  591. package/dist/preprocessor/Chunk.js.map +0 -1
  592. package/dist/preprocessor/Manifest.spec.d.ts +0 -0
  593. package/dist/preprocessor/Manifest.spec.js +0 -105
  594. package/dist/preprocessor/Manifest.spec.js.map +0 -1
  595. package/dist/preprocessor/Preprocessor.d.ts +0 -60
  596. package/dist/preprocessor/Preprocessor.js +0 -156
  597. package/dist/preprocessor/Preprocessor.js.map +0 -1
  598. package/dist/preprocessor/Preprocessor.spec.d.ts +0 -1
  599. package/dist/preprocessor/Preprocessor.spec.js +0 -152
  600. package/dist/preprocessor/Preprocessor.spec.js.map +0 -1
  601. package/dist/preprocessor/PreprocessorParser.d.ts +0 -61
  602. package/dist/preprocessor/PreprocessorParser.js +0 -194
  603. package/dist/preprocessor/PreprocessorParser.js.map +0 -1
  604. package/dist/preprocessor/PreprocessorParser.spec.d.ts +0 -1
  605. package/dist/preprocessor/PreprocessorParser.spec.js +0 -116
  606. package/dist/preprocessor/PreprocessorParser.spec.js.map +0 -1
  607. package/dist/preprocessor/index.d.ts +0 -3
  608. package/dist/preprocessor/index.js +0 -16
  609. package/dist/preprocessor/index.js.map +0 -1
  610. package/dist/types/ArrayType.spec.d.ts +0 -1
  611. package/dist/types/ArrayType.spec.js +0 -30
  612. package/dist/types/ArrayType.spec.js.map +0 -1
  613. package/dist/types/BooleanType.spec.d.ts +0 -1
  614. package/dist/types/BooleanType.spec.js +0 -12
  615. package/dist/types/BooleanType.spec.js.map +0 -1
  616. package/dist/types/CustomType.d.ts +0 -10
  617. package/dist/types/CustomType.js +0 -35
  618. package/dist/types/CustomType.js.map +0 -1
  619. package/dist/types/DoubleType.spec.d.ts +0 -1
  620. package/dist/types/DoubleType.spec.js +0 -12
  621. package/dist/types/DoubleType.spec.js.map +0 -1
  622. package/dist/types/DynamicType.spec.d.ts +0 -1
  623. package/dist/types/DynamicType.spec.js +0 -12
  624. package/dist/types/DynamicType.spec.js.map +0 -1
  625. package/dist/types/FloatType.spec.d.ts +0 -1
  626. package/dist/types/FloatType.spec.js +0 -12
  627. package/dist/types/FloatType.spec.js.map +0 -1
  628. package/dist/types/FunctionType.spec.d.ts +0 -1
  629. package/dist/types/FunctionType.spec.js +0 -29
  630. package/dist/types/FunctionType.spec.js.map +0 -1
  631. package/dist/types/IntegerType.spec.d.ts +0 -1
  632. package/dist/types/IntegerType.spec.js +0 -12
  633. package/dist/types/IntegerType.spec.js.map +0 -1
  634. package/dist/types/InvalidType.spec.d.ts +0 -1
  635. package/dist/types/InvalidType.spec.js +0 -12
  636. package/dist/types/InvalidType.spec.js.map +0 -1
  637. package/dist/types/LazyType.d.ts +0 -15
  638. package/dist/types/LazyType.js +0 -32
  639. package/dist/types/LazyType.js.map +0 -1
  640. package/dist/types/LongIntegerType.spec.d.ts +0 -1
  641. package/dist/types/LongIntegerType.spec.js +0 -12
  642. package/dist/types/LongIntegerType.spec.js.map +0 -1
  643. package/dist/types/ObjectType.spec.d.ts +0 -1
  644. package/dist/types/ObjectType.spec.js +0 -12
  645. package/dist/types/ObjectType.spec.js.map +0 -1
  646. package/dist/types/StringType.spec.d.ts +0 -1
  647. package/dist/types/StringType.spec.js +0 -12
  648. package/dist/types/StringType.spec.js.map +0 -1
  649. package/dist/types/VoidType.spec.d.ts +0 -1
  650. package/dist/types/VoidType.spec.js +0 -12
  651. package/dist/types/VoidType.spec.js.map +0 -1
  652. /package/dist/{astUtils/creators.spec.d.ts → lsp/worker/run.d.ts} +0 -0
@@ -1,23 +1,91 @@
1
- import type { Range, Diagnostic, CodeAction, SemanticTokenTypes, SemanticTokenModifiers } from 'vscode-languageserver';
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ import type { Range, CodeAction, Position, CompletionItem, Location, DocumentSymbol, WorkspaceSymbol, Disposable, FileChangeType, CodeDescription, DiagnosticRelatedInformation, DiagnosticSeverity, DiagnosticTag, SelectionRange } from 'vscode-languageserver-protocol';
2
4
  import type { Scope } from './Scope';
3
5
  import type { BrsFile } from './files/BrsFile';
4
6
  import type { XmlFile } from './files/XmlFile';
5
- import type { FunctionType } from './types/FunctionType';
7
+ import type { TypedFunctionType } from './types/TypedFunctionType';
6
8
  import type { ParseMode } from './parser/Parser';
7
9
  import type { Program } from './Program';
8
10
  import type { ProgramBuilder } from './ProgramBuilder';
9
- import type { Expression, FunctionStatement, FunctionExpression } from './parser';
11
+ import type { FunctionStatement } from './parser/Statement';
12
+ import type { AstNode, Expression } from './parser/AstNode';
10
13
  import type { TranspileState } from './parser/TranspileState';
11
14
  import type { SourceNode } from 'source-map';
12
15
  import type { BscType } from './types/BscType';
13
- export interface BsDiagnostic extends Diagnostic {
14
- file: BscFile;
16
+ import type { Token } from './lexer/Token';
17
+ import type { SemanticTokenModifiers, SemanticTokenTypes } from 'vscode-languageserver';
18
+ import type { SymbolTypeFlag } from './SymbolTypeFlag';
19
+ import type { Editor } from './astUtils/Editor';
20
+ import type { BscFile } from './files/BscFile';
21
+ import type { FileFactory } from './files/Factory';
22
+ import type { LazyFileData } from './files/LazyFileData';
23
+ import type { BscTypeKind } from './types/BscTypeKind';
24
+ import type { SourceFixAllCodeAction } from './CodeActionUtil';
25
+ export interface BsDiagnostic {
26
+ /**
27
+ * The location at which the message applies
28
+ */
29
+ location: Location;
30
+ /**
31
+ * The diagnostic's severity. Can be omitted. If omitted it is up to the
32
+ * client to interpret diagnostics as error, warning, info or hint.
33
+ */
34
+ severity?: DiagnosticSeverity;
35
+ /**
36
+ * The diagnostic's code, which usually appear in the user interface.
37
+ */
38
+ code?: number | string;
39
+ /**
40
+ * An optional property to describe the error code.
41
+ * Requires the code field (above) to be present/not null.
42
+ *
43
+ * @since 3.16.0
44
+ */
45
+ codeDescription?: CodeDescription;
46
+ /**
47
+ * A human-readable string describing the source of this
48
+ * diagnostic, e.g. 'typescript' or 'super lint'. It usually
49
+ * appears in the user interface.
50
+ */
51
+ source?: string;
52
+ /**
53
+ * The diagnostic's message. It usually appears in the user interface
54
+ */
55
+ message: string;
56
+ /**
57
+ * Additional metadata about the diagnostic.
58
+ *
59
+ * @since 3.15.0
60
+ */
61
+ tags?: DiagnosticTag[];
62
+ /**
63
+ * An array of related diagnostic information, e.g. when symbol-names within
64
+ * a scope collide all definitions can be marked via this property.
65
+ */
66
+ relatedInformation?: DiagnosticRelatedInformation[];
15
67
  /**
16
- * A generic data container where additional details of the diagnostic can be stored. These are stripped out before being sent to a languageclient, and not printed to the console.
68
+ * A data entry field that is preserved between a `textDocument/publishDiagnostics`
69
+ * notification and `textDocument/codeAction` request.
70
+ *
71
+ * @since 3.16.0
17
72
  */
18
73
  data?: any;
74
+ /**
75
+ * The code used for this diagnostic in v0
76
+ */
77
+ legacyCode?: number | string;
78
+ }
79
+ export interface DiagnosticContext {
80
+ scopeSpecific?: boolean;
81
+ scope?: Scope;
82
+ tags?: string[];
83
+ segment?: AstNode;
84
+ }
85
+ export interface DiagnosticContextPair {
86
+ diagnostic: BsDiagnostic;
87
+ context?: DiagnosticContext;
19
88
  }
20
- export declare type BscFile = BrsFile | XmlFile;
21
89
  export interface Callable {
22
90
  file: BscFile;
23
91
  name: string;
@@ -25,7 +93,7 @@ export interface Callable {
25
93
  * Is the callable declared as "sub". If falsey, assumed declared as "function"
26
94
  */
27
95
  isSub: boolean;
28
- type: FunctionType;
96
+ type: TypedFunctionType;
29
97
  /**
30
98
  * A short description of the callable. Should be a short sentence.
31
99
  */
@@ -54,29 +122,13 @@ export interface Callable {
54
122
  */
55
123
  functionStatement: FunctionStatement;
56
124
  }
57
- export interface FunctionCall {
58
- /**
59
- * The full range of this function call (from the start of the function name to its closing paren)
60
- */
61
- range: Range;
62
- functionExpression: FunctionExpression;
63
- file: BscFile;
64
- name: string;
65
- args: CallableArg[];
66
- nameRange: Range;
67
- }
68
- /**
69
- * An argument for an expression call.
70
- */
71
- export interface CallableArg {
72
- text: string;
73
- type: BscType;
74
- range: Range;
75
- }
76
125
  export interface CallableParam {
77
126
  name: string;
78
127
  type: BscType;
79
- isOptional?: boolean;
128
+ /**
129
+ * Is this parameter required or optional?
130
+ */
131
+ isOptional: boolean;
80
132
  /**
81
133
  * Indicates that an unlimited number of arguments can be passed in
82
134
  */
@@ -91,12 +143,12 @@ export interface FileObj {
91
143
  */
92
144
  export interface FileReference {
93
145
  /**
94
- * The pkgPath to the referenced file.
146
+ * The destPath for the referenced file.
95
147
  */
96
- pkgPath: string;
148
+ destPath: string;
97
149
  text: string;
98
150
  /**
99
- * The file that is doing the import. Note this is NOT the file the pkgPath points to.
151
+ * The file that is doing the import. Note this is NOT the file the destPath points to.
100
152
  */
101
153
  sourceFile: XmlFile | BrsFile;
102
154
  /**
@@ -109,7 +161,7 @@ export interface FileReference {
109
161
  }
110
162
  export interface VariableDeclaration {
111
163
  name: string;
112
- type: BscType;
164
+ getType: () => BscType;
113
165
  /**
114
166
  * The range for the variable name
115
167
  */
@@ -149,172 +201,778 @@ export interface CommentFlag {
149
201
  * The range that this flag applies to (i.e. the lines that should be suppressed/re-enabled)
150
202
  */
151
203
  affectedRange: Range;
152
- codes: DiagnosticCode[] | null;
204
+ /**
205
+ * Codes this flag suppresses.
206
+ * - `null`: every code (the flag suppresses everything in its `affectedRange`)
207
+ * - array: only those specific codes
208
+ * - `undefined` (or omitted): no codes (the flag suppresses nothing on its own; useful when the suppression decision is fully delegated to `enableCodes`)
209
+ */
210
+ codes?: DiagnosticCode[] | null;
211
+ /**
212
+ * Codes explicitly re-enabled (carved out) within this flag's `affectedRange`.
213
+ * A diagnostic matched by `codes` is NOT suppressed if it is also matched by `enableCodes`.
214
+ * - `null`: every code is re-enabled (nothing in the range is suppressed)
215
+ * - array: only those specific codes are carved out
216
+ * - `undefined` (or omitted): no carve-outs; suppression is governed entirely by `codes`
217
+ */
218
+ enableCodes?: DiagnosticCode[] | null;
153
219
  }
154
- export declare type CompilerPluginFactory = () => CompilerPlugin;
155
- export interface CompilerPlugin {
220
+ export interface PluginFactoryOptions {
221
+ /**
222
+ * What version of brighterscript is activating this plugin? (Useful for picking different plugins or behavior based on the version of brighterscript)
223
+ */
224
+ version: string;
225
+ }
226
+ export declare type PluginFactory = (options?: PluginFactoryOptions) => Plugin;
227
+ /**
228
+ * @deprecated use `PluginFactory` instead
229
+ */
230
+ export declare type CompilerPluginFactory = PluginFactory;
231
+ /**
232
+ * @deprecated use `Plugin` instead
233
+ */
234
+ export declare type CompilerPlugin = Plugin;
235
+ export interface Plugin {
156
236
  name: string;
157
- beforeProgramCreate?: PluginHandler<BeforeProgramCreateEvent>;
158
- afterProgramCreate?: PluginHandler<AfterProgramCreateEvent>;
159
- beforePrepublish?: PluginHandler<BeforePrepublishEvent>;
160
- afterPrepublish?: PluginHandler<AfterPrepublishEvent>;
161
- beforePublish?: PluginHandler<BeforePublishEvent>;
162
- afterPublish?: PluginHandler<AfterPublishEvent>;
163
- beforeProgramValidate?: PluginHandler<BeforeProgramValidateEvent>;
164
- afterProgramValidate?: PluginHandler<AfterProgramValidateEvent>;
165
- beforeProgramTranspile?: PluginHandler<BeforeProgramTranspileEvent>;
166
- afterProgramTranspile?: PluginHandler<AfterProgramTranspileEvent>;
167
- onGetCodeActions?: PluginHandler<OnGetCodeActionsEvent>;
168
- onGetSemanticTokens?: PluginHandler<OnGetSemanticTokensEvent>;
169
- afterScopeCreate?: PluginHandler<AfterScopeCreateEvent>;
170
- beforeScopeDispose?: PluginHandler<BeforeScopeDisposeEvent>;
171
- afterScopeDispose?: PluginHandler<AfterScopeDisposeEvent>;
172
- beforeScopeValidate?: PluginHandler<BeforeScopeValidateEvent>;
173
- afterScopeValidate?: PluginHandler<AfterScopeValidateEvent>;
174
- beforeFileParse?: PluginHandler<BeforeFileParseEvent>;
175
- afterFileParse?: PluginHandler<AfterFileParseEvent>;
176
- beforeFileValidate?: PluginHandler<BeforeFileValidateEvent>;
177
- afterFileValidate?: PluginHandler<AfterFileValidateEvent>;
178
- beforeFileTranspile?: PluginHandler<BeforeFileTranspileEvent>;
179
- afterFileTranspile?: PluginHandler<AfterFileTranspileEvent>;
180
- beforeFileDispose?: PluginHandler<BeforeFileDisposeEvent>;
181
- afterFileDispose?: PluginHandler<AfterFileDisposeEvent>;
182
- }
183
- export declare type PluginHandler<T> = (event: T) => void;
184
- export interface BeforeProgramCreateEvent {
185
- builder: ProgramBuilder;
237
+ /**
238
+ * Called before a new program is created
239
+ */
240
+ beforeProvideProgram?(event: BeforeProvideProgramEvent): any;
241
+ provideProgram?(event: ProvideProgramEvent): any;
242
+ /**
243
+ * Called after a new program is created
244
+ */
245
+ afterProvideProgram?(event: AfterProvideProgramEvent): any;
246
+ /**
247
+ * Called before the program gets prepared for building
248
+ */
249
+ beforePrepareProgram?(event: BeforePrepareProgramEvent): any;
250
+ /**
251
+ * Called when the program gets prepared for building
252
+ */
253
+ prepareProgram?(event: PrepareProgramEvent): any;
254
+ /**
255
+ * Called after the program gets prepared for building
256
+ */
257
+ afterPrepareProgram?(event: AfterPrepareProgramEvent): any;
258
+ /**
259
+ * Called before the entire program is validated
260
+ */
261
+ beforeValidateProgram?(event: BeforeValidateProgramEvent): any;
262
+ /**
263
+ * Called before the entire program is validated
264
+ */
265
+ validateProgram?(event: ValidateProgramEvent): any;
266
+ /**
267
+ * Called after the program has been validated
268
+ */
269
+ afterValidateProgram?(event: AfterValidateProgramEvent): any;
270
+ /**
271
+ * Called right before the program is disposed/destroyed
272
+ */
273
+ beforeRemoveProgram?(event: BeforeRemoveProgramEvent): any;
274
+ removeProgram?(event: RemoveProgramEvent): any;
275
+ afterRemoveProgram?(event: AfterRemoveProgramEvent): any;
276
+ /**
277
+ * Emitted when VS Code requests "source fix all" source actions for a file.
278
+ * Plugins push one or more `SourceFixAllCodeAction` objects onto `event.actions`,
279
+ * each representing a distinct named group that will appear in the Source Actions menu.
280
+ * Plugins are responsible for assembling and merging all changes within each action.
281
+ */
282
+ onGetSourceFixAllCodeActions?(event: OnGetSourceFixAllCodeActionsEvent): any;
283
+ /**
284
+ * Emitted before the program starts collecting completions
285
+ */
286
+ beforeProvideCompletions?(event: BeforeProvideCompletionsEvent): any;
287
+ /**
288
+ * Use this event to contribute completions
289
+ */
290
+ provideCompletions?(event: ProvideCompletionsEvent): any;
291
+ /**
292
+ * Emitted after the program has finished collecting completions, but before they are sent to the client
293
+ */
294
+ afterProvideCompletions?(event: AfterProvideCompletionsEvent): any;
295
+ /**
296
+ * Called before the `provideHover` hook. Use this if you need to prepare any of the in-memory objects before the `provideHover` gets called
297
+ */
298
+ beforeProvideHover?(event: BeforeProvideHoverEvent): any;
299
+ /**
300
+ * Called when bsc looks for hover information. Use this if your plugin wants to contribute hover information.
301
+ */
302
+ provideHover?(event: ProvideHoverEvent): any;
303
+ /**
304
+ * Called after the `provideHover` hook. Use this if you want to intercept or sanitize the hover data (even from other plugins) before it gets sent to the client.
305
+ */
306
+ afterProvideHover?(event: AfterProvideHoverEvent): any;
307
+ /**
308
+ * Called after a scope was created
309
+ */
310
+ beforeProvideScope?(event: BeforeProvideScopeEvent): any;
311
+ provideScope?(event: ProvideScopeEvent): any;
312
+ afterProvideScope?(event: AfterProvideScopeEvent): any;
313
+ beforeRemoveScope?(event: BeforeRemoveProgramEvent): any;
314
+ removeScope?(event: RemoveScopeEvent): any;
315
+ afterRemoveScope?(event: AfterRemoveScopeEvent): any;
316
+ /**
317
+ * Called before the `provideDefinition` hook
318
+ */
319
+ beforeProvideDefinition?(event: BeforeProvideDefinitionEvent): any;
320
+ /**
321
+ * Provide one or more `Location`s where the symbol at the given position was originally defined
322
+ * @param event
323
+ */
324
+ provideDefinition?(event: ProvideDefinitionEvent): any;
325
+ /**
326
+ * Called after `provideDefinition`. Use this if you want to intercept or sanitize the definition data provided by bsc or other plugins
327
+ * @param event
328
+ */
329
+ afterProvideDefinition?(event: AfterProvideDefinitionEvent): any;
330
+ /**
331
+ * Called before the `provideReferences` hook
332
+ */
333
+ beforeProvideReferences?(event: BeforeProvideReferencesEvent): any;
334
+ /**
335
+ * Provide all of the `Location`s where the symbol at the given position is located
336
+ * @param event
337
+ */
338
+ provideReferences?(event: ProvideReferencesEvent): any;
339
+ /**
340
+ * Called after `provideReferences`. Use this if you want to intercept or sanitize the references data provided by bsc or other plugins
341
+ * @param event
342
+ */
343
+ afterProvideReferences?(event: AfterProvideReferencesEvent): any;
344
+ /**
345
+ * Called before the `provideDocumentSymbols` hook
346
+ */
347
+ beforeProvideDocumentSymbols?(event: BeforeProvideDocumentSymbolsEvent): any;
348
+ /**
349
+ * Provide all of the `DocumentSymbol`s for the given file
350
+ * @param event
351
+ */
352
+ provideDocumentSymbols?(event: ProvideDocumentSymbolsEvent): any;
353
+ /**
354
+ * Called after `provideDocumentSymbols`. Use this if you want to intercept or sanitize the document symbols data provided by bsc or other plugins
355
+ * @param event
356
+ */
357
+ afterProvideDocumentSymbols?(event: AfterProvideDocumentSymbolsEvent): any;
358
+ /**
359
+ * Called before the `provideWorkspaceSymbols` hook
360
+ */
361
+ beforeProvideWorkspaceSymbols?(event: BeforeProvideWorkspaceSymbolsEvent): any;
362
+ /**
363
+ * Provide all of the workspace symbols for the entire project
364
+ * @param event
365
+ */
366
+ provideWorkspaceSymbols?(event: ProvideWorkspaceSymbolsEvent): any;
367
+ /**
368
+ * Called after `provideWorkspaceSymbols`. Use this if you want to intercept or sanitize the workspace symbols data provided by bsc or other plugins
369
+ * @param event
370
+ */
371
+ afterProvideWorkspaceSymbols?(event: AfterProvideWorkspaceSymbolsEvent): any;
372
+ /**
373
+ * Called before the `provideSelectionRanges` hook
374
+ */
375
+ beforeProvideSelectionRanges?(event: BeforeProvideSelectionRangesEvent): any;
376
+ /**
377
+ * Provide the selection ranges for the given positions in a file. Used for expand/shrink selection.
378
+ */
379
+ provideSelectionRanges?(event: ProvideSelectionRangesEvent): any;
380
+ /**
381
+ * Called after `provideSelectionRanges`. Use this if you want to intercept or sanitize the selection range data provided by bsc or other plugins.
382
+ */
383
+ afterProvideSelectionRanges?(event: AfterProvideSelectionRangesEvent): any;
384
+ beforeValidateScope?(event: BeforeValidateScopeEvent): any;
385
+ validateScope?(event: ValidateScopeEvent): any;
386
+ afterValidateScope?(event: AfterValidateScopeEvent): any;
387
+ beforeProvideCodeActions?(event: BeforeProvideCodeActionsEvent): any;
388
+ provideCodeActions?(event: ProvideCodeActionsEvent): any;
389
+ afterProvideCodeActions?(event: AfterProvideCodeActionsEvent): any;
390
+ beforeProvideSemanticTokens?(event: BeforeProvideSemanticTokensEvent): any;
391
+ provideSemanticTokens?(event: ProvideSemanticTokensEvent): any;
392
+ afterProvideSemanticTokens?(event: AfterProvideSemanticTokensEvent): any;
393
+ /**
394
+ * Called before plugins are asked to provide files to the program. (excludes virtual files produced by `provideFile` events).
395
+ * Call the `setFileData()` method to override the file contents.
396
+ */
397
+ beforeProvideFile?(event: BeforeProvideFileEvent): any;
398
+ /**
399
+ * Give plugins the opportunity to handle processing a file. (excludes virtual files produced by `provideFile` events)
400
+ */
401
+ provideFile?(event: ProvideFileEvent): any;
402
+ /**
403
+ * Called after a file was added to the program. (excludes virtual files produced by `provideFile` events)
404
+ */
405
+ afterProvideFile?(event: AfterProvideFileEvent): any;
406
+ /**
407
+ * Called before a file is added to the program.
408
+ * Includes physical files as well as any virtual files produced by `provideFile` events
409
+ */
410
+ beforeAddFile?(event: BeforeAddFileEvent): any;
411
+ /**
412
+ * Called after a file has been added to the program.
413
+ * Includes physical files as well as any virtual files produced by `provideFile` events
414
+ */
415
+ afterAddFile?(event: AfterAddFileEvent): any;
416
+ /**
417
+ * Called before a file is removed from the program. This includes physical and virtual files
418
+ */
419
+ beforeRemoveFile?(event: BeforeRemoveFileEvent): any;
420
+ /**
421
+ * Called after a file has been removed from the program. This includes physical and virtual files
422
+ */
423
+ afterRemoveFile?(event: AfterRemoveFileEvent): any;
424
+ /**
425
+ * Called before each file is validated
426
+ */
427
+ beforeValidateFile?(event: BeforeValidateFileEvent): any;
428
+ /**
429
+ * Called during the file validation process. If your plugin contributes file validations, this is a good place to contribute them.
430
+ */
431
+ validateFile?(event: ValidateFileEvent): any;
432
+ /**
433
+ * Called after each file is validated
434
+ */
435
+ afterValidateFile?(event: AfterValidateFileEvent): any;
436
+ /**
437
+ * Called right before the program builds (i.e. generates the code and puts it in the outDir
438
+ */
439
+ beforeBuildProgram?(event: BeforeBuildProgramEvent): any;
440
+ /**
441
+ * Called right after the program builds (i.e. generates the code and puts it in the outDir
442
+ */
443
+ afterBuildProgram?(event: AfterBuildProgramEvent): any;
444
+ /**
445
+ * Before preparing the file for building
446
+ */
447
+ beforePrepareFile?(event: BeforePrepareFileEvent): any;
448
+ /**
449
+ * Prepare the file for building
450
+ */
451
+ prepareFile?(event: PrepareFileEvent): any;
452
+ /**
453
+ * After preparing the file for building
454
+ */
455
+ afterPrepareFile?(event: AfterPrepareFileEvent): any;
456
+ /**
457
+ * Before the program turns all file objects into their final buffers
458
+ */
459
+ beforeSerializeProgram?(event: BeforeSerializeProgramEvent): any;
460
+ /**
461
+ * Emitted right at the start of the program turning all file objects into their final buffers
462
+ */
463
+ serializeProgram?(event: SerializeProgramEvent): any;
464
+ /**
465
+ * After the program turns all file objects into their final buffers
466
+ */
467
+ afterSerializeProgram?(event: AfterSerializeProgramEvent): any;
468
+ /**
469
+ * Before turning the file into its final contents
470
+ */
471
+ beforeSerializeFile?(event: BeforeSerializeFileEvent): any;
472
+ /**
473
+ * Turn the file into its final contents (i.e. transpile a bs file, compress a jpeg, etc)
474
+ */
475
+ serializeFile?(event: SerializeFileEvent): any;
476
+ /**
477
+ * After turning the file into its final contents
478
+ */
479
+ afterSerializeFile?(event: AfterSerializeFileEvent): any;
480
+ /**
481
+ * Called before any files are written
482
+ */
483
+ beforeWriteProgram?(event: BeforeWriteProgramEvent): any;
484
+ /**
485
+ * Called after all files are written
486
+ */
487
+ afterWriteProgram?(event: AfterWriteProgramEvent): any;
488
+ /**
489
+ * Before a file is written to disk. These are raw files that contain the final output. One `File` may produce several of these
490
+ */
491
+ beforeWriteFile?(event: BeforeWriteFileEvent): any;
492
+ /**
493
+ * Called when a file should be persisted (usually writing to storage). These are raw files that contain the final output. One `File` may produce several of these.
494
+ * When a plugin has handled a file, it should be pushed to the `handledFiles` set so future plugins don't write the file multiple times
495
+ */
496
+ writeFile?(event: WriteFileEvent): any;
497
+ /**
498
+ * Before a file is written to disk. These are raw files that contain the final output. One `File` may produce several of these
499
+ */
500
+ afterWriteFile?(event: AfterWriteFileEvent): any;
186
501
  }
187
- export interface BeforePrepublishEvent {
188
- builder: ProgramBuilder;
502
+ export interface BeforeProvideCodeActionsEvent<TFile extends BscFile = BscFile> {
189
503
  program: Program;
190
- files: FileObj[];
504
+ file: TFile;
505
+ range: Range;
506
+ scopes: Scope[];
507
+ diagnostics: BsDiagnostic[];
508
+ codeActions: CodeAction[];
191
509
  }
192
- export interface AfterPrepublishEvent {
193
- builder: ProgramBuilder;
510
+ export interface ProvideCodeActionsEvent<TFile extends BscFile = BscFile> {
194
511
  program: Program;
195
- files: FileObj[];
512
+ file: TFile;
513
+ range: Range;
514
+ scopes: Scope[];
515
+ diagnostics: BsDiagnostic[];
516
+ codeActions: CodeAction[];
196
517
  }
197
- export interface BeforePublishEvent {
198
- builder: ProgramBuilder;
518
+ export interface AfterProvideCodeActionsEvent<TFile extends BscFile = BscFile> {
199
519
  program: Program;
200
- files: FileObj[];
520
+ file: TFile;
521
+ range: Range;
522
+ scopes: Scope[];
523
+ diagnostics: BsDiagnostic[];
524
+ codeActions: CodeAction[];
201
525
  }
202
- export interface AfterPublishEvent {
526
+ export interface BeforeProvideProgramEvent {
203
527
  builder: ProgramBuilder;
204
- program: Program;
205
- files: FileObj[];
528
+ program?: Program;
529
+ }
530
+ export interface ProvideProgramEvent {
531
+ builder: ProgramBuilder;
532
+ program?: Program;
206
533
  }
207
- export interface AfterProgramCreateEvent {
534
+ export interface AfterProvideProgramEvent {
208
535
  builder: ProgramBuilder;
209
536
  program: Program;
210
537
  }
211
- export interface BeforeProgramValidateEvent {
538
+ export interface BeforeValidateProgramEvent {
212
539
  program: Program;
213
540
  }
214
- export interface AfterProgramValidateEvent {
541
+ export declare type ValidateProgramEvent = BeforeValidateProgramEvent;
542
+ export interface AfterValidateProgramEvent extends BeforeValidateProgramEvent {
543
+ /**
544
+ * Was the validation cancelled? Will be false if the validation was completed
545
+ */
546
+ wasCancelled: boolean;
547
+ }
548
+ export interface OnGetSourceFixAllCodeActionsEvent {
215
549
  program: Program;
550
+ file: BscFile;
551
+ /** All diagnostics for this file (not range-filtered) */
552
+ diagnostics: BsDiagnostic[];
553
+ scopes: Scope[];
554
+ /**
555
+ * Plugins push one or more SourceFixAllCodeAction objects here.
556
+ * Each becomes a distinct named entry in VS Code's Source Actions menu.
557
+ */
558
+ actions: SourceFixAllCodeAction[];
216
559
  }
217
- export interface BeforeProgramTranspileEvent {
560
+ export interface ProvideCompletionsEvent<TFile extends BscFile = BscFile> {
218
561
  program: Program;
219
- entries: TranspileEntry[];
562
+ file: TFile;
563
+ /**
564
+ * The scopes this file is a member of. If the file is a member of no scopes, this will be an empty array.
565
+ * Plugins can use `event.program.globalScope` if the file is not a member of any scopes
566
+ */
567
+ scopes: Scope[];
568
+ position: Position;
569
+ completions: CompletionItem[];
220
570
  }
221
- export interface AfterProgramTranspileEvent {
571
+ export declare type BeforeProvideCompletionsEvent<TFile extends BscFile = BscFile> = ProvideCompletionsEvent<TFile>;
572
+ export declare type AfterProvideCompletionsEvent<TFile extends BscFile = BscFile> = ProvideCompletionsEvent<TFile>;
573
+ export interface BeforeBuildProgramEvent {
222
574
  program: Program;
223
- entries: TranspileEntry[];
575
+ files: BscFile[];
576
+ editor: Editor;
224
577
  }
225
- export interface OnGetCodeActionsEvent {
578
+ export declare type AfterBuildProgramEvent = BeforeBuildProgramEvent;
579
+ export interface ProvideHoverEvent {
226
580
  program: Program;
227
581
  file: BscFile;
228
- range: Range;
582
+ position: Position;
229
583
  scopes: Scope[];
230
- diagnostics: BsDiagnostic[];
231
- codeActions: CodeAction[];
584
+ hovers: Hover[];
585
+ }
586
+ export interface Hover {
587
+ /**
588
+ * The contents of the hover, written in markdown. If you want to display code in the hover, use code blocks, like this:
589
+ * ```text
590
+ * ```brighterscript
591
+ * some = "code" + "here"
592
+ * ```
593
+ * ```
594
+ */
595
+ contents: string | string[];
596
+ /**
597
+ * An optional range
598
+ */
599
+ range?: Range;
232
600
  }
233
- export interface AfterScopeCreateEvent {
601
+ export declare type BeforeProvideHoverEvent = ProvideHoverEvent;
602
+ export declare type AfterProvideHoverEvent = ProvideHoverEvent;
603
+ export interface BeforeProvideScopeEvent {
234
604
  program: Program;
235
605
  scope: Scope;
236
606
  }
237
- export interface BeforeScopeDisposeEvent {
607
+ export interface ProvideScopeEvent {
238
608
  program: Program;
239
609
  scope: Scope;
240
610
  }
241
- export interface AfterScopeDisposeEvent {
611
+ export interface AfterProvideScopeEvent {
242
612
  program: Program;
243
613
  scope: Scope;
244
614
  }
245
- export interface BeforeScopeValidateEvent {
615
+ export interface BeforeRemoveProgramEvent {
616
+ program: Program;
617
+ }
618
+ export interface RemoveScopeEvent {
246
619
  program: Program;
247
620
  scope: Scope;
248
621
  }
249
- export interface AfterScopeValidateEvent {
622
+ export interface AfterRemoveScopeEvent {
250
623
  program: Program;
251
624
  scope: Scope;
252
625
  }
253
- export interface OnScopeGetCodeActionsEvent {
626
+ export interface BeforeValidateScopeEvent {
254
627
  program: Program;
255
628
  scope: Scope;
256
- file: BscFile;
257
- range: Range;
258
- /**
259
- * A filtered list of diagnostics whose lines touch the lines of the given range
260
- */
261
- diagnostics: BsDiagnostic[];
262
- codeActions: CodeAction[];
263
629
  }
630
+ export declare type AfterValidateScopeEvent = BeforeValidateScopeEvent;
264
631
  export interface BeforeFileParseEvent {
265
632
  program: Program;
266
633
  srcPath: string;
267
634
  source: string;
268
635
  }
636
+ export interface OnFileParseEvent {
637
+ program: Program;
638
+ srcPath: string;
639
+ source: string;
640
+ }
269
641
  export interface AfterFileParseEvent {
270
642
  program: Program;
271
643
  file: BscFile;
272
644
  }
273
- export interface BeforeFileValidateEvent {
645
+ export interface ProvideDefinitionEvent<TFile = BscFile> {
274
646
  program: Program;
275
- file: BscFile;
647
+ /**
648
+ * The file that the getDefinition request was invoked in
649
+ */
650
+ file: TFile;
651
+ /**
652
+ * The position in the text document where the getDefinition request was invoked
653
+ */
654
+ position: Position;
655
+ /**
656
+ * The list of locations for where the item at the file and position was defined
657
+ */
658
+ definitions: Location[];
276
659
  }
277
- export interface AfterFileValidateEvent {
660
+ export declare type BeforeProvideDefinitionEvent<TFile = BscFile> = ProvideDefinitionEvent<TFile>;
661
+ export declare type AfterProvideDefinitionEvent<TFile = BscFile> = ProvideDefinitionEvent<TFile>;
662
+ export interface ProvideReferencesEvent<TFile = BscFile> {
278
663
  program: Program;
279
- file: BscFile;
664
+ /**
665
+ * The file that the getDefinition request was invoked in
666
+ */
667
+ file: TFile;
668
+ /**
669
+ * The position in the text document where the getDefinition request was invoked
670
+ */
671
+ position: Position;
672
+ /**
673
+ * The list of locations for where the item at the file and position was defined
674
+ */
675
+ references: Location[];
676
+ }
677
+ export declare type BeforeProvideReferencesEvent<TFile = BscFile> = ProvideReferencesEvent<TFile>;
678
+ export declare type AfterProvideReferencesEvent<TFile = BscFile> = ProvideReferencesEvent<TFile>;
679
+ export interface ProvideDocumentSymbolsEvent<TFile = BscFile> {
680
+ program: Program;
681
+ /**
682
+ * The file that the `documentSymbol` request was invoked in
683
+ */
684
+ file: TFile;
685
+ /**
686
+ * The result list of symbols
687
+ */
688
+ documentSymbols: DocumentSymbol[];
689
+ }
690
+ export declare type BeforeProvideDocumentSymbolsEvent<TFile = BscFile> = ProvideDocumentSymbolsEvent<TFile>;
691
+ export declare type AfterProvideDocumentSymbolsEvent<TFile = BscFile> = ProvideDocumentSymbolsEvent<TFile>;
692
+ export interface ProvideWorkspaceSymbolsEvent {
693
+ program: Program;
694
+ /**
695
+ * The result list of symbols
696
+ */
697
+ workspaceSymbols: WorkspaceSymbol[];
698
+ }
699
+ export declare type BeforeProvideWorkspaceSymbolsEvent = ProvideWorkspaceSymbolsEvent;
700
+ export declare type AfterProvideWorkspaceSymbolsEvent = ProvideWorkspaceSymbolsEvent;
701
+ export interface BeforeProvideSemanticTokensEvent<T extends BscFile = BscFile> {
702
+ /**
703
+ * The program this file is from
704
+ */
705
+ program: Program;
706
+ /**
707
+ * The file to get semantic tokens for
708
+ */
709
+ file: T;
710
+ /**
711
+ * The list of scopes that this file is a member of
712
+ */
713
+ scopes: Scope[];
714
+ /**
715
+ * The list of semantic tokens being produced during this event.
716
+ */
717
+ semanticTokens: SemanticToken[];
718
+ }
719
+ export interface ProvideSemanticTokensEvent<T extends BscFile = BscFile> {
720
+ /**
721
+ * The program this file is from
722
+ */
723
+ program: Program;
724
+ /**
725
+ * The file to get semantic tokens for
726
+ */
727
+ file: T;
728
+ /**
729
+ * The list of scopes that this file is a member of
730
+ */
731
+ scopes: Scope[];
732
+ /**
733
+ * The list of semantic tokens being produced during this event.
734
+ */
735
+ semanticTokens: SemanticToken[];
736
+ }
737
+ export interface AfterProvideSemanticTokensEvent<T extends BscFile = BscFile> {
738
+ /**
739
+ * The program this file is from
740
+ */
741
+ program: Program;
742
+ /**
743
+ * The file to get semantic tokens for
744
+ */
745
+ file: T;
746
+ /**
747
+ * The list of scopes that this file is a member of
748
+ */
749
+ scopes: Scope[];
750
+ /**
751
+ * The list of semantic tokens being produced during this event.
752
+ */
753
+ semanticTokens: SemanticToken[];
754
+ }
755
+ export interface ProvideSelectionRangesEvent<TFile = BscFile> {
756
+ program: Program;
757
+ /**
758
+ * The file that the `selectionRange` request was invoked in
759
+ */
760
+ file: TFile;
761
+ /**
762
+ * The list of positions for which selection ranges are requested
763
+ */
764
+ positions: Position[];
765
+ /**
766
+ * The result list of selection ranges. One entry per position in `positions`.
767
+ * Each SelectionRange is a linked list from innermost to outermost via the `.parent` property.
768
+ */
769
+ selectionRanges: SelectionRange[];
280
770
  }
281
- export interface BeforeFileTranspileEvent {
771
+ export declare type BeforeProvideSelectionRangesEvent<TFile = BscFile> = ProvideSelectionRangesEvent<TFile>;
772
+ export declare type AfterProvideSelectionRangesEvent<TFile = BscFile> = ProvideSelectionRangesEvent<TFile>;
773
+ export declare type BeforeValidateFileEvent = ValidateFileEvent;
774
+ export interface ValidateFileEvent<T extends BscFile = BscFile> {
282
775
  program: Program;
776
+ file: T;
777
+ }
778
+ export declare type AfterValidateFileEvent<T extends BscFile = BscFile> = ValidateFileEvent;
779
+ export interface ValidateFileEvent<T extends BscFile = BscFile> {
780
+ program: Program;
781
+ file: T;
782
+ }
783
+ export interface TranspileEntry {
283
784
  file: BscFile;
284
785
  outputPath: string;
285
786
  }
286
- export interface AfterFileTranspileEvent {
787
+ export interface ScopeValidationOptions {
788
+ filesToBeValidatedInScopeContext?: Set<BscFile>;
789
+ changedSymbols?: Map<SymbolTypeFlag, Set<string>>;
790
+ changedFiles?: BscFile[];
791
+ force?: boolean;
792
+ initialValidation?: boolean;
793
+ }
794
+ export interface ValidateScopeEvent {
287
795
  program: Program;
288
- file: BscFile;
796
+ scope: Scope;
797
+ changedFiles?: BscFile[];
798
+ changedSymbols?: Map<SymbolTypeFlag, Set<string>>;
799
+ }
800
+ export interface AfterFileTranspileEvent<TFile extends BscFile = BscFile> {
801
+ /**
802
+ * The program this event was triggered for
803
+ */
804
+ program: Program;
805
+ file: TFile;
289
806
  outputPath: string;
807
+ /**
808
+ * The resulting transpiled file contents
809
+ */
810
+ code: string;
811
+ /**
812
+ * The sourceMaps for the generated code (if emitting source maps is enabled)
813
+ */
814
+ map?: string;
815
+ /**
816
+ * The generated type definition file contents (if emitting type definitions are enabled)
817
+ */
818
+ typedef?: string;
290
819
  }
291
- export interface BeforeFileDisposeEvent {
820
+ export declare type BeforeProvideFileEvent<TFile extends BscFile = BscFile> = ProvideFileEvent<TFile>;
821
+ export interface ProvideFileEvent<TFile extends BscFile = BscFile> {
822
+ /**
823
+ * The lower-case file extension for the srcPath. (i.e. ".brs", ".xml")
824
+ */
825
+ srcExtension: string;
826
+ /**
827
+ * The srcPath for the file. (i.e. `/user/bob/projects/VideoApp/source/main.bs`)
828
+ */
829
+ srcPath: string;
830
+ /**
831
+ * The destPath for the file. (i.e. for `/user/bob/projects/VideoApp/source/main.bs`, destPath would be `source/main.bs`)
832
+ */
833
+ destPath: string;
834
+ /**
835
+ * A lazy-loading container for this file's data. Call `.get()` to lazy load the data, and `.set()` to override file contents
836
+ */
837
+ data: LazyFileData;
838
+ /**
839
+ * An array of files that should be added to the program as a result of this event
840
+ */
841
+ files: TFile[];
842
+ /**
843
+ * The program for this event
844
+ */
292
845
  program: Program;
293
- file: BscFile;
846
+ /**
847
+ * A factory used to create new instances of the BrighterScript built-in file types. This mitigates the issue
848
+ * of a plugin's version of a File not being the same as the LanguageServer or CLI version of BrighterScript
849
+ * (due to npm installing multiple versions of brighterscript)
850
+ */
851
+ fileFactory: FileFactory;
294
852
  }
295
- export interface AfterFileDisposeEvent {
853
+ export declare type AfterProvideFileEvent<TFile extends BscFile = BscFile> = ProvideFileEvent<TFile>;
854
+ export interface BeforeAddFileEvent<TFile extends BscFile = BscFile> {
855
+ file: TFile;
296
856
  program: Program;
297
- file: BscFile;
298
857
  }
299
- export interface OnFileGetCodeActionsEvent {
858
+ export declare type AfterAddFileEvent<TFile extends BscFile = BscFile> = BeforeAddFileEvent<TFile>;
859
+ export interface BeforeRemoveFileEvent<TFile extends BscFile = BscFile> {
860
+ file: TFile;
300
861
  program: Program;
301
- file: BscFile;
302
- range: Range;
862
+ }
863
+ export declare type AfterRemoveFileEvent<TFile extends BscFile = BscFile> = BeforeRemoveFileEvent<TFile>;
864
+ export declare type BeforePrepareProgramEvent = PrepareProgramEvent;
865
+ /**
866
+ * Event for when the program prepares itself for building
867
+ */
868
+ export interface PrepareProgramEvent {
869
+ program: Program;
870
+ editor: Editor;
871
+ files: BscFile[];
872
+ }
873
+ export declare type AfterPrepareProgramEvent = PrepareProgramEvent;
874
+ export declare type BeforePrepareFileEvent<TFile extends BscFile = BscFile> = PrepareFileEvent<TFile>;
875
+ /**
876
+ * Prepare the file for building
877
+ */
878
+ export interface PrepareFileEvent<TFile extends BscFile = BscFile> {
879
+ program: Program;
880
+ file: TFile;
881
+ editor: Editor;
303
882
  /**
304
- * A filtered list of diagnostics whose lines touch the lines of the given range
883
+ * The scope that was linked for this event. A file may be included in multiple scopes, but we choose the most relevant scope.
884
+ * Plugins may unlink this scope and link another one, but must then reassign this property to that new scope so that other
885
+ * plugins can reference it.
305
886
  */
306
- diagnostics: BsDiagnostic[];
307
- codeActions: CodeAction[];
887
+ scope: Scope;
308
888
  }
309
- export interface TranspileEntry {
889
+ export declare type OnPrepareFileEvent<TFile extends BscFile = BscFile> = PrepareFileEvent<TFile>;
890
+ export declare type AfterPrepareFileEvent<TFile extends BscFile = BscFile> = PrepareFileEvent<TFile>;
891
+ /**
892
+ * A container that holds the code, map, and typedef for serialized code files.
893
+ */
894
+ export interface SerializedCodeFile {
895
+ code?: string;
896
+ map?: string;
897
+ typedef?: string;
898
+ }
899
+ export interface BeforeSerializeProgramEvent {
900
+ program: Program;
901
+ files: BscFile[];
902
+ result: Map<BscFile, SerializedFile[]>;
903
+ }
904
+ export declare type SerializeProgramEvent = BeforeSerializeProgramEvent;
905
+ export declare type AfterSerializeProgramEvent = BeforeSerializeProgramEvent;
906
+ /**
907
+ * During the `SerializeFile` events, this is how plugins will contribute file data for a specific file
908
+ */
909
+ export interface SerializedFile {
910
+ /**
911
+ * The raw data for this file (i.e. a binary buffer for a .jpeg file, or the transpiled code for a .bs file)
912
+ */
913
+ data: Buffer;
914
+ /**
915
+ * The pkgPath for this chunk of data.
916
+ */
917
+ pkgPath: string;
918
+ }
919
+ export declare type BeforeSerializeFileEvent<TFile extends BscFile = BscFile> = SerializeFileEvent<TFile>;
920
+ export interface SerializeFileEvent<TFile extends BscFile = BscFile> {
921
+ program: Program;
922
+ file: TFile;
923
+ /**
924
+ * The scope that was linked for this event. A file may be included in multiple scopes, but we choose the most relevant scope.
925
+ * Plugins may unlink this scope and link another one, but must then reassign this property to that new scope so that other
926
+ * plugins can reference it.
927
+ */
928
+ scope: Scope;
929
+ /**
930
+ * The list of all files created across all the `SerializeFile` events.
931
+ * The key is the pkgPath of the file, and the
932
+ */
933
+ result: Map<TFile, SerializedFile[]>;
934
+ }
935
+ export declare type AfterSerializeFileEvent<TFile extends BscFile = BscFile> = SerializeFileEvent<TFile>;
936
+ export interface BeforeWriteProgramEvent {
937
+ program: Program;
938
+ outDir: string;
939
+ files: Map<BscFile, SerializedFile[]>;
940
+ }
941
+ export declare type AfterWriteProgramEvent = BeforeWriteProgramEvent;
942
+ export declare type BeforeWriteFileEvent = WriteFileEvent;
943
+ export interface WriteFileEvent {
944
+ program: Program;
945
+ file: SerializedFile;
946
+ /**
947
+ * The full path to where the file was (or will be) written to.
948
+ */
949
+ outputPath: string;
950
+ /**
951
+ * A set of all files that have been properly written. Plugins should add any handled files to this list so future plugins don't write then again
952
+ */
953
+ processedFiles: Set<SerializedFile>;
954
+ }
955
+ export declare type AfterWriteFileEvent = BeforeWriteFileEvent;
956
+ export interface TranspileObj {
310
957
  file: BscFile;
958
+ /**
959
+ * The absolute path to where the file should be written during build. (i.e. somewhere inside the outDir)
960
+ */
311
961
  outputPath: string;
312
962
  }
313
- export interface OnGetSemanticTokensEvent {
963
+ export interface BeforeFileDisposeEvent {
314
964
  program: Program;
315
965
  file: BscFile;
316
- scopes: Scope[];
317
- semanticTokens: SemanticToken[];
966
+ }
967
+ export declare type AfterFileDisposeEvent = BeforeFileDisposeEvent;
968
+ export interface BeforeRemoveProgramEvent {
969
+ program: Program;
970
+ }
971
+ export interface RemoveProgramEvent {
972
+ program: Program;
973
+ }
974
+ export interface AfterRemoveProgramEvent {
975
+ program: Program;
318
976
  }
319
977
  export interface SemanticToken {
320
978
  range: Range;
@@ -325,16 +983,220 @@ export interface SemanticToken {
325
983
  tokenModifiers?: SemanticTokenModifiers[];
326
984
  }
327
985
  export interface TypedefProvider {
328
- getTypedef(state: TranspileState): Array<SourceNode | string>;
986
+ getTypedef(state: TranspileState): TranspileResult;
329
987
  }
330
- export declare type TranspileResult = Array<(string | SourceNode)>;
988
+ export declare type TranspileResult = Array<(string | SourceNode | TranspileResult)>;
331
989
  /**
332
- * @param srcPath The absolute path to the source file on disk
990
+ * This is the type that the SourceNode class is declared as taking in its constructor.
991
+ * The actual type that SourceNode accepts is the more permissive TranspileResult, but
992
+ * we need to use this declared type for some type casts.
333
993
  */
334
- export declare type FileResolver = (srcPath: string) => string | undefined | Thenable<string | undefined> | void;
994
+ export declare type FlattenedTranspileResult = Array<string | SourceNode>;
995
+ export declare type FileResolver = (srcPath: string) => string | Buffer | undefined | Thenable<string | Buffer | undefined> | void;
335
996
  export interface ExpressionInfo {
336
997
  expressions: Expression[];
337
998
  varExpressions: Expression[];
338
999
  uniqueVarNames: string[];
339
1000
  }
340
1001
  export declare type DiagnosticCode = number | string;
1002
+ export interface FileLink<T> {
1003
+ item: T;
1004
+ file: BrsFile;
1005
+ }
1006
+ export interface ExtraSymbolData {
1007
+ /**
1008
+ * What AST node defined this symbol?
1009
+ */
1010
+ definingNode?: AstNode;
1011
+ /**
1012
+ * Description of this symbol
1013
+ */
1014
+ description?: string;
1015
+ /**
1016
+ * the higher the number, the lower the priority
1017
+ */
1018
+ completionPriority?: number;
1019
+ /**
1020
+ * Flags for this symbol
1021
+ */
1022
+ flags?: SymbolTypeFlag;
1023
+ /**
1024
+ * this symbol comes from an ancestor symbol table
1025
+ */
1026
+ memberOfAncestor?: boolean;
1027
+ /**
1028
+ * Do not merge this symbol when merging symbol tables
1029
+ */
1030
+ doNotMerge?: boolean;
1031
+ /**
1032
+ * is this symbol an alias?
1033
+ */
1034
+ isAlias?: boolean;
1035
+ /**
1036
+ * Is this symbol an instance of the type.
1037
+ *
1038
+ * `true` means `true`, and `false` or `undefined` means `false`,
1039
+ *
1040
+ * so check for `=== true` or `!== true`
1041
+ */
1042
+ isInstance?: boolean;
1043
+ /**
1044
+ * Is this type as defined in a doc comment?
1045
+ */
1046
+ isFromDocComment?: boolean;
1047
+ /**
1048
+ * Is this symbol built in to Brightscript?
1049
+ */
1050
+ isBuiltIn?: boolean;
1051
+ /**
1052
+ * Was this a result of a callfunc?
1053
+ */
1054
+ isFromCallFunc?: boolean;
1055
+ /**
1056
+ * Is this type created from a type statement - eg. is it a nickname for another type?
1057
+ */
1058
+ isFromTypeStatement?: boolean;
1059
+ }
1060
+ export interface GetTypeOptions {
1061
+ flags: SymbolTypeFlag;
1062
+ typeChain?: TypeChainEntry[];
1063
+ data?: ExtraSymbolData;
1064
+ /**
1065
+ * get the type of this expression, NOT its return type
1066
+ */
1067
+ ignoreCall?: boolean;
1068
+ onlyCacheResolvedTypes?: boolean;
1069
+ ignoreCacheForRetrieval?: boolean;
1070
+ isExistenceTest?: boolean;
1071
+ preferDocType?: boolean;
1072
+ /**
1073
+ * For narrowing the type, which statement are we concerned with in the current block?
1074
+ */
1075
+ statementIndex?: number | 'end';
1076
+ ignoreParentTables?: boolean;
1077
+ /**
1078
+ * If this is true, AA's, objects, nodes, etc, do not return dynamic if no member is found
1079
+ */
1080
+ ignoreDefaultDynamicMembers?: boolean;
1081
+ }
1082
+ export declare class TypeChainEntry {
1083
+ constructor(options: {
1084
+ name: string;
1085
+ type: BscType;
1086
+ data: ExtraSymbolData;
1087
+ location?: Location;
1088
+ separatorToken?: Token;
1089
+ astNode: AstNode;
1090
+ });
1091
+ get location(): Location;
1092
+ readonly name: string;
1093
+ readonly type: BscType;
1094
+ readonly data: ExtraSymbolData;
1095
+ private readonly _location;
1096
+ readonly separatorToken: Token;
1097
+ isResolved: boolean;
1098
+ astNode: AstNode;
1099
+ }
1100
+ export interface TypeChainProcessResult {
1101
+ /**
1102
+ * The name of the last item in the chain, OR the first unresolved item in the chain
1103
+ */
1104
+ itemName: string;
1105
+ /**
1106
+ * The TypeKind of the item of `itemName`
1107
+ */
1108
+ itemTypeKind: BscTypeKind | string;
1109
+ /**
1110
+ * The name of the parent of the item of `itemName`
1111
+ */
1112
+ itemParentTypeName: string;
1113
+ /**
1114
+ * The TypeKind of the parent of the item of `itemName`
1115
+ */
1116
+ itemParentTypeKind: BscTypeKind | string;
1117
+ /**
1118
+ * The complete chain leading up to the item of `itemName`
1119
+ */
1120
+ fullNameOfItem: string;
1121
+ /**
1122
+ * The complete chain (even including unresolved items)
1123
+ */
1124
+ fullChainName: string;
1125
+ /**
1126
+ * the range of the first unresolved item
1127
+ */
1128
+ location: Location;
1129
+ /**
1130
+ * Does the chain contain a dynamic type?
1131
+ */
1132
+ containsDynamic: boolean;
1133
+ /**
1134
+ * The AstNode of the item
1135
+ */
1136
+ astNode: AstNode;
1137
+ /**
1138
+ * Does the chain contain a type that crossed a callFunc boundary?
1139
+ */
1140
+ crossedCallFunc: boolean;
1141
+ }
1142
+ export interface TypeCircularReferenceInfo {
1143
+ isCircularReference: boolean;
1144
+ referenceChainNames?: string[];
1145
+ }
1146
+ export interface TypeCompatibilityData {
1147
+ missingFields?: {
1148
+ name: string;
1149
+ expectedType: BscType;
1150
+ }[];
1151
+ fieldMismatches?: {
1152
+ name: string;
1153
+ expectedType: BscType;
1154
+ actualType: BscType;
1155
+ }[];
1156
+ parameterMismatches?: {
1157
+ index: number;
1158
+ expectedOptional?: boolean;
1159
+ actualOptional?: boolean;
1160
+ data: TypeCompatibilityData;
1161
+ }[];
1162
+ returnTypeMismatch?: TypeCompatibilityData;
1163
+ expectedParamCount?: number;
1164
+ actualParamCount?: number;
1165
+ expectedVariadic?: boolean;
1166
+ actualVariadic?: boolean;
1167
+ depth?: number;
1168
+ actualType?: BscType;
1169
+ expectedType?: BscType;
1170
+ allowNameEquality?: boolean;
1171
+ unresolveableTarget?: string;
1172
+ }
1173
+ /**
1174
+ * Use Writable<T> to remove readonly flag from properties in T
1175
+ * Be careful!
1176
+ */
1177
+ export declare type Writeable<T> = {
1178
+ -readonly [P in keyof T]: T[P];
1179
+ };
1180
+ export declare type DeepWriteable<T> = {
1181
+ -readonly [P in keyof T]: DeepWriteable<T[P]>;
1182
+ };
1183
+ export declare type DisposableLike = Disposable | (() => any);
1184
+ export declare type MaybePromise<T> = T | Promise<T>;
1185
+ export interface FileChange {
1186
+ /**
1187
+ * Absolute path to the source file
1188
+ */
1189
+ srcPath: string;
1190
+ /**
1191
+ * What type of change was this.
1192
+ */
1193
+ type: FileChangeType;
1194
+ /**
1195
+ * If provided, this is the new contents of the file. If not provided, the file will be read from disk
1196
+ */
1197
+ fileContents?: string;
1198
+ /**
1199
+ * If true, this file change can have a project created exclusively for it, it no other projects handled it
1200
+ */
1201
+ allowStandaloneProject?: boolean;
1202
+ }