brighterscript 0.66.0-alpha.9 → 0.67.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (472) hide show
  1. package/CHANGELOG.md +116 -73
  2. package/README.md +14 -418
  3. package/dist/BsConfig.d.ts +25 -2
  4. package/dist/Cache.js +3 -3
  5. package/dist/Cache.js.map +1 -1
  6. package/dist/CodeActionUtil.d.ts +3 -3
  7. package/dist/CodeActionUtil.js.map +1 -1
  8. package/dist/CommentFlagProcessor.d.ts +3 -4
  9. package/dist/CommentFlagProcessor.js +4 -3
  10. package/dist/CommentFlagProcessor.js.map +1 -1
  11. package/dist/DependencyGraph.js +8 -8
  12. package/dist/DependencyGraph.js.map +1 -1
  13. package/dist/DiagnosticFilterer.d.ts +8 -4
  14. package/dist/DiagnosticFilterer.js +71 -38
  15. package/dist/DiagnosticFilterer.js.map +1 -1
  16. package/dist/DiagnosticMessages.d.ts +15 -36
  17. package/dist/DiagnosticMessages.js +15 -61
  18. package/dist/DiagnosticMessages.js.map +1 -1
  19. package/dist/DiagnosticSeverityAdjuster.js +3 -0
  20. package/dist/DiagnosticSeverityAdjuster.js.map +1 -1
  21. package/dist/FunctionScope.d.ts +2 -3
  22. package/dist/FunctionScope.js +0 -3
  23. package/dist/FunctionScope.js.map +1 -1
  24. package/dist/LanguageServer.d.ts +1 -2
  25. package/dist/LanguageServer.js +29 -35
  26. package/dist/LanguageServer.js.map +1 -1
  27. package/dist/Logger.d.ts +5 -9
  28. package/dist/Logger.js +18 -22
  29. package/dist/Logger.js.map +1 -1
  30. package/dist/PluginInterface.d.ts +13 -15
  31. package/dist/PluginInterface.js +16 -70
  32. package/dist/PluginInterface.js.map +1 -1
  33. package/dist/Program.d.ts +105 -138
  34. package/dist/Program.js +479 -702
  35. package/dist/Program.js.map +1 -1
  36. package/dist/ProgramBuilder.d.ts +8 -19
  37. package/dist/ProgramBuilder.js +82 -87
  38. package/dist/ProgramBuilder.js.map +1 -1
  39. package/dist/Scope.d.ts +56 -46
  40. package/dist/Scope.js +281 -217
  41. package/dist/Scope.js.map +1 -1
  42. package/dist/Stopwatch.js +1 -1
  43. package/dist/Stopwatch.js.map +1 -1
  44. package/dist/SymbolTable.d.ts +12 -68
  45. package/dist/SymbolTable.js +28 -213
  46. package/dist/SymbolTable.js.map +1 -1
  47. package/dist/XmlScope.d.ts +5 -7
  48. package/dist/XmlScope.js +36 -76
  49. package/dist/XmlScope.js.map +1 -1
  50. package/dist/astUtils/{Editor.d.ts → AstEditor.d.ts} +1 -6
  51. package/dist/astUtils/{Editor.js → AstEditor.js} +3 -9
  52. package/dist/astUtils/AstEditor.js.map +1 -0
  53. package/dist/astUtils/{Editor.spec.js → AstEditor.spec.js} +6 -10
  54. package/dist/astUtils/AstEditor.spec.js.map +1 -0
  55. package/dist/astUtils/creators.d.ts +8 -19
  56. package/dist/astUtils/creators.js +22 -54
  57. package/dist/astUtils/creators.js.map +1 -1
  58. package/dist/astUtils/creators.spec.js +0 -10
  59. package/dist/astUtils/creators.spec.js.map +1 -1
  60. package/dist/astUtils/reflection.d.ts +45 -81
  61. package/dist/astUtils/reflection.js +157 -220
  62. package/dist/astUtils/reflection.js.map +1 -1
  63. package/dist/astUtils/reflection.spec.js +19 -96
  64. package/dist/astUtils/reflection.spec.js.map +1 -1
  65. package/dist/astUtils/stackedVisitor.spec.js.map +1 -1
  66. package/dist/astUtils/visitors.d.ts +14 -18
  67. package/dist/astUtils/visitors.js +9 -22
  68. package/dist/astUtils/visitors.js.map +1 -1
  69. package/dist/astUtils/visitors.spec.js +9 -62
  70. package/dist/astUtils/visitors.spec.js.map +1 -1
  71. package/dist/astUtils/xml.d.ts +9 -9
  72. package/dist/astUtils/xml.js +6 -6
  73. package/dist/astUtils/xml.js.map +1 -1
  74. package/dist/bscPlugin/BscPlugin.d.ts +8 -11
  75. package/dist/bscPlugin/BscPlugin.js +21 -29
  76. package/dist/bscPlugin/BscPlugin.js.map +1 -1
  77. package/dist/bscPlugin/CallExpressionInfo.d.ts +6 -5
  78. package/dist/bscPlugin/CallExpressionInfo.js +2 -2
  79. package/dist/bscPlugin/CallExpressionInfo.js.map +1 -1
  80. package/dist/bscPlugin/codeActions/CodeActionsProcessor.js +11 -11
  81. package/dist/bscPlugin/codeActions/CodeActionsProcessor.js.map +1 -1
  82. package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js +4 -4
  83. package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js.map +1 -1
  84. package/dist/bscPlugin/completions/CompletionsProcessor.d.ts +1 -49
  85. package/dist/bscPlugin/completions/CompletionsProcessor.js +23 -424
  86. package/dist/bscPlugin/completions/CompletionsProcessor.js.map +1 -1
  87. package/dist/bscPlugin/definition/DefinitionProvider.d.ts +13 -0
  88. package/dist/bscPlugin/definition/DefinitionProvider.js +200 -0
  89. package/dist/bscPlugin/definition/DefinitionProvider.js.map +1 -0
  90. package/dist/bscPlugin/definition/DefinitionProvider.spec.js +87 -0
  91. package/dist/bscPlugin/definition/DefinitionProvider.spec.js.map +1 -0
  92. package/dist/bscPlugin/hover/HoverProcessor.d.ts +3 -7
  93. package/dist/bscPlugin/hover/HoverProcessor.js +88 -128
  94. package/dist/bscPlugin/hover/HoverProcessor.js.map +1 -1
  95. package/dist/bscPlugin/hover/HoverProcessor.spec.js +24 -336
  96. package/dist/bscPlugin/hover/HoverProcessor.spec.js.map +1 -1
  97. package/dist/bscPlugin/references/ReferencesProvider.d.ts +12 -0
  98. package/dist/bscPlugin/references/ReferencesProvider.js +56 -0
  99. package/dist/bscPlugin/references/ReferencesProvider.js.map +1 -0
  100. package/dist/bscPlugin/references/ReferencesProvider.spec.js +51 -0
  101. package/dist/bscPlugin/references/ReferencesProvider.spec.js.map +1 -0
  102. package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.d.ts +0 -1
  103. package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.js +5 -49
  104. package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.js.map +1 -1
  105. package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.spec.js +0 -22
  106. package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.spec.js.map +1 -1
  107. package/dist/bscPlugin/symbols/DocumentSymbolProcessor.d.ts +7 -0
  108. package/dist/bscPlugin/symbols/DocumentSymbolProcessor.js +22 -0
  109. package/dist/bscPlugin/symbols/DocumentSymbolProcessor.js.map +1 -0
  110. package/dist/bscPlugin/symbols/DocumentSymbolProcessor.spec.js +290 -0
  111. package/dist/bscPlugin/symbols/DocumentSymbolProcessor.spec.js.map +1 -0
  112. package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.d.ts +7 -0
  113. package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.js +26 -0
  114. package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.js.map +1 -0
  115. package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.spec.js +245 -0
  116. package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.spec.js.map +1 -0
  117. package/dist/bscPlugin/symbols/symbolUtils.d.ts +5 -0
  118. package/dist/bscPlugin/symbols/symbolUtils.js +140 -0
  119. package/dist/bscPlugin/symbols/symbolUtils.js.map +1 -0
  120. package/dist/bscPlugin/transpile/{BrsFileTranspileProcessor.d.ts → BrsFilePreTranspileProcessor.d.ts} +2 -4
  121. package/dist/bscPlugin/transpile/{BrsFileTranspileProcessor.js → BrsFilePreTranspileProcessor.js} +15 -36
  122. package/dist/bscPlugin/transpile/BrsFilePreTranspileProcessor.js.map +1 -0
  123. package/dist/bscPlugin/transpile/BrsFilePreTranspileProcessor.spec.js +46 -0
  124. package/dist/bscPlugin/transpile/BrsFilePreTranspileProcessor.spec.js.map +1 -0
  125. package/dist/bscPlugin/validation/BrsFileValidator.d.ts +1 -0
  126. package/dist/bscPlugin/validation/BrsFileValidator.js +30 -41
  127. package/dist/bscPlugin/validation/BrsFileValidator.js.map +1 -1
  128. package/dist/bscPlugin/validation/BrsFileValidator.spec.js +2 -2
  129. package/dist/bscPlugin/validation/BrsFileValidator.spec.js.map +1 -1
  130. package/dist/bscPlugin/validation/ProgramValidator.d.ts +3 -3
  131. package/dist/bscPlugin/validation/ProgramValidator.js +6 -6
  132. package/dist/bscPlugin/validation/ProgramValidator.js.map +1 -1
  133. package/dist/bscPlugin/validation/ScopeValidator.d.ts +6 -28
  134. package/dist/bscPlugin/validation/ScopeValidator.js +166 -387
  135. package/dist/bscPlugin/validation/ScopeValidator.js.map +1 -1
  136. package/dist/bscPlugin/validation/XmlFileValidator.js +9 -9
  137. package/dist/bscPlugin/validation/XmlFileValidator.js.map +1 -1
  138. package/dist/diagnosticUtils.d.ts +2 -3
  139. package/dist/diagnosticUtils.js +5 -5
  140. package/dist/diagnosticUtils.js.map +1 -1
  141. package/dist/examples/plugins/removePrint.js +1 -1
  142. package/dist/examples/plugins/removePrint.js.map +1 -1
  143. package/dist/files/BrsFile.Class.spec.js +143 -114
  144. package/dist/files/BrsFile.Class.spec.js.map +1 -1
  145. package/dist/files/BrsFile.d.ts +61 -83
  146. package/dist/files/BrsFile.js +552 -607
  147. package/dist/files/BrsFile.js.map +1 -1
  148. package/dist/files/BrsFile.spec.js +1365 -1201
  149. package/dist/files/BrsFile.spec.js.map +1 -1
  150. package/dist/files/XmlFile.d.ts +28 -56
  151. package/dist/files/XmlFile.js +103 -89
  152. package/dist/files/XmlFile.js.map +1 -1
  153. package/dist/files/XmlFile.spec.js +179 -122
  154. package/dist/files/XmlFile.spec.js.map +1 -1
  155. package/dist/files/tests/imports.spec.js +19 -29
  156. package/dist/files/tests/imports.spec.js.map +1 -1
  157. package/dist/files/tests/optionalChaning.spec.js +14 -14
  158. package/dist/files/tests/optionalChaning.spec.js.map +1 -1
  159. package/dist/globalCallables.js +83 -88
  160. package/dist/globalCallables.js.map +1 -1
  161. package/dist/index.d.ts +1 -9
  162. package/dist/index.js +1 -9
  163. package/dist/index.js.map +1 -1
  164. package/dist/interfaces.d.ts +173 -423
  165. package/dist/interfaces.js +0 -24
  166. package/dist/interfaces.js.map +1 -1
  167. package/dist/lexer/Lexer.d.ts +9 -15
  168. package/dist/lexer/Lexer.js +35 -46
  169. package/dist/lexer/Lexer.js.map +1 -1
  170. package/dist/lexer/Lexer.spec.js +48 -40
  171. package/dist/lexer/Lexer.spec.js.map +1 -1
  172. package/dist/lexer/Token.d.ts +1 -5
  173. package/dist/lexer/Token.js +1 -1
  174. package/dist/lexer/Token.js.map +1 -1
  175. package/dist/lexer/TokenKind.d.ts +0 -6
  176. package/dist/lexer/TokenKind.js +2 -14
  177. package/dist/lexer/TokenKind.js.map +1 -1
  178. package/dist/logging.d.ts +9 -0
  179. package/dist/logging.js +16 -0
  180. package/dist/logging.js.map +1 -0
  181. package/dist/parser/AstNode.d.ts +6 -90
  182. package/dist/parser/AstNode.js +5 -96
  183. package/dist/parser/AstNode.js.map +1 -1
  184. package/dist/parser/AstNode.spec.js.map +1 -1
  185. package/dist/parser/BrsTranspileState.d.ts +3 -4
  186. package/dist/parser/BrsTranspileState.js +2 -3
  187. package/dist/parser/BrsTranspileState.js.map +1 -1
  188. package/dist/parser/Expression.d.ts +114 -137
  189. package/dist/parser/Expression.js +244 -373
  190. package/dist/parser/Expression.js.map +1 -1
  191. package/dist/parser/Parser.Class.spec.js +19 -46
  192. package/dist/parser/Parser.Class.spec.js.map +1 -1
  193. package/dist/parser/Parser.d.ts +18 -14
  194. package/dist/parser/Parser.js +196 -175
  195. package/dist/parser/Parser.js.map +1 -1
  196. package/dist/parser/Parser.spec.d.ts +0 -2
  197. package/dist/parser/Parser.spec.js +10 -674
  198. package/dist/parser/Parser.spec.js.map +1 -1
  199. package/dist/parser/SGParser.d.ts +6 -44
  200. package/dist/parser/SGParser.js +198 -194
  201. package/dist/parser/SGParser.js.map +1 -1
  202. package/dist/parser/SGParser.spec.js +11 -14
  203. package/dist/parser/SGParser.spec.js.map +1 -1
  204. package/dist/parser/SGTypes.d.ts +52 -280
  205. package/dist/parser/SGTypes.js +185 -562
  206. package/dist/parser/SGTypes.js.map +1 -1
  207. package/dist/parser/Statement.d.ts +140 -172
  208. package/dist/parser/Statement.js +201 -337
  209. package/dist/parser/Statement.js.map +1 -1
  210. package/dist/parser/Statement.spec.js.map +1 -1
  211. package/dist/parser/TranspileState.d.ts +3 -2
  212. package/dist/parser/TranspileState.js +8 -10
  213. package/dist/parser/TranspileState.js.map +1 -1
  214. package/dist/parser/tests/Parser.spec.js +3 -5
  215. package/dist/parser/tests/Parser.spec.js.map +1 -1
  216. package/dist/parser/tests/controlFlow/For.spec.js +8 -16
  217. package/dist/parser/tests/controlFlow/For.spec.js.map +1 -1
  218. package/dist/parser/tests/controlFlow/ForEach.spec.js +6 -12
  219. package/dist/parser/tests/controlFlow/ForEach.spec.js.map +1 -1
  220. package/dist/parser/tests/controlFlow/While.spec.js +4 -8
  221. package/dist/parser/tests/controlFlow/While.spec.js.map +1 -1
  222. package/dist/parser/tests/expression/Call.spec.js +4 -4
  223. package/dist/parser/tests/expression/Call.spec.js.map +1 -1
  224. package/dist/parser/tests/expression/Indexing.spec.js +25 -0
  225. package/dist/parser/tests/expression/Indexing.spec.js.map +1 -1
  226. package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js +73 -29
  227. package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js.map +1 -1
  228. package/dist/parser/tests/expression/RegexLiteralExpression.spec.js +10 -10
  229. package/dist/parser/tests/expression/RegexLiteralExpression.spec.js.map +1 -1
  230. package/dist/parser/tests/expression/SourceLiteralExpression.spec.js +24 -24
  231. package/dist/parser/tests/expression/SourceLiteralExpression.spec.js.map +1 -1
  232. package/dist/parser/tests/expression/TemplateStringExpression.spec.js +47 -35
  233. package/dist/parser/tests/expression/TemplateStringExpression.spec.js.map +1 -1
  234. package/dist/parser/tests/expression/TernaryExpression.spec.js +83 -36
  235. package/dist/parser/tests/expression/TernaryExpression.spec.js.map +1 -1
  236. package/dist/parser/tests/expression/UnaryExpression.spec.js +2 -2
  237. package/dist/parser/tests/expression/UnaryExpression.spec.js.map +1 -1
  238. package/dist/parser/tests/statement/ConstStatement.spec.js +26 -27
  239. package/dist/parser/tests/statement/ConstStatement.spec.js.map +1 -1
  240. package/dist/parser/tests/statement/Continue.spec.js +2 -2
  241. package/dist/parser/tests/statement/Continue.spec.js.map +1 -1
  242. package/dist/parser/tests/statement/Dim.spec.js.map +1 -1
  243. package/dist/parser/tests/statement/Enum.spec.js +393 -90
  244. package/dist/parser/tests/statement/Enum.spec.js.map +1 -1
  245. package/dist/parser/tests/statement/For.spec.js +6 -6
  246. package/dist/parser/tests/statement/For.spec.js.map +1 -1
  247. package/dist/parser/tests/statement/ForEach.spec.js +4 -4
  248. package/dist/parser/tests/statement/ForEach.spec.js.map +1 -1
  249. package/dist/parser/tests/statement/Function.spec.js +1 -1
  250. package/dist/parser/tests/statement/Function.spec.js.map +1 -1
  251. package/dist/parser/tests/statement/InterfaceStatement.spec.js +18 -18
  252. package/dist/parser/tests/statement/InterfaceStatement.spec.js.map +1 -1
  253. package/dist/parser/tests/statement/Misc.spec.js.map +1 -1
  254. package/dist/parser/tests/statement/PrintStatement.spec.js +13 -16
  255. package/dist/parser/tests/statement/PrintStatement.spec.js.map +1 -1
  256. package/dist/parser/tests/statement/ReturnStatement.spec.js +3 -5
  257. package/dist/parser/tests/statement/ReturnStatement.spec.js.map +1 -1
  258. package/dist/parser/tests/statement/Set.spec.js +13 -26
  259. package/dist/parser/tests/statement/Set.spec.js.map +1 -1
  260. package/dist/parser/tests/statement/Throw.spec.js.map +1 -1
  261. package/dist/parser/tests/statement/TryCatch.spec.js.map +1 -1
  262. package/dist/preprocessor/Chunk.js +1 -2
  263. package/dist/preprocessor/Chunk.js.map +1 -1
  264. package/dist/preprocessor/Preprocessor.d.ts +3 -4
  265. package/dist/preprocessor/Preprocessor.js +3 -3
  266. package/dist/preprocessor/Preprocessor.js.map +1 -1
  267. package/dist/preprocessor/PreprocessorParser.js +8 -1
  268. package/dist/preprocessor/PreprocessorParser.js.map +1 -1
  269. package/dist/roku-types/data.json +293 -243
  270. package/dist/roku-types/index.d.ts +38 -17
  271. package/dist/types/ArrayType.d.ts +4 -9
  272. package/dist/types/ArrayType.js +24 -72
  273. package/dist/types/ArrayType.js.map +1 -1
  274. package/dist/types/ArrayType.spec.js +10 -39
  275. package/dist/types/ArrayType.spec.js.map +1 -1
  276. package/dist/types/BooleanType.d.ts +4 -8
  277. package/dist/types/BooleanType.js +8 -19
  278. package/dist/types/BooleanType.js.map +1 -1
  279. package/dist/types/BooleanType.spec.js +3 -9
  280. package/dist/types/BooleanType.spec.js.map +1 -1
  281. package/dist/types/BscType.d.ts +2 -29
  282. package/dist/types/BscType.js +0 -113
  283. package/dist/types/BscType.js.map +1 -1
  284. package/dist/types/CustomType.d.ts +9 -0
  285. package/dist/types/CustomType.js +32 -0
  286. package/dist/types/CustomType.js.map +1 -0
  287. package/dist/types/DoubleType.d.ts +4 -8
  288. package/dist/types/DoubleType.js +20 -23
  289. package/dist/types/DoubleType.js.map +1 -1
  290. package/dist/types/DoubleType.spec.js +3 -11
  291. package/dist/types/DoubleType.spec.js.map +1 -1
  292. package/dist/types/DynamicType.d.ts +3 -9
  293. package/dist/types/DynamicType.js +2 -18
  294. package/dist/types/DynamicType.js.map +1 -1
  295. package/dist/types/DynamicType.spec.js +4 -15
  296. package/dist/types/DynamicType.spec.js.map +1 -1
  297. package/dist/types/FloatType.d.ts +4 -8
  298. package/dist/types/FloatType.js +20 -23
  299. package/dist/types/FloatType.js.map +1 -1
  300. package/dist/types/FloatType.spec.js +3 -3
  301. package/dist/types/FloatType.spec.js.map +1 -1
  302. package/dist/types/FunctionType.d.ts +20 -10
  303. package/dist/types/FunctionType.js +52 -27
  304. package/dist/types/FunctionType.js.map +1 -1
  305. package/dist/types/FunctionType.spec.js +23 -0
  306. package/dist/types/FunctionType.spec.js.map +1 -0
  307. package/dist/types/IntegerType.d.ts +4 -8
  308. package/dist/types/IntegerType.js +20 -23
  309. package/dist/types/IntegerType.js.map +1 -1
  310. package/dist/types/IntegerType.spec.js +3 -7
  311. package/dist/types/IntegerType.spec.js.map +1 -1
  312. package/dist/types/InterfaceType.d.ts +10 -12
  313. package/dist/types/InterfaceType.js +48 -23
  314. package/dist/types/InterfaceType.js.map +1 -1
  315. package/dist/types/InterfaceType.spec.js +45 -82
  316. package/dist/types/InterfaceType.spec.js.map +1 -1
  317. package/dist/types/InvalidType.d.ts +4 -7
  318. package/dist/types/InvalidType.js +8 -18
  319. package/dist/types/InvalidType.js.map +1 -1
  320. package/dist/types/InvalidType.spec.js +3 -7
  321. package/dist/types/InvalidType.spec.js.map +1 -1
  322. package/dist/types/LongIntegerType.d.ts +4 -8
  323. package/dist/types/LongIntegerType.js +20 -23
  324. package/dist/types/LongIntegerType.js.map +1 -1
  325. package/dist/types/LongIntegerType.spec.js +3 -9
  326. package/dist/types/LongIntegerType.spec.js.map +1 -1
  327. package/dist/types/ObjectType.d.ts +4 -8
  328. package/dist/types/ObjectType.js +7 -21
  329. package/dist/types/ObjectType.js.map +1 -1
  330. package/dist/types/ObjectType.spec.js +2 -2
  331. package/dist/types/ObjectType.spec.js.map +1 -1
  332. package/dist/types/StringType.d.ts +4 -11
  333. package/dist/types/StringType.js +8 -23
  334. package/dist/types/StringType.js.map +1 -1
  335. package/dist/types/StringType.spec.js +2 -2
  336. package/dist/types/StringType.spec.js.map +1 -1
  337. package/dist/types/UninitializedType.d.ts +3 -7
  338. package/dist/types/UninitializedType.js +3 -14
  339. package/dist/types/UninitializedType.js.map +1 -1
  340. package/dist/types/VoidType.d.ts +4 -8
  341. package/dist/types/VoidType.js +8 -18
  342. package/dist/types/VoidType.js.map +1 -1
  343. package/dist/types/VoidType.spec.js +2 -2
  344. package/dist/types/VoidType.spec.js.map +1 -1
  345. package/dist/util.d.ts +43 -104
  346. package/dist/util.js +243 -640
  347. package/dist/util.js.map +1 -1
  348. package/dist/validators/ClassValidator.d.ts +6 -1
  349. package/dist/validators/ClassValidator.js +61 -20
  350. package/dist/validators/ClassValidator.js.map +1 -1
  351. package/package.json +13 -11
  352. package/dist/ActionPipeline.d.ts +0 -10
  353. package/dist/ActionPipeline.js +0 -40
  354. package/dist/ActionPipeline.js.map +0 -1
  355. package/dist/AstValidationSegmenter.d.ts +0 -25
  356. package/dist/AstValidationSegmenter.js +0 -150
  357. package/dist/AstValidationSegmenter.js.map +0 -1
  358. package/dist/CacheVerifier.d.ts +0 -7
  359. package/dist/CacheVerifier.js +0 -20
  360. package/dist/CacheVerifier.js.map +0 -1
  361. package/dist/astUtils/Editor.js.map +0 -1
  362. package/dist/astUtils/Editor.spec.js.map +0 -1
  363. package/dist/bscPlugin/FileWriter.d.ts +0 -6
  364. package/dist/bscPlugin/FileWriter.js +0 -24
  365. package/dist/bscPlugin/FileWriter.js.map +0 -1
  366. package/dist/bscPlugin/completions/CompletionsProcessor.spec.js +0 -1658
  367. package/dist/bscPlugin/completions/CompletionsProcessor.spec.js.map +0 -1
  368. package/dist/bscPlugin/fileProviders/FileProvider.d.ts +0 -9
  369. package/dist/bscPlugin/fileProviders/FileProvider.js +0 -51
  370. package/dist/bscPlugin/fileProviders/FileProvider.js.map +0 -1
  371. package/dist/bscPlugin/serialize/BslibInjector.spec.js +0 -19
  372. package/dist/bscPlugin/serialize/BslibInjector.spec.js.map +0 -1
  373. package/dist/bscPlugin/serialize/BslibManager.d.ts +0 -9
  374. package/dist/bscPlugin/serialize/BslibManager.js +0 -40
  375. package/dist/bscPlugin/serialize/BslibManager.js.map +0 -1
  376. package/dist/bscPlugin/serialize/FileSerializer.d.ts +0 -9
  377. package/dist/bscPlugin/serialize/FileSerializer.js +0 -72
  378. package/dist/bscPlugin/serialize/FileSerializer.js.map +0 -1
  379. package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.js.map +0 -1
  380. package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.spec.js +0 -41
  381. package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.spec.js.map +0 -1
  382. package/dist/bscPlugin/transpile/XmlFilePreTranspileProcessor.d.ts +0 -11
  383. package/dist/bscPlugin/transpile/XmlFilePreTranspileProcessor.js +0 -53
  384. package/dist/bscPlugin/transpile/XmlFilePreTranspileProcessor.js.map +0 -1
  385. package/dist/bscPlugin/validation/ScopeValidator.spec.js +0 -2004
  386. package/dist/bscPlugin/validation/ScopeValidator.spec.js.map +0 -1
  387. package/dist/files/AssetFile.d.ts +0 -26
  388. package/dist/files/AssetFile.js +0 -26
  389. package/dist/files/AssetFile.js.map +0 -1
  390. package/dist/files/Factory.d.ts +0 -25
  391. package/dist/files/Factory.js +0 -22
  392. package/dist/files/Factory.js.map +0 -1
  393. package/dist/files/File.d.ts +0 -106
  394. package/dist/files/File.js +0 -16
  395. package/dist/files/File.js.map +0 -1
  396. package/dist/files/LazyFileData.d.ts +0 -20
  397. package/dist/files/LazyFileData.js +0 -54
  398. package/dist/files/LazyFileData.js.map +0 -1
  399. package/dist/files/LazyFileData.spec.js +0 -27
  400. package/dist/files/LazyFileData.spec.js.map +0 -1
  401. package/dist/parser/tests/expression/TypeExpression.spec.js +0 -127
  402. package/dist/parser/tests/expression/TypeExpression.spec.js.map +0 -1
  403. package/dist/types/AssociativeArrayType.d.ts +0 -11
  404. package/dist/types/AssociativeArrayType.js +0 -52
  405. package/dist/types/AssociativeArrayType.js.map +0 -1
  406. package/dist/types/BaseFunctionType.d.ts +0 -9
  407. package/dist/types/BaseFunctionType.js +0 -25
  408. package/dist/types/BaseFunctionType.js.map +0 -1
  409. package/dist/types/BscTypeKind.d.ts +0 -25
  410. package/dist/types/BscTypeKind.js +0 -30
  411. package/dist/types/BscTypeKind.js.map +0 -1
  412. package/dist/types/BuiltInInterfaceAdder.d.ts +0 -23
  413. package/dist/types/BuiltInInterfaceAdder.js +0 -160
  414. package/dist/types/BuiltInInterfaceAdder.js.map +0 -1
  415. package/dist/types/BuiltInInterfaceAdder.spec.d.ts +0 -1
  416. package/dist/types/BuiltInInterfaceAdder.spec.js +0 -116
  417. package/dist/types/BuiltInInterfaceAdder.spec.js.map +0 -1
  418. package/dist/types/ClassType.d.ts +0 -17
  419. package/dist/types/ClassType.js +0 -58
  420. package/dist/types/ClassType.js.map +0 -1
  421. package/dist/types/ClassType.spec.d.ts +0 -1
  422. package/dist/types/ClassType.spec.js +0 -77
  423. package/dist/types/ClassType.spec.js.map +0 -1
  424. package/dist/types/ComponentType.d.ts +0 -26
  425. package/dist/types/ComponentType.js +0 -83
  426. package/dist/types/ComponentType.js.map +0 -1
  427. package/dist/types/EnumType.d.ts +0 -40
  428. package/dist/types/EnumType.js +0 -81
  429. package/dist/types/EnumType.js.map +0 -1
  430. package/dist/types/EnumType.spec.d.ts +0 -1
  431. package/dist/types/EnumType.spec.js +0 -33
  432. package/dist/types/EnumType.spec.js.map +0 -1
  433. package/dist/types/InheritableType.d.ts +0 -28
  434. package/dist/types/InheritableType.js +0 -152
  435. package/dist/types/InheritableType.js.map +0 -1
  436. package/dist/types/NamespaceType.d.ts +0 -12
  437. package/dist/types/NamespaceType.js +0 -28
  438. package/dist/types/NamespaceType.js.map +0 -1
  439. package/dist/types/ReferenceType.d.ts +0 -63
  440. package/dist/types/ReferenceType.js +0 -423
  441. package/dist/types/ReferenceType.js.map +0 -1
  442. package/dist/types/ReferenceType.spec.d.ts +0 -1
  443. package/dist/types/ReferenceType.spec.js +0 -137
  444. package/dist/types/ReferenceType.spec.js.map +0 -1
  445. package/dist/types/TypedFunctionType.d.ts +0 -33
  446. package/dist/types/TypedFunctionType.js +0 -106
  447. package/dist/types/TypedFunctionType.js.map +0 -1
  448. package/dist/types/TypedFunctionType.spec.d.ts +0 -1
  449. package/dist/types/TypedFunctionType.spec.js +0 -122
  450. package/dist/types/TypedFunctionType.spec.js.map +0 -1
  451. package/dist/types/UnionType.d.ts +0 -20
  452. package/dist/types/UnionType.js +0 -123
  453. package/dist/types/UnionType.js.map +0 -1
  454. package/dist/types/UnionType.spec.d.ts +0 -1
  455. package/dist/types/UnionType.spec.js +0 -130
  456. package/dist/types/UnionType.spec.js.map +0 -1
  457. package/dist/types/helper.spec.d.ts +0 -1
  458. package/dist/types/helper.spec.js +0 -145
  459. package/dist/types/helper.spec.js.map +0 -1
  460. package/dist/types/helpers.d.ts +0 -24
  461. package/dist/types/helpers.js +0 -178
  462. package/dist/types/helpers.js.map +0 -1
  463. package/dist/types/index.d.ts +0 -22
  464. package/dist/types/index.js +0 -39
  465. package/dist/types/index.js.map +0 -1
  466. /package/dist/astUtils/{Editor.spec.d.ts → AstEditor.spec.d.ts} +0 -0
  467. /package/dist/bscPlugin/{completions/CompletionsProcessor.spec.d.ts → definition/DefinitionProvider.spec.d.ts} +0 -0
  468. /package/dist/bscPlugin/{serialize/BslibInjector.spec.d.ts → references/ReferencesProvider.spec.d.ts} +0 -0
  469. /package/dist/bscPlugin/{transpile/BrsFileTranspileProcessor.spec.d.ts → symbols/DocumentSymbolProcessor.spec.d.ts} +0 -0
  470. /package/dist/bscPlugin/{validation/ScopeValidator.spec.d.ts → symbols/WorkspaceSymbolProcessor.spec.d.ts} +0 -0
  471. /package/dist/{files/LazyFileData.spec.d.ts → bscPlugin/transpile/BrsFilePreTranspileProcessor.spec.d.ts} +0 -0
  472. /package/dist/{parser/tests/expression/TypeExpression.spec.d.ts → types/FunctionType.spec.d.ts} +0 -0
@@ -6,19 +6,18 @@ const ArrayType_1 = require("./types/ArrayType");
6
6
  const BooleanType_1 = require("./types/BooleanType");
7
7
  const DynamicType_1 = require("./types/DynamicType");
8
8
  const FloatType_1 = require("./types/FloatType");
9
- const TypedFunctionType_1 = require("./types/TypedFunctionType");
9
+ const FunctionType_1 = require("./types/FunctionType");
10
10
  const IntegerType_1 = require("./types/IntegerType");
11
11
  const ObjectType_1 = require("./types/ObjectType");
12
12
  const StringType_1 = require("./types/StringType");
13
13
  const VoidType_1 = require("./types/VoidType");
14
14
  const util_1 = require("./util");
15
- const UnionType_1 = require("./types/UnionType");
16
- exports.globalFile = new BrsFile_1.BrsFile({ srcPath: 'global', destPath: 'global', program: null });
15
+ exports.globalFile = new BrsFile_1.BrsFile('global', 'global', null);
17
16
  exports.globalFile.parse('');
18
17
  let mathFunctions = [{
19
18
  name: 'Abs',
20
19
  shortDescription: 'Returns the absolute value of the argument.',
21
- type: new TypedFunctionType_1.TypedFunctionType(new FloatType_1.FloatType()),
20
+ type: new FunctionType_1.FunctionType(new FloatType_1.FloatType()),
22
21
  file: exports.globalFile,
23
22
  params: [{
24
23
  name: 'x',
@@ -29,7 +28,7 @@ let mathFunctions = [{
29
28
  name: 'Atn',
30
29
  shortDescription: 'Returns the arctangent (in radians) of the argument.',
31
30
  documentation: '`ATN(X)` returns "the angle whose tangent is X". To get arctangent in degrees, multiply `ATN(X)` by `57.29578`.',
32
- type: new TypedFunctionType_1.TypedFunctionType(new FloatType_1.FloatType()),
31
+ type: new FunctionType_1.FunctionType(new FloatType_1.FloatType()),
33
32
  file: exports.globalFile,
34
33
  params: [{
35
34
  name: 'x',
@@ -39,7 +38,7 @@ let mathFunctions = [{
39
38
  }, {
40
39
  name: 'Cdbl',
41
40
  shortDescription: 'Returns a single precision float representation of the argument. Someday may return double.',
42
- type: new TypedFunctionType_1.TypedFunctionType(new FloatType_1.FloatType()),
41
+ type: new FunctionType_1.FunctionType(new FloatType_1.FloatType()),
43
42
  file: exports.globalFile,
44
43
  params: [{
45
44
  name: 'x',
@@ -49,7 +48,7 @@ let mathFunctions = [{
49
48
  }, {
50
49
  name: 'Cint',
51
50
  shortDescription: 'Returns an integer representation of the argument, rounding up from midpoints. CINT(2.1) returns 2; CINT(2.5) returns 3; CINT(-2.2) returns -2; CINT(-2.5) returns -2; CINT(-2.6) returns -3.',
52
- type: new TypedFunctionType_1.TypedFunctionType(new IntegerType_1.IntegerType()),
51
+ type: new FunctionType_1.FunctionType(new IntegerType_1.IntegerType()),
53
52
  file: exports.globalFile,
54
53
  params: [{
55
54
  name: 'x',
@@ -59,7 +58,7 @@ let mathFunctions = [{
59
58
  }, {
60
59
  name: 'Cos',
61
60
  shortDescription: 'Returns the cosine of the argument (argument must be in radians). To obtain the cosine of X when X is in degrees, use CGS(X*.01745329).',
62
- type: new TypedFunctionType_1.TypedFunctionType(new FloatType_1.FloatType()),
61
+ type: new FunctionType_1.FunctionType(new FloatType_1.FloatType()),
63
62
  file: exports.globalFile,
64
63
  params: [{
65
64
  name: 'x',
@@ -69,7 +68,7 @@ let mathFunctions = [{
69
68
  }, {
70
69
  name: 'Csng',
71
70
  shortDescription: 'Returns a single-precision float representation of the argument.',
72
- type: new TypedFunctionType_1.TypedFunctionType(new FloatType_1.FloatType()),
71
+ type: new FunctionType_1.FunctionType(new FloatType_1.FloatType()),
73
72
  file: exports.globalFile,
74
73
  params: [{
75
74
  name: 'x',
@@ -79,7 +78,7 @@ let mathFunctions = [{
79
78
  }, {
80
79
  name: 'Exp',
81
80
  shortDescription: 'Returns the "natural exponential" of X, that is, ex. This is the inverse of the LOG function, so X=EXP(LOG(X)).',
82
- type: new TypedFunctionType_1.TypedFunctionType(new FloatType_1.FloatType()),
81
+ type: new FunctionType_1.FunctionType(new FloatType_1.FloatType()),
83
82
  file: exports.globalFile,
84
83
  params: [{
85
84
  name: 'x',
@@ -89,7 +88,7 @@ let mathFunctions = [{
89
88
  }, {
90
89
  name: 'Fix',
91
90
  shortDescription: 'Returns a truncated representation of the argument. All digits to the right of the decimal point are simply chopped off, so the resultant value is an integer. For non-negative X, FIX(X)=lNT(X). For negative values of X, FIX(X)=INT(X)+1. For example, FIX(2.2) returns 2, and FIX(-2.2) returns -2.',
92
- type: new TypedFunctionType_1.TypedFunctionType(new IntegerType_1.IntegerType()),
91
+ type: new FunctionType_1.FunctionType(new IntegerType_1.IntegerType()),
93
92
  file: exports.globalFile,
94
93
  params: [{
95
94
  name: 'x',
@@ -99,7 +98,7 @@ let mathFunctions = [{
99
98
  }, {
100
99
  name: 'Int',
101
100
  shortDescription: 'Returns an integer representation of the argument, using the largest whole number that is not greater than the argument.. INT(2.5) returns 2; INT(-2.5) returns -3; and INT(1000101.23) returns 10000101.',
102
- type: new TypedFunctionType_1.TypedFunctionType(new IntegerType_1.IntegerType()),
101
+ type: new FunctionType_1.FunctionType(new IntegerType_1.IntegerType()),
103
102
  file: exports.globalFile,
104
103
  params: [{
105
104
  name: 'x',
@@ -109,7 +108,7 @@ let mathFunctions = [{
109
108
  }, {
110
109
  name: 'Log',
111
110
  shortDescription: 'Returns the natural logarithm of the argument, that is, loge(x) or ln(x). This is the inverse of the EXP function, so LOG(EXP(X)) = X. To find the logarithm of a number to another base b, use the formula logb(X) = loge(X) / loge(b). For example, LOG(32767) / LOG(2) returns the logarithm to base 2 of 32767.',
112
- type: new TypedFunctionType_1.TypedFunctionType(new FloatType_1.FloatType()),
111
+ type: new FunctionType_1.FunctionType(new FloatType_1.FloatType()),
113
112
  file: exports.globalFile,
114
113
  params: [{
115
114
  name: 'x',
@@ -119,7 +118,7 @@ let mathFunctions = [{
119
118
  }, {
120
119
  name: 'Rnd',
121
120
  shortDescription: 'Generates a pseudo-random number using the current pseudo-random "seed number" (generated internally and not accessible to user).returns an integer between 1 and integer inclusive . For example, RND(55) returns a pseudo-random integer greater than zero and less than 56.',
122
- type: new TypedFunctionType_1.TypedFunctionType(new IntegerType_1.IntegerType()),
121
+ type: new FunctionType_1.FunctionType(new IntegerType_1.IntegerType()),
123
122
  file: exports.globalFile,
124
123
  params: [{
125
124
  name: 'range',
@@ -129,7 +128,7 @@ let mathFunctions = [{
129
128
  }, {
130
129
  name: 'Rnd',
131
130
  shortDescription: 'Generates a pseudo-random number using the current pseudo-random "seed number" (generated internally and not accessible to user). Returns a float value between 0 and 1.',
132
- type: new TypedFunctionType_1.TypedFunctionType(new FloatType_1.FloatType()),
131
+ type: new FunctionType_1.FunctionType(new FloatType_1.FloatType()),
133
132
  file: exports.globalFile,
134
133
  params: [{
135
134
  name: '0',
@@ -139,7 +138,7 @@ let mathFunctions = [{
139
138
  }, {
140
139
  name: 'Sgn',
141
140
  shortDescription: 'The "sign" function: returns -1 for X negative, 0 for X zero, and +1 for X positive.',
142
- type: new TypedFunctionType_1.TypedFunctionType(new IntegerType_1.IntegerType()),
141
+ type: new FunctionType_1.FunctionType(new IntegerType_1.IntegerType()),
143
142
  file: exports.globalFile,
144
143
  params: [{
145
144
  name: 'x',
@@ -149,7 +148,7 @@ let mathFunctions = [{
149
148
  }, {
150
149
  name: 'Sgn',
151
150
  shortDescription: 'The "sign" function: returns -1 for X negative, 0 for X zero, and +1 for X positive.',
152
- type: new TypedFunctionType_1.TypedFunctionType(new IntegerType_1.IntegerType()),
151
+ type: new FunctionType_1.FunctionType(new IntegerType_1.IntegerType()),
153
152
  file: exports.globalFile,
154
153
  params: [{
155
154
  name: 'x',
@@ -159,7 +158,7 @@ let mathFunctions = [{
159
158
  }, {
160
159
  name: 'Sin',
161
160
  shortDescription: 'Returns the sine of the argument (argument must be in radians). To obtain the sine of X when X is in degrees, use SIN(X*.01745329).',
162
- type: new TypedFunctionType_1.TypedFunctionType(new FloatType_1.FloatType()),
161
+ type: new FunctionType_1.FunctionType(new FloatType_1.FloatType()),
163
162
  file: exports.globalFile,
164
163
  params: [{
165
164
  name: 'x',
@@ -169,7 +168,7 @@ let mathFunctions = [{
169
168
  }, {
170
169
  name: 'Sqr',
171
170
  shortDescription: 'Returns the square root of the argument. SQR(X) is the same as X ^ (1/2), only faster.',
172
- type: new TypedFunctionType_1.TypedFunctionType(new FloatType_1.FloatType()),
171
+ type: new FunctionType_1.FunctionType(new FloatType_1.FloatType()),
173
172
  file: exports.globalFile,
174
173
  params: [{
175
174
  name: 'x',
@@ -179,7 +178,7 @@ let mathFunctions = [{
179
178
  }, {
180
179
  name: 'Tan',
181
180
  shortDescription: 'Returns the tangent of the argument (argument must be in radians). To obtain the tangent of X when X is in degrees, use TAN(X*.01745329).',
182
- type: new TypedFunctionType_1.TypedFunctionType(new FloatType_1.FloatType()),
181
+ type: new FunctionType_1.FunctionType(new FloatType_1.FloatType()),
183
182
  file: exports.globalFile,
184
183
  params: [{
185
184
  name: 'x',
@@ -190,7 +189,7 @@ let mathFunctions = [{
190
189
  let runtimeFunctions = [{
191
190
  name: 'CreateObject',
192
191
  shortDescription: 'Creates a BrightScript Component of class classname specified. Return invalid if the object creation fails. Some Objects have optional parameters in their constructor that are passed after name.',
193
- type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
192
+ type: new FunctionType_1.FunctionType(new ObjectType_1.ObjectType()),
194
193
  file: exports.globalFile,
195
194
  params: [{
196
195
  name: 'name',
@@ -220,7 +219,7 @@ let runtimeFunctions = [{
220
219
  }, {
221
220
  name: 'Type',
222
221
  shortDescription: 'Returns the type of a variable and/or object. See the BrightScript Component specification for a list of types.',
223
- type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
222
+ type: new FunctionType_1.FunctionType(new ObjectType_1.ObjectType()),
224
223
  file: exports.globalFile,
225
224
  params: [{
226
225
  name: 'variable',
@@ -234,13 +233,13 @@ let runtimeFunctions = [{
234
233
  }, {
235
234
  name: 'GetGlobalAA',
236
235
  shortDescription: 'Each script has a global Associative Array. It can be fetched with this function. ',
237
- type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
236
+ type: new FunctionType_1.FunctionType(new ObjectType_1.ObjectType()),
238
237
  file: exports.globalFile,
239
238
  params: []
240
239
  }, {
241
240
  name: 'Box',
242
241
  shortDescription: 'Box() will return an object version of an intrinsic type, or pass through an object if given one.',
243
- type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
242
+ type: new FunctionType_1.FunctionType(new ObjectType_1.ObjectType()),
244
243
  file: exports.globalFile,
245
244
  params: [{
246
245
  name: 'x',
@@ -250,7 +249,7 @@ let runtimeFunctions = [{
250
249
  }, {
251
250
  name: 'Run',
252
251
  shortDescription: `The Run function can be used to compile and run a script dynamically.\nThe file specified by that path is compiled and run.\nArguments may be passed to the script's Main function, and that script may return a result value.'`,
253
- type: new TypedFunctionType_1.TypedFunctionType(new DynamicType_1.DynamicType()),
252
+ type: new FunctionType_1.FunctionType(new DynamicType_1.DynamicType()),
254
253
  file: exports.globalFile,
255
254
  params: [{
256
255
  name: 'filename',
@@ -265,7 +264,7 @@ let runtimeFunctions = [{
265
264
  }, {
266
265
  name: 'Run',
267
266
  shortDescription: `The Run function can be used to compile and run a script dynamically.\nAll files specified are compiled together, then run.\nArguments may be passed to the script's Main function, and that script may return a result value.'`,
268
- type: new TypedFunctionType_1.TypedFunctionType(new DynamicType_1.DynamicType()),
267
+ type: new FunctionType_1.FunctionType(new DynamicType_1.DynamicType()),
269
268
  file: exports.globalFile,
270
269
  params: [{
271
270
  name: 'filename',
@@ -280,7 +279,7 @@ let runtimeFunctions = [{
280
279
  }, {
281
280
  name: 'Eval',
282
281
  shortDescription: `Eval can be used to run a code snippet in the context of the current function. It performs a compile, and then the bytecode execution.\nIf a compilation error occurs, no bytecode execution is performed, and Eval returns an roList with one or more compile errors. Each list entry is an roAssociativeArray with ERRNO and ERRSTR keys describing the error.\nIf compilation succeeds, bytecode execution is performed and the integer runtime error code is returned. These are the same error codes as returned by GetLastRunRuntimeError().\nEval() can be usefully in two cases. The first is when you need to dynamically generate code at runtime.\nThe other is if you need to execute a statement that could result in a runtime error, but you don't want code execution to stop. '`,
283
- type: new TypedFunctionType_1.TypedFunctionType(new DynamicType_1.DynamicType()),
282
+ type: new FunctionType_1.FunctionType(new DynamicType_1.DynamicType()),
284
283
  file: exports.globalFile,
285
284
  isDeprecated: true,
286
285
  params: [{
@@ -291,13 +290,13 @@ let runtimeFunctions = [{
291
290
  }, {
292
291
  name: 'GetLastRunCompileError',
293
292
  shortDescription: 'Returns an roList of compile errors, or invalid if no errors. Each list entry is an roAssociativeArray with the keys: ERRNO, ERRSTR, FILESPEC, and LINENO.',
294
- type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
293
+ type: new FunctionType_1.FunctionType(new ObjectType_1.ObjectType()),
295
294
  file: exports.globalFile,
296
295
  params: []
297
296
  }, {
298
297
  name: 'GetLastRunRuntimeError',
299
298
  shortDescription: 'Returns an error code result after the last script Run().These are normal:\\,&hFF==ERR_OKAY\\n&hFC==ERR_NORMAL_END\\n&hE2==ERR_VALUE_RETURN',
300
- type: new TypedFunctionType_1.TypedFunctionType(new IntegerType_1.IntegerType()),
299
+ type: new FunctionType_1.FunctionType(new IntegerType_1.IntegerType()),
301
300
  file: exports.globalFile,
302
301
  params: []
303
302
  }];
@@ -305,7 +304,7 @@ let globalUtilityFunctions = [
305
304
  {
306
305
  name: 'Sleep',
307
306
  shortDescription: 'This function causes the script to pause for the specified time, without wasting CPU cycles. There are 1000 milliseconds in one second.',
308
- type: new TypedFunctionType_1.TypedFunctionType(new VoidType_1.VoidType()),
307
+ type: new FunctionType_1.FunctionType(new VoidType_1.VoidType()),
309
308
  file: exports.globalFile,
310
309
  params: [{
311
310
  name: 'milliseconds',
@@ -315,7 +314,7 @@ let globalUtilityFunctions = [
315
314
  }, {
316
315
  name: 'Wait',
317
316
  shortDescription: 'This function waits on objects that are "waitable" (those that have a MessagePort interface). Wait() returns the event object that was posted to the message port. If timeout is zero, "wait" will wait for ever. Otherwise, Wait will return after timeout milliseconds if no messages are received. In this case, Wait returns a type "invalid".',
318
- type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
317
+ type: new FunctionType_1.FunctionType(new ObjectType_1.ObjectType()),
319
318
  file: exports.globalFile,
320
319
  params: [{
321
320
  name: 'timeout',
@@ -329,7 +328,7 @@ let globalUtilityFunctions = [
329
328
  }, {
330
329
  name: 'GetInterface',
331
330
  shortDescription: 'Each BrightScript Component has one or more interfaces. This function returns a value of type "Interface". \nNote that generally BrightScript Components allow you to skip the interface specification. In which case, the appropriate interface within the object is used. This works as long as the function names within the interfaces are unique.',
332
- type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
331
+ type: new FunctionType_1.FunctionType(new ObjectType_1.ObjectType()),
333
332
  file: exports.globalFile,
334
333
  params: [{
335
334
  name: 'object',
@@ -343,7 +342,7 @@ let globalUtilityFunctions = [
343
342
  }, {
344
343
  name: 'FindMemberFunction',
345
344
  shortDescription: 'Returns the interface from the object that provides the specified function, or invalid if not found.',
346
- type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
345
+ type: new FunctionType_1.FunctionType(new ObjectType_1.ObjectType()),
347
346
  file: exports.globalFile,
348
347
  params: [{
349
348
  name: 'object',
@@ -357,7 +356,7 @@ let globalUtilityFunctions = [
357
356
  }, {
358
357
  name: 'UpTime',
359
358
  shortDescription: 'Returns the uptime of the system since the last reboot in seconds.',
360
- type: new TypedFunctionType_1.TypedFunctionType(new FloatType_1.FloatType()),
359
+ type: new FunctionType_1.FunctionType(new FloatType_1.FloatType()),
361
360
  file: exports.globalFile,
362
361
  params: [{
363
362
  name: 'dummy',
@@ -367,13 +366,13 @@ let globalUtilityFunctions = [
367
366
  }, {
368
367
  name: 'RebootSystem',
369
368
  shortDescription: 'Requests the system to perform a soft reboot. The Roku platform has disabled this feature.',
370
- type: new TypedFunctionType_1.TypedFunctionType(new VoidType_1.VoidType()),
369
+ type: new FunctionType_1.FunctionType(new VoidType_1.VoidType()),
371
370
  file: exports.globalFile,
372
371
  params: []
373
372
  }, {
374
373
  name: 'ListDir',
375
374
  shortDescription: 'Returns a List object containing the contents of the directory path specified.',
376
- type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
375
+ type: new FunctionType_1.FunctionType(new ObjectType_1.ObjectType()),
377
376
  file: exports.globalFile,
378
377
  params: [{
379
378
  name: 'path',
@@ -383,7 +382,7 @@ let globalUtilityFunctions = [
383
382
  }, {
384
383
  name: 'ReadAsciiFile',
385
384
  shortDescription: 'This function reads the specified file and returns the data as a string.\nThe file can be encoded as either UTF-8 (which includes the 7-bit ASCII subset) or UTF-16.\nAn empty string is returned if the file can not be read.',
386
- type: new TypedFunctionType_1.TypedFunctionType(new StringType_1.StringType()),
385
+ type: new FunctionType_1.FunctionType(new StringType_1.StringType()),
387
386
  file: exports.globalFile,
388
387
  params: [{
389
388
  name: 'filePath',
@@ -393,7 +392,7 @@ let globalUtilityFunctions = [
393
392
  }, {
394
393
  name: 'WriteAsciiFile',
395
394
  shortDescription: 'This function writes the specified string data to a file at the specified location.\nThe string data is written as UTF-8 encoded (which includes the 7-bit ASCII subset).\nThe function returns true if the file was successfully written.',
396
- type: new TypedFunctionType_1.TypedFunctionType(new BooleanType_1.BooleanType()),
395
+ type: new FunctionType_1.FunctionType(new BooleanType_1.BooleanType()),
397
396
  file: exports.globalFile,
398
397
  params: [{
399
398
  name: 'filePath',
@@ -407,7 +406,7 @@ let globalUtilityFunctions = [
407
406
  }, {
408
407
  name: 'CopyFile',
409
408
  shortDescription: 'Make a copy of a file.',
410
- type: new TypedFunctionType_1.TypedFunctionType(new BooleanType_1.BooleanType()),
409
+ type: new FunctionType_1.FunctionType(new BooleanType_1.BooleanType()),
411
410
  file: exports.globalFile,
412
411
  params: [{
413
412
  name: 'source',
@@ -421,7 +420,7 @@ let globalUtilityFunctions = [
421
420
  }, {
422
421
  name: 'MoveFile',
423
422
  shortDescription: 'Rename a file.',
424
- type: new TypedFunctionType_1.TypedFunctionType(new BooleanType_1.BooleanType()),
423
+ type: new FunctionType_1.FunctionType(new BooleanType_1.BooleanType()),
425
424
  file: exports.globalFile,
426
425
  params: [{
427
426
  name: 'source',
@@ -445,7 +444,7 @@ A '*' matches zero or more arbitrary characters.
445
444
  The character class '[...]' matches any single character specified within the brackets. The closing bracket is treated as a member of the character class if it immediately follows the opening bracket. i.e. '[]]' matches a single close bracket. Within the class '-' can be used to specify a range unless it is the first or last character. e.g. '[A-Cf-h]' is equivalent to '[ABCfgh]'.
446
445
  A character class can be negated by specifying '^' as the first character. To match a literal '^' place it elsewhere within the class.
447
446
  The characters '?', '*' and '[' lose their special meaning if preceded by a single '\\'. A single '\\' can be matched as '\\\\'.`,
448
- type: new TypedFunctionType_1.TypedFunctionType(new ArrayType_1.ArrayType(new StringType_1.StringType())),
447
+ type: new FunctionType_1.FunctionType(new ArrayType_1.ArrayType(new StringType_1.StringType())),
449
448
  file: exports.globalFile,
450
449
  params: [{
451
450
  name: 'path',
@@ -459,7 +458,7 @@ The characters '?', '*' and '[' lose their special meaning if preceded by a sing
459
458
  }, {
460
459
  name: 'DeleteFile',
461
460
  shortDescription: 'Delete the specified file.',
462
- type: new TypedFunctionType_1.TypedFunctionType(new BooleanType_1.BooleanType()),
461
+ type: new FunctionType_1.FunctionType(new BooleanType_1.BooleanType()),
463
462
  file: exports.globalFile,
464
463
  params: [{
465
464
  name: 'file',
@@ -469,7 +468,7 @@ The characters '?', '*' and '[' lose their special meaning if preceded by a sing
469
468
  }, {
470
469
  name: 'DeleteDirectory',
471
470
  shortDescription: 'Deletes the specified directory. It is only possible to delete an empty directory.',
472
- type: new TypedFunctionType_1.TypedFunctionType(new BooleanType_1.BooleanType()),
471
+ type: new FunctionType_1.FunctionType(new BooleanType_1.BooleanType()),
473
472
  file: exports.globalFile,
474
473
  params: [{
475
474
  name: 'dir',
@@ -479,7 +478,7 @@ The characters '?', '*' and '[' lose their special meaning if preceded by a sing
479
478
  }, {
480
479
  name: 'CreateDirectory',
481
480
  shortDescription: 'Creates the specified Directory. Only one directory can be created at a time',
482
- type: new TypedFunctionType_1.TypedFunctionType(new BooleanType_1.BooleanType()),
481
+ type: new FunctionType_1.FunctionType(new BooleanType_1.BooleanType()),
483
482
  file: exports.globalFile,
484
483
  params: [{
485
484
  name: 'dir',
@@ -489,7 +488,7 @@ The characters '?', '*' and '[' lose their special meaning if preceded by a sing
489
488
  }, {
490
489
  name: 'FormatDrive',
491
490
  shortDescription: 'Formats a specified drive using the specified filesystem.',
492
- type: new TypedFunctionType_1.TypedFunctionType(new BooleanType_1.BooleanType()),
491
+ type: new FunctionType_1.FunctionType(new BooleanType_1.BooleanType()),
493
492
  file: exports.globalFile,
494
493
  params: [{
495
494
  name: 'drive',
@@ -503,7 +502,7 @@ The characters '?', '*' and '[' lose their special meaning if preceded by a sing
503
502
  }, {
504
503
  name: 'StrToI',
505
504
  shortDescription: 'Return the integer value of the string, or 0 if nothing is parsed.',
506
- type: new TypedFunctionType_1.TypedFunctionType(new IntegerType_1.IntegerType()),
505
+ type: new FunctionType_1.FunctionType(new IntegerType_1.IntegerType()),
507
506
  file: exports.globalFile,
508
507
  params: [{
509
508
  name: 'str',
@@ -513,7 +512,7 @@ The characters '?', '*' and '[' lose their special meaning if preceded by a sing
513
512
  }, {
514
513
  name: 'RunGarbageCollector',
515
514
  shortDescription: `This function runs the garbage collector. It returns and Associative Array with some statistics regarding the garbage collection. \nSee the Garbage Collection section of the manual for more detail. You don't normally need to call this function.`,
516
- type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
515
+ type: new FunctionType_1.FunctionType(new ObjectType_1.ObjectType()),
517
516
  file: exports.globalFile,
518
517
  params: []
519
518
  }, {
@@ -523,7 +522,7 @@ The characters '?', '*' and '[' lose their special meaning if preceded by a sing
523
522
  Any roAssociativeArray objects in the returned objects will be case sensitive. As of Roku OS 9.4, to return a case-insensitive structure, set the flags parameter to "i".
524
523
  If the "i" option is used, and the jsonString includes multiple keys that match case-insensitively, duplicates are overwritten and only the last matching values are preserved.
525
524
  An error will be returned if arrays/associative arrays are nested more than 256 levels deep.`,
526
- type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
525
+ type: new FunctionType_1.FunctionType(new ObjectType_1.ObjectType()),
527
526
  file: exports.globalFile,
528
527
  params: [{
529
528
  name: 'jsonString',
@@ -546,7 +545,7 @@ An error will be returned if arrays/associative arrays are nested more than 256
546
545
  If an error occurs an empty string will be returned.
547
546
 
548
547
  Normally non-ASCII characters are escaped in the output string as "\\uXXXX" where XXXX is the hexadecimal representation of the Unicode character value. If flags=1, non-ASCII characters are not escaped.`,
549
- type: new TypedFunctionType_1.TypedFunctionType(new StringType_1.StringType()),
548
+ type: new FunctionType_1.FunctionType(new StringType_1.StringType()),
550
549
  file: exports.globalFile,
551
550
  params: [{
552
551
  name: 'object',
@@ -554,7 +553,7 @@ Normally non-ASCII characters are escaped in the output string as "\\uXXXX" wher
554
553
  isOptional: false
555
554
  }, {
556
555
  name: 'flags',
557
- type: new UnionType_1.UnionType([IntegerType_1.IntegerType.instance, StringType_1.StringType.instance]),
556
+ type: new StringType_1.StringType(),
558
557
  isOptional: true
559
558
  }]
560
559
  }, {
@@ -563,7 +562,7 @@ Normally non-ASCII characters are escaped in the output string as "\\uXXXX" wher
563
562
 
564
563
  In some cases you may want to include a placeholder marker in a localizable string that gets dynamically substituted with a value at runtime.
565
564
  One way to accomplish that is to use the Replace method on the string value returned from the Tr() lookup.`,
566
- type: new TypedFunctionType_1.TypedFunctionType(new StringType_1.StringType()),
565
+ type: new FunctionType_1.FunctionType(new StringType_1.StringType()),
567
566
  file: exports.globalFile,
568
567
  params: [{
569
568
  name: 'source',
@@ -576,7 +575,7 @@ let globalStringFunctions = [
576
575
  {
577
576
  name: 'UCase',
578
577
  shortDescription: 'Converts the string to all upper case.',
579
- type: new TypedFunctionType_1.TypedFunctionType(new StringType_1.StringType()),
578
+ type: new FunctionType_1.FunctionType(new StringType_1.StringType()),
580
579
  file: exports.globalFile,
581
580
  params: [{
582
581
  name: 's',
@@ -586,7 +585,7 @@ let globalStringFunctions = [
586
585
  }, {
587
586
  name: 'LCase',
588
587
  shortDescription: 'Converts the string to all lower case.',
589
- type: new TypedFunctionType_1.TypedFunctionType(new StringType_1.StringType()),
588
+ type: new FunctionType_1.FunctionType(new StringType_1.StringType()),
590
589
  file: exports.globalFile,
591
590
  params: [{
592
591
  name: 's',
@@ -596,7 +595,7 @@ let globalStringFunctions = [
596
595
  }, {
597
596
  name: 'Asc',
598
597
  shortDescription: 'Returns the Unicode ("ASCII") value for the first character of the specified string\n An empty string argument will return 0.',
599
- type: new TypedFunctionType_1.TypedFunctionType(new IntegerType_1.IntegerType()),
598
+ type: new FunctionType_1.FunctionType(new IntegerType_1.IntegerType()),
600
599
  file: exports.globalFile,
601
600
  params: [{
602
601
  name: 'letter',
@@ -612,7 +611,7 @@ let globalStringFunctions = [
612
611
  By using Chr, you can create strings containing characters which cannot be contained in quotes, such as newline or the quote character itself.
613
612
 
614
613
  print (Chr(34) + "hello" + Chr(34)) ' prints: "hello"`,
615
- type: new TypedFunctionType_1.TypedFunctionType(new StringType_1.StringType()),
614
+ type: new FunctionType_1.FunctionType(new StringType_1.StringType()),
616
615
  file: exports.globalFile,
617
616
  params: [{
618
617
  name: 'ch',
@@ -622,7 +621,7 @@ By using Chr, you can create strings containing characters which cannot be conta
622
621
  }, {
623
622
  name: 'Instr',
624
623
  shortDescription: 'Returns the position of the first instances of substring within text, starting at the specified start position.\nReturns 0 if the substring is not found. Unlike the ifString.Instr() method, the first position is 1.',
625
- type: new TypedFunctionType_1.TypedFunctionType(new IntegerType_1.IntegerType()),
624
+ type: new FunctionType_1.FunctionType(new IntegerType_1.IntegerType()),
626
625
  file: exports.globalFile,
627
626
  params: [{
628
627
  name: 'start',
@@ -640,7 +639,7 @@ By using Chr, you can create strings containing characters which cannot be conta
640
639
  }, {
641
640
  name: 'Left',
642
641
  shortDescription: 'Returns the first n characters of s. ',
643
- type: new TypedFunctionType_1.TypedFunctionType(new StringType_1.StringType()),
642
+ type: new FunctionType_1.FunctionType(new StringType_1.StringType()),
644
643
  file: exports.globalFile,
645
644
  params: [{
646
645
  name: 's',
@@ -654,7 +653,7 @@ By using Chr, you can create strings containing characters which cannot be conta
654
653
  }, {
655
654
  name: 'Len',
656
655
  shortDescription: 'Returns the number of characters in the specified string.',
657
- type: new TypedFunctionType_1.TypedFunctionType(new IntegerType_1.IntegerType()),
656
+ type: new FunctionType_1.FunctionType(new IntegerType_1.IntegerType()),
658
657
  file: exports.globalFile,
659
658
  params: [{
660
659
  name: 's',
@@ -664,7 +663,7 @@ By using Chr, you can create strings containing characters which cannot be conta
664
663
  }, {
665
664
  name: 'Mid',
666
665
  shortDescription: 'Returns a substring of s with length n and starting at position p.\nn may be omitted, in which case the string starting at p and ending at the end of the string is returned.\nUnlike the ifString.Mid() method, the first character in the string is position 1.',
667
- type: new TypedFunctionType_1.TypedFunctionType(new StringType_1.StringType()),
666
+ type: new FunctionType_1.FunctionType(new StringType_1.StringType()),
668
667
  file: exports.globalFile,
669
668
  params: [{
670
669
  name: 's',
@@ -683,7 +682,7 @@ By using Chr, you can create strings containing characters which cannot be conta
683
682
  }, {
684
683
  name: 'Right',
685
684
  shortDescription: 'Returns the last n characters of s.',
686
- type: new TypedFunctionType_1.TypedFunctionType(new StringType_1.StringType()),
685
+ type: new FunctionType_1.FunctionType(new StringType_1.StringType()),
687
686
  file: exports.globalFile,
688
687
  params: [{
689
688
  name: 's',
@@ -697,7 +696,7 @@ By using Chr, you can create strings containing characters which cannot be conta
697
696
  }, {
698
697
  name: 'Str',
699
698
  shortDescription: 'Converts a value to a string. Str(A), for example, returns a string equal to the decimal representation of the numeric value of A.\nNote: for non-negative numbers, a leading blank is inserted before the value string as a sign placeholder.',
700
- type: new TypedFunctionType_1.TypedFunctionType(new StringType_1.StringType()),
699
+ type: new FunctionType_1.FunctionType(new StringType_1.StringType()),
701
700
  file: exports.globalFile,
702
701
  params: [{
703
702
  name: 'value',
@@ -707,7 +706,7 @@ By using Chr, you can create strings containing characters which cannot be conta
707
706
  }, {
708
707
  name: 'StrI',
709
708
  shortDescription: 'Converts a value to a string. Str(A), for example, returns a string equal to the decimal representation of the numeric value of A.\nNote: for non-negative numbers, a leading blank is inserted before the value string as a sign placeholder.. If the radix parameter is provided, then converts the integer value into a string representation using the given radix.\nIf radix is not 2 .. 36 then an empty string is returned.\nNote that the returned string does not include a base prefix and uses lowercase letters to represent those digits in bases greater than 10.',
710
- type: new TypedFunctionType_1.TypedFunctionType(new StringType_1.StringType()),
709
+ type: new FunctionType_1.FunctionType(new StringType_1.StringType()),
711
710
  file: exports.globalFile,
712
711
  params: [{
713
712
  name: 'value',
@@ -721,7 +720,7 @@ By using Chr, you can create strings containing characters which cannot be conta
721
720
  }, {
722
721
  name: 'string',
723
722
  shortDescription: 'Returns a string composed of n copies of the second argument concatenated together.',
724
- type: new TypedFunctionType_1.TypedFunctionType(new StringType_1.StringType()),
723
+ type: new FunctionType_1.FunctionType(new StringType_1.StringType()),
725
724
  file: exports.globalFile,
726
725
  params: [{
727
726
  name: 'n',
@@ -735,7 +734,7 @@ By using Chr, you can create strings containing characters which cannot be conta
735
734
  }, {
736
735
  name: 'StringI',
737
736
  shortDescription: 'Returns a string composed of n copies of the character whose Unicode value is the second argument.',
738
- type: new TypedFunctionType_1.TypedFunctionType(new StringType_1.StringType()),
737
+ type: new FunctionType_1.FunctionType(new StringType_1.StringType()),
739
738
  file: exports.globalFile,
740
739
  params: [{
741
740
  name: 'n',
@@ -749,7 +748,7 @@ By using Chr, you can create strings containing characters which cannot be conta
749
748
  }, {
750
749
  name: 'Val',
751
750
  shortDescription: 'Performs the inverse of the STR function: returns the number represented by the characters in a string argument.\nFor example, if A$="12" and B$="34" then VAL(A$+ "."+B$) returns the number 12.34. If radix is provided as the second parameter, it returns the integer value from parsing the string with the specified radix.\nRadix should be 2 .. 36 or the special value 0 (which automatically identified hexadecimal or octal numbers based on 0x or 0 prefixes respectively).\nLeading whitespace is ignored then as much of the rest of the string will be parsed as valid.',
752
- type: new TypedFunctionType_1.TypedFunctionType(new IntegerType_1.IntegerType()),
751
+ type: new FunctionType_1.FunctionType(new IntegerType_1.IntegerType()),
753
752
  file: exports.globalFile,
754
753
  params: [{
755
754
  name: 'str',
@@ -763,7 +762,7 @@ By using Chr, you can create strings containing characters which cannot be conta
763
762
  }, {
764
763
  name: 'Substitute',
765
764
  shortDescription: 'Replaces all instances of {0} or ^0 in str with arg0. Similarly, replaces all instances of {1} or ^1 with arg1, {2} or ^2 with arg2, and {3} or ^3 with arg3.',
766
- type: new TypedFunctionType_1.TypedFunctionType(new StringType_1.StringType()),
765
+ type: new FunctionType_1.FunctionType(new StringType_1.StringType()),
767
766
  file: exports.globalFile,
768
767
  params: [{
769
768
  name: 'str',
@@ -792,7 +791,7 @@ let programStatementFunctions = [
792
791
  {
793
792
  name: 'Tab',
794
793
  shortDescription: 'Moves the cursor to the specified position on the current line (modulo the width of your console if you specify TAB positions greater than the console width). TAB may be used several times in a PRINT list. No punctuation is required after a TAB modifier. Numerical expressions may be used to specify a TAB position. TAB cannot be used to move the cursor to the left. If the cursor is beyond the specified position, the TAB is ignored.',
795
- type: new TypedFunctionType_1.TypedFunctionType(new VoidType_1.VoidType()),
794
+ type: new FunctionType_1.FunctionType(new VoidType_1.VoidType()),
796
795
  file: exports.globalFile,
797
796
  params: [{
798
797
  name: 'expression',
@@ -802,7 +801,7 @@ let programStatementFunctions = [
802
801
  }, {
803
802
  name: 'Pos',
804
803
  shortDescription: 'Returns a number from 0 to window width, indicating the current cursor position on the cursor. Requires a "dummy argument" (any numeric expression).',
805
- type: new TypedFunctionType_1.TypedFunctionType(new IntegerType_1.IntegerType()),
804
+ type: new FunctionType_1.FunctionType(new VoidType_1.VoidType()),
806
805
  file: exports.globalFile,
807
806
  params: [{
808
807
  name: 'x',
@@ -813,39 +812,32 @@ let programStatementFunctions = [
813
812
  }, {
814
813
  name: 'Roku_Ads',
815
814
  shortDescription: 'The main entry point for instantiating the ad interface. This object manages ad server requests, parses ad structure, schedules and renders ads, and triggers tracking beacons.\n\nThe Roku ad parser/renderer object returned has global scope because it is meant to represent interaction with external resources (the ad server and any tracking services) that have persistence and state independent of the ad rendering within a client application.',
816
- type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
817
- file: exports.globalFile,
818
- params: []
819
- //TODO this is a temporary fix for library imported files. Eventually this should be moved into `Roku_Event_Dispatcher.brs` and handled by the `Library` statement
820
- }, {
821
- name: 'Roku_Event_Dispatcher',
822
- shortDescription: 'Use the Roku Event Dispatcher in your channel\'s authentication workflow to send authentication events. See: https://developer.roku.com/docs/developer-program/discovery/search/prioritizing-authenticated-channels-in-roku-search.md',
823
- type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
815
+ type: new FunctionType_1.FunctionType(new ObjectType_1.ObjectType()),
824
816
  file: exports.globalFile,
825
817
  params: []
826
818
  }, {
827
819
  name: 'bslBrightScriptErrorCodes',
828
820
  shortDescription: 'Returns an roAssociativeArray with name value pairs of the error name and corresponding integer value, for example ERR_OKAY = &hFF.',
829
- type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
821
+ type: new FunctionType_1.FunctionType(new ObjectType_1.ObjectType()),
830
822
  file: exports.globalFile,
831
823
  params: []
832
824
  }, {
833
825
  name: 'bslGeneralConstants',
834
826
  shortDescription: 'Returns an roAssociativeArray with name value pairs of system constants, for example MAX_INT = 2147483647.',
835
- type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
827
+ type: new FunctionType_1.FunctionType(new ObjectType_1.ObjectType()),
836
828
  file: exports.globalFile,
837
829
  params: []
838
830
  }, {
839
831
  name: 'bslUniversalControlEventCodes',
840
832
  shortDescription: 'Returns an roAssociativeArray with name value pairs of the remote key code (buttons) constants, for example BUTTON_SELECT_PRESSED = 6.',
841
- type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
833
+ type: new FunctionType_1.FunctionType(new ObjectType_1.ObjectType()),
842
834
  file: exports.globalFile,
843
835
  params: []
844
836
  },
845
837
  {
846
838
  name: 'AsciiToHex',
847
839
  shortDescription: 'Returns the hex encoded string, for example AsciiToHex("Hi!") = "486921".',
848
- type: new TypedFunctionType_1.TypedFunctionType(new StringType_1.StringType()),
840
+ type: new FunctionType_1.FunctionType(new StringType_1.StringType()),
849
841
  file: exports.globalFile,
850
842
  params: [{
851
843
  name: 'ascii',
@@ -855,7 +847,7 @@ let programStatementFunctions = [
855
847
  }, {
856
848
  name: 'HexToAscii',
857
849
  shortDescription: 'Returns a string that is the hex decoded string, for example HexToAscii("486921") = "Hi!".',
858
- type: new TypedFunctionType_1.TypedFunctionType(new StringType_1.StringType()),
850
+ type: new FunctionType_1.FunctionType(new StringType_1.StringType()),
859
851
  file: exports.globalFile,
860
852
  params: [{
861
853
  name: 'hex',
@@ -866,7 +858,7 @@ let programStatementFunctions = [
866
858
  {
867
859
  name: 'HexToInteger',
868
860
  shortDescription: 'Returns the integer value of the passed in hex string.',
869
- type: new TypedFunctionType_1.TypedFunctionType(new IntegerType_1.IntegerType()),
861
+ type: new FunctionType_1.FunctionType(new IntegerType_1.IntegerType()),
870
862
  file: exports.globalFile,
871
863
  params: [{
872
864
  name: 'hex',
@@ -876,7 +868,7 @@ let programStatementFunctions = [
876
868
  }, {
877
869
  name: 'HexToInteger',
878
870
  shortDescription: 'Returns a string that is the hex decoded string, for example HexToAscii("486921") = "Hi!".',
879
- type: new TypedFunctionType_1.TypedFunctionType(new IntegerType_1.IntegerType()),
871
+ type: new FunctionType_1.FunctionType(new IntegerType_1.IntegerType()),
880
872
  file: exports.globalFile,
881
873
  params: [{
882
874
  name: 'hex',
@@ -892,7 +884,7 @@ ExtraInfo: roAssociativeArray
892
884
  Regions: roAssociativeArray of name, roRegions pairs
893
885
  Animations: roAssociativeArray of name, roArray of roRegion pairs.
894
886
  Backgrounds: roAssociativeArray of name, path pairs.`,
895
- type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
887
+ type: new FunctionType_1.FunctionType(new ObjectType_1.ObjectType()),
896
888
  file: exports.globalFile,
897
889
  params: [{
898
890
  name: 'filename',
@@ -902,7 +894,7 @@ Backgrounds: roAssociativeArray of name, path pairs.`,
902
894
  }, {
903
895
  name: 'dfDrawMessage',
904
896
  shortDescription: 'dest is an roScreen/roBitmap/roRegion and region is an roRegion.\nGreys the entire dest region and draws it the region centered on the drawable dest.',
905
- type: new TypedFunctionType_1.TypedFunctionType(new VoidType_1.VoidType()),
897
+ type: new FunctionType_1.FunctionType(new VoidType_1.VoidType()),
906
898
  file: exports.globalFile,
907
899
  params: [{
908
900
  name: 'dest',
@@ -916,7 +908,7 @@ Backgrounds: roAssociativeArray of name, path pairs.`,
916
908
  }, {
917
909
  name: 'dfDrawImage',
918
910
  shortDescription: 'Returns True if successful.\nCreates a bitmap out of the image stored in the filename "path" and draws it at position (x,y) of the drawable dest.',
919
- type: new TypedFunctionType_1.TypedFunctionType(new BooleanType_1.BooleanType()),
911
+ type: new FunctionType_1.FunctionType(new BooleanType_1.BooleanType()),
920
912
  file: exports.globalFile,
921
913
  params: [{
922
914
  name: 'dest',
@@ -949,7 +941,7 @@ Right: right region if there is a pillar box area on the right
949
941
  Upper: upper region if there is a letterbox area at thetop
950
942
  Lower: lower region if there is a letterbox area at the bottom
951
943
  When using these regions as drawables, your graphics will be translated and clipped to these regions.`,
952
- type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
944
+ type: new FunctionType_1.FunctionType(new ObjectType_1.ObjectType()),
953
945
  file: exports.globalFile,
954
946
  params: [{
955
947
  name: 'screen',
@@ -978,7 +970,7 @@ When using these regions as drawables, your graphics will be translated and clip
978
970
  backgroundName is a key for the Backgrounds roAssociative array of backgrounds.
979
971
  Backgrounds is an roAssociative array of background name keys and file path string values
980
972
  This function creates an roBitmap out of the background image file and returns a region the size of the entire roBitmap.`,
981
- type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
973
+ type: new FunctionType_1.FunctionType(new ObjectType_1.ObjectType()),
982
974
  file: exports.globalFile,
983
975
  params: [{
984
976
  name: 'backgroundName',
@@ -1006,6 +998,9 @@ for (let callable of exports.globalCallables) {
1006
998
  };
1007
999
  }
1008
1000
  exports.globalFile.callables = exports.globalCallables;
1001
+ for (const callable of exports.globalCallables) {
1002
+ exports.globalFile.parser.symbolTable.addSymbol(callable.name, undefined, callable.type);
1003
+ }
1009
1004
  /**
1010
1005
  * A map of all built-in function names. We use this extensively in scope validation
1011
1006
  * so keep a single copy in memory to improve performance