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.
- package/README.md +79 -138
- package/bsconfig.schema.json +196 -5
- package/dist/ActionPipeline.d.ts +10 -0
- package/dist/ActionPipeline.js +40 -0
- package/dist/ActionPipeline.js.map +1 -0
- package/dist/AstValidationSegmenter.d.ts +45 -0
- package/dist/AstValidationSegmenter.js +322 -0
- package/dist/AstValidationSegmenter.js.map +1 -0
- package/dist/BsConfig.d.ts +161 -43
- package/dist/BusyStatusTracker.d.ts +61 -0
- package/dist/BusyStatusTracker.js +148 -0
- package/dist/BusyStatusTracker.js.map +1 -0
- package/dist/Cache.d.ts +3 -8
- package/dist/Cache.js +9 -14
- package/dist/Cache.js.map +1 -1
- package/dist/CacheVerifier.d.ts +7 -0
- package/dist/CacheVerifier.js +20 -0
- package/dist/CacheVerifier.js.map +1 -0
- package/dist/CodeActionUtil.d.ts +29 -4
- package/dist/CodeActionUtil.js +22 -5
- package/dist/CodeActionUtil.js.map +1 -1
- package/dist/CommentFlagProcessor.d.ts +20 -15
- package/dist/CommentFlagProcessor.js +143 -58
- package/dist/CommentFlagProcessor.js.map +1 -1
- package/dist/CrossScopeValidator.d.ts +68 -0
- package/dist/CrossScopeValidator.js +650 -0
- package/dist/CrossScopeValidator.js.map +1 -0
- package/dist/DependencyGraph.d.ts +8 -3
- package/dist/DependencyGraph.js +49 -16
- package/dist/DependencyGraph.js.map +1 -1
- package/dist/DiagnosticCollection.d.ts +21 -5
- package/dist/DiagnosticCollection.js +77 -24
- package/dist/DiagnosticCollection.js.map +1 -1
- package/dist/DiagnosticFilterer.d.ts +27 -6
- package/dist/DiagnosticFilterer.js +273 -60
- package/dist/DiagnosticFilterer.js.map +1 -1
- package/dist/DiagnosticManager.d.ts +83 -0
- package/dist/DiagnosticManager.js +422 -0
- package/dist/DiagnosticManager.js.map +1 -0
- package/dist/DiagnosticMessages.d.ts +602 -196
- package/dist/DiagnosticMessages.js +926 -342
- package/dist/DiagnosticMessages.js.map +1 -1
- package/dist/DiagnosticSeverityAdjuster.d.ts +7 -0
- package/dist/DiagnosticSeverityAdjuster.js +45 -0
- package/dist/DiagnosticSeverityAdjuster.js.map +1 -0
- package/dist/FunctionScope.d.ts +28 -0
- package/dist/FunctionScope.js +52 -0
- package/dist/FunctionScope.js.map +1 -0
- package/dist/KeyedThrottler.d.ts +3 -3
- package/dist/KeyedThrottler.js +3 -3
- package/dist/KeyedThrottler.js.map +1 -1
- package/dist/LanguageServer.d.ts +136 -104
- package/dist/LanguageServer.js +577 -741
- package/dist/LanguageServer.js.map +1 -1
- package/dist/Logger.d.ts +17 -13
- package/dist/Logger.js +64 -34
- package/dist/Logger.js.map +1 -1
- package/dist/PluginInterface.d.ts +32 -10
- package/dist/PluginInterface.js +117 -7
- package/dist/PluginInterface.js.map +1 -1
- package/dist/Program.d.ts +302 -98
- package/dist/Program.js +1613 -726
- package/dist/Program.js.map +1 -1
- package/dist/ProgramBuilder.d.ts +39 -22
- package/dist/ProgramBuilder.js +245 -179
- package/dist/ProgramBuilder.js.map +1 -1
- package/dist/Scope.d.ts +227 -106
- package/dist/Scope.js +609 -557
- package/dist/Scope.js.map +1 -1
- package/dist/ScopeNamespaceLookup.d.ts +73 -0
- package/dist/ScopeNamespaceLookup.js +242 -0
- package/dist/ScopeNamespaceLookup.js.map +1 -0
- package/dist/SemanticTokenUtils.js +5 -1
- package/dist/SemanticTokenUtils.js.map +1 -1
- package/dist/Stopwatch.d.ts +4 -0
- package/dist/Stopwatch.js +8 -1
- package/dist/Stopwatch.js.map +1 -1
- package/dist/SymbolTable.d.ts +145 -26
- package/dist/SymbolTable.js +575 -64
- package/dist/SymbolTable.js.map +1 -1
- package/dist/SymbolTypeFlag.d.ts +9 -0
- package/dist/SymbolTypeFlag.js +14 -0
- package/dist/SymbolTypeFlag.js.map +1 -0
- package/dist/Throttler.d.ts +12 -0
- package/dist/Throttler.js +39 -0
- package/dist/Throttler.js.map +1 -1
- package/dist/Watcher.d.ts +0 -3
- package/dist/Watcher.js +0 -3
- package/dist/Watcher.js.map +1 -1
- package/dist/XmlScope.d.ts +5 -15
- package/dist/XmlScope.js +34 -90
- package/dist/XmlScope.js.map +1 -1
- package/dist/astUtils/CachedLookups.d.ts +50 -0
- package/dist/astUtils/CachedLookups.js +337 -0
- package/dist/astUtils/CachedLookups.js.map +1 -0
- package/dist/astUtils/Editor.d.ts +69 -0
- package/dist/astUtils/Editor.js +245 -0
- package/dist/astUtils/Editor.js.map +1 -0
- package/dist/astUtils/creators.d.ts +54 -19
- package/dist/astUtils/creators.js +242 -42
- package/dist/astUtils/creators.js.map +1 -1
- package/dist/astUtils/reflection.d.ts +199 -85
- package/dist/astUtils/reflection.js +518 -145
- package/dist/astUtils/reflection.js.map +1 -1
- package/dist/astUtils/stackedVisitor.js.map +1 -1
- package/dist/astUtils/visitors.d.ts +117 -53
- package/dist/astUtils/visitors.js +95 -15
- package/dist/astUtils/visitors.js.map +1 -1
- package/dist/astUtils/xml.d.ts +9 -8
- package/dist/astUtils/xml.js +12 -7
- package/dist/astUtils/xml.js.map +1 -1
- package/dist/bscPlugin/BscPlugin.d.ts +26 -4
- package/dist/bscPlugin/BscPlugin.js +96 -4
- package/dist/bscPlugin/BscPlugin.js.map +1 -1
- package/dist/bscPlugin/CallExpressionInfo.d.ts +36 -0
- package/dist/bscPlugin/CallExpressionInfo.js +142 -0
- package/dist/bscPlugin/CallExpressionInfo.js.map +1 -0
- package/dist/bscPlugin/FileWriter.d.ts +19 -0
- package/dist/bscPlugin/FileWriter.js +79 -0
- package/dist/bscPlugin/FileWriter.js.map +1 -0
- package/dist/bscPlugin/SignatureHelpUtil.d.ts +10 -0
- package/dist/bscPlugin/SignatureHelpUtil.js +137 -0
- package/dist/bscPlugin/SignatureHelpUtil.js.map +1 -0
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.d.ts +109 -7
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.js +676 -26
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.js.map +1 -1
- package/dist/bscPlugin/codeActions/FixAllCodeActionsProcessor.d.ts +17 -0
- package/dist/bscPlugin/codeActions/FixAllCodeActionsProcessor.js +66 -0
- package/dist/bscPlugin/codeActions/FixAllCodeActionsProcessor.js.map +1 -0
- package/dist/bscPlugin/codeActions/codeActionHelpers.d.ts +18 -0
- package/dist/bscPlugin/codeActions/codeActionHelpers.js +31 -0
- package/dist/bscPlugin/codeActions/codeActionHelpers.js.map +1 -0
- package/dist/bscPlugin/completions/CompletionsProcessor.d.ts +65 -0
- package/dist/bscPlugin/completions/CompletionsProcessor.js +633 -0
- package/dist/bscPlugin/completions/CompletionsProcessor.js.map +1 -0
- package/dist/bscPlugin/definition/DefinitionProvider.d.ts +13 -0
- package/dist/bscPlugin/definition/DefinitionProvider.js +220 -0
- package/dist/bscPlugin/definition/DefinitionProvider.js.map +1 -0
- package/dist/bscPlugin/fileProviders/FileProvider.d.ts +9 -0
- package/dist/bscPlugin/fileProviders/FileProvider.js +51 -0
- package/dist/bscPlugin/fileProviders/FileProvider.js.map +1 -0
- package/dist/bscPlugin/hover/HoverProcessor.d.ts +18 -0
- package/dist/bscPlugin/hover/HoverProcessor.js +238 -0
- package/dist/bscPlugin/hover/HoverProcessor.js.map +1 -0
- package/dist/bscPlugin/references/ReferencesProvider.d.ts +12 -0
- package/dist/bscPlugin/references/ReferencesProvider.js +57 -0
- package/dist/bscPlugin/references/ReferencesProvider.js.map +1 -0
- package/dist/bscPlugin/selectionRanges/SelectionRangesProcessor.d.ts +7 -0
- package/dist/bscPlugin/selectionRanges/SelectionRangesProcessor.js +77 -0
- package/dist/bscPlugin/selectionRanges/SelectionRangesProcessor.js.map +1 -0
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.d.ts +14 -0
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.js +164 -0
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.js.map +1 -0
- package/dist/bscPlugin/serialize/BslibManager.d.ts +12 -0
- package/dist/bscPlugin/serialize/BslibManager.js +46 -0
- package/dist/bscPlugin/serialize/BslibManager.js.map +1 -0
- package/dist/bscPlugin/serialize/FileSerializer.d.ts +9 -0
- package/dist/bscPlugin/serialize/FileSerializer.js +80 -0
- package/dist/bscPlugin/serialize/FileSerializer.js.map +1 -0
- package/dist/bscPlugin/symbols/DocumentSymbolProcessor.d.ts +7 -0
- package/dist/bscPlugin/symbols/DocumentSymbolProcessor.js +22 -0
- package/dist/bscPlugin/symbols/DocumentSymbolProcessor.js.map +1 -0
- package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.d.ts +7 -0
- package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.js +26 -0
- package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.js.map +1 -0
- package/dist/bscPlugin/symbols/symbolUtils.d.ts +5 -0
- package/dist/bscPlugin/symbols/symbolUtils.js +141 -0
- package/dist/bscPlugin/symbols/symbolUtils.js.map +1 -0
- package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.d.ts +34 -0
- package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.js +504 -0
- package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.js.map +1 -0
- package/dist/bscPlugin/transpile/XmlFilePreTranspileProcessor.d.ts +12 -0
- package/dist/bscPlugin/transpile/XmlFilePreTranspileProcessor.js +99 -0
- package/dist/bscPlugin/transpile/XmlFilePreTranspileProcessor.js.map +1 -0
- package/dist/bscPlugin/validation/BrsFileAfterValidator.d.ts +7 -0
- package/dist/bscPlugin/validation/BrsFileAfterValidator.js +18 -0
- package/dist/bscPlugin/validation/BrsFileAfterValidator.js.map +1 -0
- package/dist/bscPlugin/validation/BrsFileValidator.d.ts +51 -0
- package/dist/bscPlugin/validation/BrsFileValidator.js +714 -0
- package/dist/bscPlugin/validation/BrsFileValidator.js.map +1 -0
- package/dist/bscPlugin/validation/ProgramValidator.d.ts +11 -0
- package/dist/bscPlugin/validation/ProgramValidator.js +33 -0
- package/dist/bscPlugin/validation/ProgramValidator.js.map +1 -0
- package/dist/bscPlugin/validation/ScopeValidator.d.ts +158 -0
- package/dist/bscPlugin/validation/ScopeValidator.js +1481 -0
- package/dist/bscPlugin/validation/ScopeValidator.js.map +1 -0
- package/dist/bscPlugin/validation/XmlFileValidator.d.ts +8 -0
- package/dist/bscPlugin/validation/XmlFileValidator.js +50 -0
- package/dist/bscPlugin/validation/XmlFileValidator.js.map +1 -0
- package/dist/cli.js +140 -28
- package/dist/cli.js.map +1 -1
- package/dist/common/Sequencer.d.ts +53 -0
- package/dist/common/Sequencer.js +233 -0
- package/dist/common/Sequencer.js.map +1 -0
- package/dist/deferred.d.ts +5 -3
- package/dist/deferred.js +10 -0
- package/dist/deferred.js.map +1 -1
- package/dist/diagnosticUtils.d.ts +61 -4
- package/dist/diagnosticUtils.js +285 -25
- package/dist/diagnosticUtils.js.map +1 -1
- package/dist/examples/plugins/removePrint.d.ts +2 -2
- package/dist/examples/plugins/removePrint.js +8 -12
- package/dist/examples/plugins/removePrint.js.map +1 -1
- package/dist/files/AssetFile.d.ts +24 -0
- package/dist/files/AssetFile.js +25 -0
- package/dist/files/AssetFile.js.map +1 -0
- package/dist/files/BrsFile.d.ts +161 -87
- package/dist/files/BrsFile.js +919 -936
- package/dist/files/BrsFile.js.map +1 -1
- package/dist/files/BscFile.d.ts +102 -0
- package/dist/files/BscFile.js +15 -0
- package/dist/files/BscFile.js.map +1 -0
- package/dist/files/Factory.d.ts +25 -0
- package/dist/files/Factory.js +22 -0
- package/dist/files/Factory.js.map +1 -0
- package/dist/files/LazyFileData.d.ts +21 -0
- package/dist/files/LazyFileData.js +54 -0
- package/dist/files/LazyFileData.js.map +1 -0
- package/dist/files/XmlFile.d.ts +80 -41
- package/dist/files/XmlFile.js +162 -137
- package/dist/files/XmlFile.js.map +1 -1
- package/dist/globalCallables.d.ts +3 -1
- package/dist/globalCallables.js +424 -184
- package/dist/globalCallables.js.map +1 -1
- package/dist/index.d.ts +32 -4
- package/dist/index.js +54 -7
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts +987 -125
- package/dist/interfaces.js +21 -0
- package/dist/interfaces.js.map +1 -1
- package/dist/lexer/Lexer.d.ts +51 -12
- package/dist/lexer/Lexer.js +214 -65
- package/dist/lexer/Lexer.js.map +1 -1
- package/dist/lexer/Token.d.ts +27 -11
- package/dist/lexer/Token.js +10 -2
- package/dist/lexer/Token.js.map +1 -1
- package/dist/lexer/TokenKind.d.ts +48 -2
- package/dist/lexer/TokenKind.js +167 -10
- package/dist/lexer/TokenKind.js.map +1 -1
- package/dist/logging.d.ts +14 -0
- package/dist/logging.js +29 -0
- package/dist/logging.js.map +1 -0
- package/dist/lsp/ActionQueue.d.ts +35 -0
- package/dist/lsp/ActionQueue.js +115 -0
- package/dist/lsp/ActionQueue.js.map +1 -0
- package/dist/lsp/DocumentManager.d.ts +63 -0
- package/dist/lsp/DocumentManager.js +122 -0
- package/dist/lsp/DocumentManager.js.map +1 -0
- package/dist/lsp/LspProject.d.ts +287 -0
- package/dist/lsp/LspProject.js +3 -0
- package/dist/lsp/LspProject.js.map +1 -0
- package/dist/lsp/PathFilterer.d.ts +75 -0
- package/dist/lsp/PathFilterer.js +196 -0
- package/dist/lsp/PathFilterer.js.map +1 -0
- package/dist/lsp/Project.d.ts +200 -0
- package/dist/lsp/Project.js +562 -0
- package/dist/lsp/Project.js.map +1 -0
- package/dist/lsp/ProjectManager.d.ts +288 -0
- package/dist/lsp/ProjectManager.js +967 -0
- package/dist/lsp/ProjectManager.js.map +1 -0
- package/dist/lsp/ReaderWriterManager.d.ts +21 -0
- package/dist/lsp/ReaderWriterManager.js +60 -0
- package/dist/lsp/ReaderWriterManager.js.map +1 -0
- package/dist/lsp/worker/MessageHandler.d.ts +99 -0
- package/dist/lsp/worker/MessageHandler.js +138 -0
- package/dist/lsp/worker/MessageHandler.js.map +1 -0
- package/dist/lsp/worker/WorkerPool.d.ts +38 -0
- package/dist/lsp/worker/WorkerPool.js +78 -0
- package/dist/lsp/worker/WorkerPool.js.map +1 -0
- package/dist/lsp/worker/WorkerThreadProject.d.ts +168 -0
- package/dist/lsp/worker/WorkerThreadProject.js +205 -0
- package/dist/lsp/worker/WorkerThreadProject.js.map +1 -0
- package/dist/lsp/worker/WorkerThreadProjectRunner.d.ts +15 -0
- package/dist/lsp/worker/WorkerThreadProjectRunner.js +58 -0
- package/dist/lsp/worker/WorkerThreadProjectRunner.js.map +1 -0
- package/dist/lsp/worker/run.js +14 -0
- package/dist/lsp/worker/run.js.map +1 -0
- package/dist/parser/AstNode.d.ts +205 -0
- package/dist/parser/AstNode.js +305 -0
- package/dist/parser/AstNode.js.map +1 -0
- package/dist/parser/BrightScriptDocParser.d.ts +56 -0
- package/dist/parser/BrightScriptDocParser.js +294 -0
- package/dist/parser/BrightScriptDocParser.js.map +1 -0
- package/dist/parser/BrsTranspileState.d.ts +22 -3
- package/dist/parser/BrsTranspileState.js +19 -0
- package/dist/parser/BrsTranspileState.js.map +1 -1
- package/dist/parser/Expression.d.ts +601 -220
- package/dist/parser/Expression.js +1516 -502
- package/dist/parser/Expression.js.map +1 -1
- package/dist/parser/Parser.d.ts +137 -121
- package/dist/parser/Parser.js +1808 -982
- package/dist/parser/Parser.js.map +1 -1
- package/dist/parser/SGParser.d.ts +30 -13
- package/dist/parser/SGParser.js +94 -56
- package/dist/parser/SGParser.js.map +1 -1
- package/dist/parser/SGTypes.d.ts +134 -46
- package/dist/parser/SGTypes.js +206 -115
- package/dist/parser/SGTypes.js.map +1 -1
- package/dist/parser/Statement.d.ts +854 -267
- package/dist/parser/Statement.js +2416 -621
- package/dist/parser/Statement.js.map +1 -1
- package/dist/parser/TranspileState.d.ts +30 -14
- package/dist/parser/TranspileState.js +124 -27
- package/dist/parser/TranspileState.js.map +1 -1
- package/dist/preprocessor/Manifest.d.ts +6 -6
- package/dist/preprocessor/Manifest.js +17 -38
- package/dist/preprocessor/Manifest.js.map +1 -1
- package/dist/roku-types/data.json +20554 -0
- package/dist/roku-types/index.d.ts +5726 -0
- package/dist/roku-types/index.js +11 -0
- package/dist/roku-types/index.js.map +1 -0
- package/dist/types/ArrayType.d.ts +12 -5
- package/dist/types/ArrayType.js +95 -25
- package/dist/types/ArrayType.js.map +1 -1
- package/dist/types/AssociativeArrayType.d.ts +15 -0
- package/dist/types/AssociativeArrayType.js +64 -0
- package/dist/types/AssociativeArrayType.js.map +1 -0
- package/dist/types/BaseFunctionType.d.ts +10 -0
- package/dist/types/BaseFunctionType.js +26 -0
- package/dist/types/BaseFunctionType.js.map +1 -0
- package/dist/types/BooleanType.d.ts +9 -5
- package/dist/types/BooleanType.js +19 -8
- package/dist/types/BooleanType.js.map +1 -1
- package/dist/types/BscType.d.ts +41 -3
- package/dist/types/BscType.js +152 -0
- package/dist/types/BscType.js.map +1 -1
- package/dist/types/BscTypeKind.d.ts +28 -0
- package/dist/types/BscTypeKind.js +33 -0
- package/dist/types/BscTypeKind.js.map +1 -0
- package/dist/types/BuiltInInterfaceAdder.d.ts +28 -0
- package/dist/types/BuiltInInterfaceAdder.js +212 -0
- package/dist/types/BuiltInInterfaceAdder.js.map +1 -0
- package/dist/types/CallFuncableType.d.ts +24 -0
- package/dist/types/CallFuncableType.js +91 -0
- package/dist/types/CallFuncableType.js.map +1 -0
- package/dist/types/ClassType.d.ts +17 -0
- package/dist/types/ClassType.js +63 -0
- package/dist/types/ClassType.js.map +1 -0
- package/dist/types/ComponentType.d.ts +22 -0
- package/dist/types/ComponentType.js +110 -0
- package/dist/types/ComponentType.js.map +1 -0
- package/dist/types/DoubleType.d.ts +10 -5
- package/dist/types/DoubleType.js +21 -17
- package/dist/types/DoubleType.js.map +1 -1
- package/dist/types/DynamicType.d.ts +13 -5
- package/dist/types/DynamicType.js +26 -5
- package/dist/types/DynamicType.js.map +1 -1
- package/dist/types/EnumType.d.ts +42 -0
- package/dist/types/EnumType.js +101 -0
- package/dist/types/EnumType.js.map +1 -0
- package/dist/types/FloatType.d.ts +10 -5
- package/dist/types/FloatType.js +21 -17
- package/dist/types/FloatType.js.map +1 -1
- package/dist/types/FunctionType.d.ts +8 -22
- package/dist/types/FunctionType.js +25 -63
- package/dist/types/FunctionType.js.map +1 -1
- package/dist/types/InheritableType.d.ts +29 -0
- package/dist/types/InheritableType.js +173 -0
- package/dist/types/InheritableType.js.map +1 -0
- package/dist/types/InlineInterfaceType.d.ts +5 -0
- package/dist/types/InlineInterfaceType.js +17 -0
- package/dist/types/InlineInterfaceType.js.map +1 -0
- package/dist/types/IntegerType.d.ts +10 -5
- package/dist/types/IntegerType.js +21 -17
- package/dist/types/IntegerType.js.map +1 -1
- package/dist/types/InterfaceType.d.ts +14 -6
- package/dist/types/InterfaceType.js +30 -15
- package/dist/types/InterfaceType.js.map +1 -1
- package/dist/types/IntersectionType.d.ts +29 -0
- package/dist/types/IntersectionType.js +256 -0
- package/dist/types/IntersectionType.js.map +1 -0
- package/dist/types/InvalidType.d.ts +10 -5
- package/dist/types/InvalidType.js +21 -9
- package/dist/types/InvalidType.js.map +1 -1
- package/dist/types/LongIntegerType.d.ts +10 -5
- package/dist/types/LongIntegerType.js +21 -17
- package/dist/types/LongIntegerType.js.map +1 -1
- package/dist/types/NamespaceType.d.ts +12 -0
- package/dist/types/NamespaceType.js +28 -0
- package/dist/types/NamespaceType.js.map +1 -0
- package/dist/types/ObjectType.d.ts +12 -5
- package/dist/types/ObjectType.js +25 -8
- package/dist/types/ObjectType.js.map +1 -1
- package/dist/types/ReferenceType.d.ts +123 -0
- package/dist/types/ReferenceType.js +726 -0
- package/dist/types/ReferenceType.js.map +1 -0
- package/dist/types/StringType.d.ts +12 -5
- package/dist/types/StringType.js +23 -8
- package/dist/types/StringType.js.map +1 -1
- package/dist/types/TypeStatementType.d.ts +19 -0
- package/dist/types/TypeStatementType.js +56 -0
- package/dist/types/TypeStatementType.js.map +1 -0
- package/dist/types/TypedFunctionType.d.ts +34 -0
- package/dist/types/TypedFunctionType.js +157 -0
- package/dist/types/TypedFunctionType.js.map +1 -0
- package/dist/types/UninitializedType.d.ts +11 -6
- package/dist/types/UninitializedType.js +20 -11
- package/dist/types/UninitializedType.js.map +1 -1
- package/dist/types/UnionType.d.ts +27 -0
- package/dist/types/UnionType.js +196 -0
- package/dist/types/UnionType.js.map +1 -0
- package/dist/types/VoidType.d.ts +11 -5
- package/dist/types/VoidType.js +22 -8
- package/dist/types/VoidType.js.map +1 -1
- package/dist/types/helpers.d.ts +51 -0
- package/dist/types/helpers.js +329 -0
- package/dist/types/helpers.js.map +1 -0
- package/dist/types/index.d.ts +22 -0
- package/dist/types/index.js +39 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/roFunctionType.d.ts +11 -0
- package/dist/types/roFunctionType.js +37 -0
- package/dist/types/roFunctionType.js.map +1 -0
- package/dist/util.d.ts +325 -185
- package/dist/util.js +2135 -568
- package/dist/util.js.map +1 -1
- package/dist/validators/ClassValidator.d.ts +9 -15
- package/dist/validators/ClassValidator.js +93 -138
- package/dist/validators/ClassValidator.js.map +1 -1
- package/package.json +183 -138
- package/CHANGELOG.md +0 -1188
- package/dist/astUtils/creators.spec.js +0 -21
- package/dist/astUtils/creators.spec.js.map +0 -1
- package/dist/astUtils/index.d.ts +0 -7
- package/dist/astUtils/index.js +0 -26
- package/dist/astUtils/index.js.map +0 -1
- package/dist/astUtils/reflection.spec.d.ts +0 -1
- package/dist/astUtils/reflection.spec.js +0 -292
- package/dist/astUtils/reflection.spec.js.map +0 -1
- package/dist/astUtils/stackedVisitor.spec.d.ts +0 -1
- package/dist/astUtils/stackedVisitor.spec.js +0 -79
- package/dist/astUtils/stackedVisitor.spec.js.map +0 -1
- package/dist/astUtils/visitors.spec.d.ts +0 -1
- package/dist/astUtils/visitors.spec.js +0 -854
- package/dist/astUtils/visitors.spec.js.map +0 -1
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.d.ts +0 -1
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js +0 -194
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js.map +0 -1
- package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.d.ts +0 -7
- package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.js +0 -63
- package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.js.map +0 -1
- package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.spec.d.ts +0 -1
- package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.spec.js +0 -45
- package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.spec.js.map +0 -1
- package/dist/files/BrsFile.Class.spec.d.ts +0 -1
- package/dist/files/BrsFile.Class.spec.js +0 -1081
- package/dist/files/BrsFile.Class.spec.js.map +0 -1
- package/dist/files/BrsFile.spec.d.ts +0 -1
- package/dist/files/BrsFile.spec.js +0 -2524
- package/dist/files/BrsFile.spec.js.map +0 -1
- package/dist/files/XmlFile.spec.d.ts +0 -1
- package/dist/files/XmlFile.spec.js +0 -1065
- package/dist/files/XmlFile.spec.js.map +0 -1
- package/dist/files/tests/imports.spec.d.ts +0 -1
- package/dist/files/tests/imports.spec.js +0 -241
- package/dist/files/tests/imports.spec.js.map +0 -1
- package/dist/lexer/Character.spec.d.ts +0 -1
- package/dist/lexer/Character.spec.js +0 -27
- package/dist/lexer/Character.spec.js.map +0 -1
- package/dist/lexer/Lexer.spec.d.ts +0 -1
- package/dist/lexer/Lexer.spec.js +0 -1101
- package/dist/lexer/Lexer.spec.js.map +0 -1
- package/dist/lexer/index.d.ts +0 -3
- package/dist/lexer/index.js +0 -17
- package/dist/lexer/index.js.map +0 -1
- package/dist/parser/Parser.Class.spec.d.ts +0 -1
- package/dist/parser/Parser.Class.spec.js +0 -390
- package/dist/parser/Parser.Class.spec.js.map +0 -1
- package/dist/parser/Parser.spec.d.ts +0 -4
- package/dist/parser/Parser.spec.js +0 -1216
- package/dist/parser/Parser.spec.js.map +0 -1
- package/dist/parser/SGParser.spec.d.ts +0 -1
- package/dist/parser/SGParser.spec.js +0 -145
- package/dist/parser/SGParser.spec.js.map +0 -1
- package/dist/parser/SGTypes.spec.d.ts +0 -1
- package/dist/parser/SGTypes.spec.js +0 -351
- package/dist/parser/SGTypes.spec.js.map +0 -1
- package/dist/parser/Statement.spec.d.ts +0 -1
- package/dist/parser/Statement.spec.js +0 -94
- package/dist/parser/Statement.spec.js.map +0 -1
- package/dist/parser/index.d.ts +0 -3
- package/dist/parser/index.js +0 -16
- package/dist/parser/index.js.map +0 -1
- package/dist/parser/tests/Parser.spec.d.ts +0 -18
- package/dist/parser/tests/Parser.spec.js +0 -35
- package/dist/parser/tests/Parser.spec.js.map +0 -1
- package/dist/parser/tests/controlFlow/For.spec.d.ts +0 -1
- package/dist/parser/tests/controlFlow/For.spec.js +0 -161
- package/dist/parser/tests/controlFlow/For.spec.js.map +0 -1
- package/dist/parser/tests/controlFlow/ForEach.spec.d.ts +0 -1
- package/dist/parser/tests/controlFlow/ForEach.spec.js +0 -106
- package/dist/parser/tests/controlFlow/ForEach.spec.js.map +0 -1
- package/dist/parser/tests/controlFlow/If.spec.d.ts +0 -1
- package/dist/parser/tests/controlFlow/If.spec.js +0 -551
- package/dist/parser/tests/controlFlow/If.spec.js.map +0 -1
- package/dist/parser/tests/controlFlow/While.spec.d.ts +0 -1
- package/dist/parser/tests/controlFlow/While.spec.js +0 -107
- package/dist/parser/tests/controlFlow/While.spec.js.map +0 -1
- package/dist/parser/tests/expression/Additive.spec.d.ts +0 -1
- package/dist/parser/tests/expression/Additive.spec.js +0 -99
- package/dist/parser/tests/expression/Additive.spec.js.map +0 -1
- package/dist/parser/tests/expression/ArrayLiterals.spec.d.ts +0 -1
- package/dist/parser/tests/expression/ArrayLiterals.spec.js +0 -254
- package/dist/parser/tests/expression/ArrayLiterals.spec.js.map +0 -1
- package/dist/parser/tests/expression/AssociativeArrayLiterals.spec.d.ts +0 -1
- package/dist/parser/tests/expression/AssociativeArrayLiterals.spec.js +0 -266
- package/dist/parser/tests/expression/AssociativeArrayLiterals.spec.js.map +0 -1
- package/dist/parser/tests/expression/Boolean.spec.d.ts +0 -1
- package/dist/parser/tests/expression/Boolean.spec.js +0 -83
- package/dist/parser/tests/expression/Boolean.spec.js.map +0 -1
- package/dist/parser/tests/expression/Call.spec.d.ts +0 -1
- package/dist/parser/tests/expression/Call.spec.js +0 -134
- package/dist/parser/tests/expression/Call.spec.js.map +0 -1
- package/dist/parser/tests/expression/Exponential.spec.d.ts +0 -1
- package/dist/parser/tests/expression/Exponential.spec.js +0 -37
- package/dist/parser/tests/expression/Exponential.spec.js.map +0 -1
- package/dist/parser/tests/expression/Function.spec.d.ts +0 -1
- package/dist/parser/tests/expression/Function.spec.js +0 -403
- package/dist/parser/tests/expression/Function.spec.js.map +0 -1
- package/dist/parser/tests/expression/Indexing.spec.d.ts +0 -1
- package/dist/parser/tests/expression/Indexing.spec.js +0 -219
- package/dist/parser/tests/expression/Indexing.spec.js.map +0 -1
- package/dist/parser/tests/expression/Multiplicative.spec.d.ts +0 -1
- package/dist/parser/tests/expression/Multiplicative.spec.js +0 -67
- package/dist/parser/tests/expression/Multiplicative.spec.js.map +0 -1
- package/dist/parser/tests/expression/NullCoalescenceExpression.spec.d.ts +0 -1
- package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js +0 -201
- package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js.map +0 -1
- package/dist/parser/tests/expression/PrefixUnary.spec.d.ts +0 -1
- package/dist/parser/tests/expression/PrefixUnary.spec.js +0 -105
- package/dist/parser/tests/expression/PrefixUnary.spec.js.map +0 -1
- package/dist/parser/tests/expression/Primary.spec.d.ts +0 -1
- package/dist/parser/tests/expression/Primary.spec.js +0 -149
- package/dist/parser/tests/expression/Primary.spec.js.map +0 -1
- package/dist/parser/tests/expression/Relational.spec.d.ts +0 -1
- package/dist/parser/tests/expression/Relational.spec.js +0 -83
- package/dist/parser/tests/expression/Relational.spec.js.map +0 -1
- package/dist/parser/tests/expression/SourceLiteralExpression.spec.d.ts +0 -1
- package/dist/parser/tests/expression/SourceLiteralExpression.spec.js +0 -201
- package/dist/parser/tests/expression/SourceLiteralExpression.spec.js.map +0 -1
- package/dist/parser/tests/expression/TemplateStringExpression.spec.d.ts +0 -1
- package/dist/parser/tests/expression/TemplateStringExpression.spec.js +0 -202
- package/dist/parser/tests/expression/TemplateStringExpression.spec.js.map +0 -1
- package/dist/parser/tests/expression/TernaryExpression.spec.d.ts +0 -1
- package/dist/parser/tests/expression/TernaryExpression.spec.js +0 -323
- package/dist/parser/tests/expression/TernaryExpression.spec.js.map +0 -1
- package/dist/parser/tests/statement/AssignmentOperators.spec.d.ts +0 -1
- package/dist/parser/tests/statement/AssignmentOperators.spec.js +0 -79
- package/dist/parser/tests/statement/AssignmentOperators.spec.js.map +0 -1
- package/dist/parser/tests/statement/Declaration.spec.d.ts +0 -1
- package/dist/parser/tests/statement/Declaration.spec.js +0 -108
- package/dist/parser/tests/statement/Declaration.spec.js.map +0 -1
- package/dist/parser/tests/statement/Dim.spec.d.ts +0 -1
- package/dist/parser/tests/statement/Dim.spec.js +0 -73
- package/dist/parser/tests/statement/Dim.spec.js.map +0 -1
- package/dist/parser/tests/statement/Function.spec.d.ts +0 -1
- package/dist/parser/tests/statement/Function.spec.js +0 -332
- package/dist/parser/tests/statement/Function.spec.js.map +0 -1
- package/dist/parser/tests/statement/Goto.spec.d.ts +0 -1
- package/dist/parser/tests/statement/Goto.spec.js +0 -50
- package/dist/parser/tests/statement/Goto.spec.js.map +0 -1
- package/dist/parser/tests/statement/Increment.spec.d.ts +0 -1
- package/dist/parser/tests/statement/Increment.spec.js +0 -117
- package/dist/parser/tests/statement/Increment.spec.js.map +0 -1
- package/dist/parser/tests/statement/LibraryStatement.spec.d.ts +0 -1
- package/dist/parser/tests/statement/LibraryStatement.spec.js +0 -74
- package/dist/parser/tests/statement/LibraryStatement.spec.js.map +0 -1
- package/dist/parser/tests/statement/Misc.spec.d.ts +0 -1
- package/dist/parser/tests/statement/Misc.spec.js +0 -333
- package/dist/parser/tests/statement/Misc.spec.js.map +0 -1
- package/dist/parser/tests/statement/PrintStatement.spec.d.ts +0 -1
- package/dist/parser/tests/statement/PrintStatement.spec.js +0 -181
- package/dist/parser/tests/statement/PrintStatement.spec.js.map +0 -1
- package/dist/parser/tests/statement/ReturnStatement.spec.d.ts +0 -1
- package/dist/parser/tests/statement/ReturnStatement.spec.js +0 -94
- package/dist/parser/tests/statement/ReturnStatement.spec.js.map +0 -1
- package/dist/parser/tests/statement/Set.spec.d.ts +0 -1
- package/dist/parser/tests/statement/Set.spec.js +0 -218
- package/dist/parser/tests/statement/Set.spec.js.map +0 -1
- package/dist/parser/tests/statement/Stop.spec.d.ts +0 -1
- package/dist/parser/tests/statement/Stop.spec.js +0 -37
- package/dist/parser/tests/statement/Stop.spec.js.map +0 -1
- package/dist/parser/tests/statement/Throw.spec.d.ts +0 -1
- package/dist/parser/tests/statement/Throw.spec.js +0 -35
- package/dist/parser/tests/statement/Throw.spec.js.map +0 -1
- package/dist/parser/tests/statement/TryCatch.spec.d.ts +0 -1
- package/dist/parser/tests/statement/TryCatch.spec.js +0 -140
- package/dist/parser/tests/statement/TryCatch.spec.js.map +0 -1
- package/dist/preprocessor/Chunk.d.ts +0 -82
- package/dist/preprocessor/Chunk.js +0 -77
- package/dist/preprocessor/Chunk.js.map +0 -1
- package/dist/preprocessor/Manifest.spec.d.ts +0 -0
- package/dist/preprocessor/Manifest.spec.js +0 -105
- package/dist/preprocessor/Manifest.spec.js.map +0 -1
- package/dist/preprocessor/Preprocessor.d.ts +0 -60
- package/dist/preprocessor/Preprocessor.js +0 -156
- package/dist/preprocessor/Preprocessor.js.map +0 -1
- package/dist/preprocessor/Preprocessor.spec.d.ts +0 -1
- package/dist/preprocessor/Preprocessor.spec.js +0 -152
- package/dist/preprocessor/Preprocessor.spec.js.map +0 -1
- package/dist/preprocessor/PreprocessorParser.d.ts +0 -61
- package/dist/preprocessor/PreprocessorParser.js +0 -194
- package/dist/preprocessor/PreprocessorParser.js.map +0 -1
- package/dist/preprocessor/PreprocessorParser.spec.d.ts +0 -1
- package/dist/preprocessor/PreprocessorParser.spec.js +0 -116
- package/dist/preprocessor/PreprocessorParser.spec.js.map +0 -1
- package/dist/preprocessor/index.d.ts +0 -3
- package/dist/preprocessor/index.js +0 -16
- package/dist/preprocessor/index.js.map +0 -1
- package/dist/types/ArrayType.spec.d.ts +0 -1
- package/dist/types/ArrayType.spec.js +0 -30
- package/dist/types/ArrayType.spec.js.map +0 -1
- package/dist/types/BooleanType.spec.d.ts +0 -1
- package/dist/types/BooleanType.spec.js +0 -12
- package/dist/types/BooleanType.spec.js.map +0 -1
- package/dist/types/CustomType.d.ts +0 -10
- package/dist/types/CustomType.js +0 -35
- package/dist/types/CustomType.js.map +0 -1
- package/dist/types/DoubleType.spec.d.ts +0 -1
- package/dist/types/DoubleType.spec.js +0 -12
- package/dist/types/DoubleType.spec.js.map +0 -1
- package/dist/types/DynamicType.spec.d.ts +0 -1
- package/dist/types/DynamicType.spec.js +0 -12
- package/dist/types/DynamicType.spec.js.map +0 -1
- package/dist/types/FloatType.spec.d.ts +0 -1
- package/dist/types/FloatType.spec.js +0 -12
- package/dist/types/FloatType.spec.js.map +0 -1
- package/dist/types/FunctionType.spec.d.ts +0 -1
- package/dist/types/FunctionType.spec.js +0 -29
- package/dist/types/FunctionType.spec.js.map +0 -1
- package/dist/types/IntegerType.spec.d.ts +0 -1
- package/dist/types/IntegerType.spec.js +0 -12
- package/dist/types/IntegerType.spec.js.map +0 -1
- package/dist/types/InvalidType.spec.d.ts +0 -1
- package/dist/types/InvalidType.spec.js +0 -12
- package/dist/types/InvalidType.spec.js.map +0 -1
- package/dist/types/LazyType.d.ts +0 -15
- package/dist/types/LazyType.js +0 -32
- package/dist/types/LazyType.js.map +0 -1
- package/dist/types/LongIntegerType.spec.d.ts +0 -1
- package/dist/types/LongIntegerType.spec.js +0 -12
- package/dist/types/LongIntegerType.spec.js.map +0 -1
- package/dist/types/ObjectType.spec.d.ts +0 -1
- package/dist/types/ObjectType.spec.js +0 -12
- package/dist/types/ObjectType.spec.js.map +0 -1
- package/dist/types/StringType.spec.d.ts +0 -1
- package/dist/types/StringType.spec.js +0 -12
- package/dist/types/StringType.spec.js.map +0 -1
- package/dist/types/VoidType.spec.d.ts +0 -1
- package/dist/types/VoidType.spec.js +0 -12
- package/dist/types/VoidType.spec.js.map +0 -1
- /package/dist/{astUtils/creators.spec.d.ts → lsp/worker/run.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginInterface.js","sourceRoot":"","sources":["../src/PluginInterface.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"PluginInterface.js","sourceRoot":"","sources":["../src/PluginInterface.ts"],"names":[],"mappings":"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"}
|
package/dist/Program.d.ts
CHANGED
|
@@ -1,44 +1,48 @@
|
|
|
1
|
-
import type { CodeAction,
|
|
2
|
-
import {
|
|
3
|
-
import type { BsConfig } from './BsConfig';
|
|
1
|
+
import type { CodeAction, Position, Range, SignatureInformation, Location, DocumentSymbol, CancellationToken, SelectionRange } from 'vscode-languageserver';
|
|
2
|
+
import type { BsConfig, FinalizedBsConfig } from './BsConfig';
|
|
4
3
|
import { Scope } from './Scope';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import type { BsDiagnostic, FileReference, FileObj, BscFile, SemanticToken } from './interfaces';
|
|
4
|
+
import type { NamespaceContainer, NamespaceFileContribution } from './Scope';
|
|
5
|
+
import type { FileObj, SemanticToken, FileLink, Hover } from './interfaces';
|
|
8
6
|
import { XmlScope } from './XmlScope';
|
|
9
|
-
import { Logger } from './
|
|
7
|
+
import type { Logger } from './logging';
|
|
10
8
|
import PluginInterface from './PluginInterface';
|
|
11
|
-
import type { FunctionStatement
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
9
|
+
import type { FunctionStatement } from './parser/Statement';
|
|
10
|
+
import { Editor } from './astUtils/Editor';
|
|
11
|
+
import type { FileData } from './files/LazyFileData';
|
|
12
|
+
import type { UnresolvedSymbol } from './AstValidationSegmenter';
|
|
13
|
+
import type { BscFile } from './files/BscFile';
|
|
14
|
+
import { CrossScopeValidator } from './CrossScopeValidator';
|
|
15
|
+
import { DiagnosticManager } from './DiagnosticManager';
|
|
16
|
+
import type { ProvidedSymbolInfo, BrsFile } from './files/BrsFile';
|
|
17
|
+
import type { XmlFile } from './files/XmlFile';
|
|
18
|
+
import type { Statement } from './parser/AstNode';
|
|
21
19
|
export interface SignatureInfoObj {
|
|
22
20
|
index: number;
|
|
23
21
|
key: string;
|
|
24
22
|
signature: SignatureInformation;
|
|
25
23
|
}
|
|
26
|
-
export interface FileLink<T> {
|
|
27
|
-
item: T;
|
|
28
|
-
file: BrsFile;
|
|
29
|
-
}
|
|
30
24
|
export declare class Program {
|
|
31
|
-
/**
|
|
32
|
-
* The root directory for this program
|
|
33
|
-
*/
|
|
34
|
-
options: BsConfig;
|
|
35
25
|
constructor(
|
|
36
26
|
/**
|
|
37
27
|
* The root directory for this program
|
|
38
28
|
*/
|
|
39
|
-
options: BsConfig, logger?: Logger, plugins?: PluginInterface);
|
|
29
|
+
options: BsConfig, logger?: Logger, plugins?: PluginInterface, diagnosticsManager?: DiagnosticManager);
|
|
30
|
+
options: FinalizedBsConfig;
|
|
40
31
|
logger: Logger;
|
|
32
|
+
/**
|
|
33
|
+
* An editor that plugins can use to modify program-level things during the build flow. Don't use this to edit files (they have their own `.editor`)
|
|
34
|
+
*/
|
|
35
|
+
editor: Editor;
|
|
36
|
+
/**
|
|
37
|
+
* A factory that creates `File` instances
|
|
38
|
+
*/
|
|
39
|
+
private fileFactory;
|
|
41
40
|
private createGlobalScope;
|
|
41
|
+
private recursivelyAddNodeToSymbolTable;
|
|
42
|
+
/**
|
|
43
|
+
* Do all setup required for the global symbol table.
|
|
44
|
+
*/
|
|
45
|
+
private populateGlobalSymbolTable;
|
|
42
46
|
/**
|
|
43
47
|
* A graph of all files and their dependencies.
|
|
44
48
|
* For example:
|
|
@@ -46,7 +50,7 @@ export declare class Program {
|
|
|
46
50
|
* lib2.brs -> [lib3.brs] //via an import statement
|
|
47
51
|
*/
|
|
48
52
|
private dependencyGraph;
|
|
49
|
-
|
|
53
|
+
diagnostics: DiagnosticManager;
|
|
50
54
|
/**
|
|
51
55
|
* A scope that contains all built-in global functions.
|
|
52
56
|
* All scopes should directly or indirectly inherit from this scope
|
|
@@ -56,30 +60,90 @@ export declare class Program {
|
|
|
56
60
|
* Plugins which can provide extra diagnostics or transform AST
|
|
57
61
|
*/
|
|
58
62
|
plugins: PluginInterface;
|
|
63
|
+
private fileSymbolInformation;
|
|
64
|
+
private currentScopeValidationOptions;
|
|
59
65
|
/**
|
|
60
|
-
*
|
|
61
|
-
* Should only be set from `this.validate()`
|
|
66
|
+
* Map of typetime symbols which depend upon the key symbol
|
|
62
67
|
*/
|
|
63
|
-
private
|
|
68
|
+
private symbolDependencies;
|
|
69
|
+
/**
|
|
70
|
+
* Symbol Table for storing custom component types
|
|
71
|
+
* This is a sibling to the global table (as Components can be used/referenced anywhere)
|
|
72
|
+
* Keeping custom components out of the global table and in a specific symbol table
|
|
73
|
+
* compartmentalizes their use
|
|
74
|
+
*/
|
|
75
|
+
private componentsTable;
|
|
76
|
+
addFileSymbolInfo(file: BrsFile): void;
|
|
77
|
+
getFileSymbolInfo(file: BrsFile): {
|
|
78
|
+
provides: ProvidedSymbolInfo;
|
|
79
|
+
requires: UnresolvedSymbol[];
|
|
80
|
+
};
|
|
64
81
|
/**
|
|
65
82
|
* The path to bslib.brs (the BrightScript runtime for certain BrighterScript features)
|
|
66
83
|
*/
|
|
67
|
-
get bslibPkgPath():
|
|
84
|
+
get bslibPkgPath(): string;
|
|
68
85
|
get bslibPrefix(): "rokucommunity_bslib" | "bslib";
|
|
69
86
|
/**
|
|
70
|
-
* A map of every file loaded
|
|
87
|
+
* A map of every file loaded into this program, indexed by its original file location
|
|
88
|
+
*/
|
|
89
|
+
files: Record<string, BscFile>;
|
|
90
|
+
/**
|
|
91
|
+
* A map of every file loaded into this program, indexed by its destPath
|
|
92
|
+
*/
|
|
93
|
+
private destMap;
|
|
94
|
+
/**
|
|
95
|
+
* Plugins can contribute multiple virtual files for a single physical file.
|
|
96
|
+
* This collection links the virtual files back to the physical file that produced them.
|
|
97
|
+
* The key is the standardized and lower-cased srcPath
|
|
98
|
+
*/
|
|
99
|
+
private fileClusters;
|
|
100
|
+
/**
|
|
101
|
+
* Map from a lower-cased namespace name part to the set of `BrsFile`s that contribute
|
|
102
|
+
* to it. Built lazily, invalidated whenever any file is added, removed, or re-parsed
|
|
103
|
+
* (`setFile` and `removeFile` both clear it).
|
|
104
|
+
*
|
|
105
|
+
* Used by `ScopeNamespaceLookup` to resolve a namespace name to its contributing
|
|
106
|
+
* files in O(1), then intersect against the scope's file set.
|
|
107
|
+
*/
|
|
108
|
+
private namespaceContributors;
|
|
109
|
+
/**
|
|
110
|
+
* Look up the set of `BrsFile`s that declare any part of the given namespace name
|
|
111
|
+
* (lowercased). Returns `undefined` when no file contributes.
|
|
112
|
+
* @internal
|
|
71
113
|
*/
|
|
72
|
-
|
|
114
|
+
protected getNamespaceContributors(namespaceNameLower: string): Set<BrsFile> | undefined;
|
|
115
|
+
private buildNamespaceContributors;
|
|
73
116
|
/**
|
|
74
|
-
*
|
|
117
|
+
* Cached slow-path namespace aggregates, keyed by `(nameLower, sorted-contributor-pkgPaths)`.
|
|
118
|
+
* Two scopes with the same in-scope file set for a multi-contributor namespace share
|
|
119
|
+
* the same aggregate object (and therefore the same merged statement collections and
|
|
120
|
+
* symbolTable instance). Built lazily, invalidated alongside `namespaceContributors`.
|
|
121
|
+
*
|
|
122
|
+
* The aggregate is stored as a `NamespaceContainer` whose `namespaces` field is an
|
|
123
|
+
* empty Map: scopes always wrap the aggregate before returning to plugins, and the
|
|
124
|
+
* wrapper supplies its own scope-filtered children. Plugins never see the aggregate
|
|
125
|
+
* directly.
|
|
75
126
|
*/
|
|
76
|
-
private
|
|
127
|
+
private aggregateNamespaceContainerCache;
|
|
77
128
|
/**
|
|
78
|
-
* Get
|
|
129
|
+
* Get or build the shared aggregate for a namespace whose in-scope contributors
|
|
130
|
+
* include more than one file. The aggregate's heavy fields are computed once per
|
|
131
|
+
* unique `(nameLower, contributing-files-set)` and reused across every scope that
|
|
132
|
+
* sees the same set.
|
|
133
|
+
* @internal
|
|
79
134
|
*/
|
|
80
|
-
|
|
135
|
+
protected getAggregateNamespaceContainer(nameLower: string, contributions: NamespaceFileContribution[]): NamespaceContainer;
|
|
136
|
+
private buildAggregateNamespaceContainer;
|
|
137
|
+
/**
|
|
138
|
+
* Invalidate the program-level namespace contributors map and the slow-path aggregate
|
|
139
|
+
* cache. Called by `setFile` and `removeFile`; downstream scope namespace lookups
|
|
140
|
+
* already rebuild via the dependency-graph invalidation chain, so this only needs
|
|
141
|
+
* to drop the cached maps.
|
|
142
|
+
*/
|
|
143
|
+
private invalidateNamespaceContributorCache;
|
|
81
144
|
private scopes;
|
|
82
145
|
protected addScope(scope: Scope): void;
|
|
146
|
+
protected removeScope(scope: Scope): void;
|
|
83
147
|
/**
|
|
84
148
|
* A map of every component currently loaded into the program, indexed by the component name.
|
|
85
149
|
* It is a compile-time error to have multiple components with the same name. However, we store an array of components
|
|
@@ -94,6 +158,15 @@ export declare class Program {
|
|
|
94
158
|
file: XmlFile;
|
|
95
159
|
scope: XmlScope;
|
|
96
160
|
};
|
|
161
|
+
/**
|
|
162
|
+
* Get the sorted names of custom components
|
|
163
|
+
*/
|
|
164
|
+
getSortedComponentNames(): string[];
|
|
165
|
+
/**
|
|
166
|
+
* Keeps a set of all the components that need to have their types updated during the current validation cycle
|
|
167
|
+
* Map <componentKey, componentName>
|
|
168
|
+
*/
|
|
169
|
+
private componentSymbolsToUpdate;
|
|
97
170
|
/**
|
|
98
171
|
* Register (or replace) the reference to a component in the component map
|
|
99
172
|
*/
|
|
@@ -102,6 +175,26 @@ export declare class Program {
|
|
|
102
175
|
* Remove the specified component from the components map
|
|
103
176
|
*/
|
|
104
177
|
private unregisterComponent;
|
|
178
|
+
/**
|
|
179
|
+
* Adds a component described in an XML to the set of components that needs to be updated this validation cycle.
|
|
180
|
+
* @param xmlFile XML file with <component> tag
|
|
181
|
+
*/
|
|
182
|
+
private addDeferredComponentTypeSymbolCreation;
|
|
183
|
+
private getComponentKey;
|
|
184
|
+
/**
|
|
185
|
+
* Resolves symbol table with the first component in this.components to have the same name as the component in the file
|
|
186
|
+
* @param componentKey key getting a component from `this.components`
|
|
187
|
+
* @param componentName the unprefixed name of the component that will be added (e.g. 'MyLabel' NOT 'roSgNodeMyLabel')
|
|
188
|
+
*/
|
|
189
|
+
private updateComponentSymbolInGlobalScope;
|
|
190
|
+
/**
|
|
191
|
+
* Adds a reference type to the global symbol table with the first component in this.components to have the same name as the component in the file
|
|
192
|
+
* This is so on a first validation, these types can be resolved in teh future (eg. when the actual component is created)
|
|
193
|
+
* If we don't add reference types at this top level, they will be created at the file level, and will never get resolved
|
|
194
|
+
* @param componentKey key getting a component from `this.components`
|
|
195
|
+
* @param componentName the unprefixed name of the component that will be added (e.g. 'MyLabel' NOT 'roSgNodeMyLabel')
|
|
196
|
+
*/
|
|
197
|
+
private addComponentReferenceType;
|
|
105
198
|
/**
|
|
106
199
|
* re-attach the dependency graph with a new key for any component who changed
|
|
107
200
|
* their position in their own named array (only matters when there are multiple
|
|
@@ -112,24 +205,22 @@ export declare class Program {
|
|
|
112
205
|
* Get a list of all files that are included in the project but are not referenced
|
|
113
206
|
* by any scope in the program.
|
|
114
207
|
*/
|
|
115
|
-
getUnreferencedFiles():
|
|
208
|
+
getUnreferencedFiles(): BscFile[];
|
|
116
209
|
/**
|
|
117
|
-
* Get the list of errors for the entire program.
|
|
118
|
-
* by walking through every file, so call this sparingly.
|
|
210
|
+
* Get the list of errors for the entire program.
|
|
119
211
|
*/
|
|
120
|
-
getDiagnostics(): BsDiagnostic[];
|
|
121
|
-
addDiagnostics(diagnostics: BsDiagnostic[]): void;
|
|
212
|
+
getDiagnostics(): import("./interfaces").BsDiagnostic[];
|
|
122
213
|
/**
|
|
123
214
|
* Determine if the specified file is loaded in this program right now.
|
|
124
|
-
* @param filePath
|
|
215
|
+
* @param filePath the absolute or relative path to the file
|
|
125
216
|
* @param normalizePath should the provided path be normalized before use
|
|
126
217
|
*/
|
|
127
218
|
hasFile(filePath: string, normalizePath?: boolean): boolean;
|
|
128
219
|
/**
|
|
129
220
|
* roku filesystem is case INsensitive, so find the scope by key case insensitive
|
|
130
|
-
* @param scopeName
|
|
221
|
+
* @param scopeName xml scope names are their `destPath`. Source scope is stored with the key `"source"`
|
|
131
222
|
*/
|
|
132
|
-
getScopeByName(scopeName: string): Scope;
|
|
223
|
+
getScopeByName(scopeName: string): Scope | undefined;
|
|
133
224
|
/**
|
|
134
225
|
* Return all scopes
|
|
135
226
|
*/
|
|
@@ -149,16 +240,34 @@ export declare class Program {
|
|
|
149
240
|
/**
|
|
150
241
|
* Load a file into the program. If that file already exists, it is replaced.
|
|
151
242
|
* If file contents are provided, those are used, Otherwise, the file is loaded from the file system
|
|
152
|
-
* @param srcDestOrPkgPath the absolute path,
|
|
153
|
-
* @param
|
|
243
|
+
* @param srcDestOrPkgPath the absolute path, the pkg path (i.e. `pkg:/path/to/file.brs`), or the destPath (i.e. `path/to/file.brs` relative to `pkg:/`)
|
|
244
|
+
* @param fileData the file contents. omit or pass `undefined` to prevent loading the data at this time
|
|
154
245
|
*/
|
|
155
|
-
setFile<T extends BscFile>(srcDestOrPkgPath: string,
|
|
246
|
+
setFile<T extends BscFile>(srcDestOrPkgPath: string, fileData?: FileData): T;
|
|
156
247
|
/**
|
|
157
248
|
* Load a file into the program. If that file already exists, it is replaced.
|
|
158
249
|
* @param fileEntry an object that specifies src and dest for the file.
|
|
159
|
-
* @param
|
|
250
|
+
* @param fileData the file contents. omit or pass `undefined` to prevent loading the data at this time
|
|
251
|
+
*/
|
|
252
|
+
setFile<T extends BscFile>(fileEntry: FileObj, fileData: FileData): T;
|
|
253
|
+
/**
|
|
254
|
+
* Given a srcPath, a destPath, or both, resolve whichever is missing, relative to rootDir.
|
|
255
|
+
* @param fileParam an object representing file paths
|
|
256
|
+
* @param rootDir must be a pre-normalized path
|
|
257
|
+
*/
|
|
258
|
+
private getPaths;
|
|
259
|
+
/**
|
|
260
|
+
* Remove any leading `pkg:/` found in the path
|
|
261
|
+
*/
|
|
262
|
+
private removePkgPrefix;
|
|
263
|
+
/**
|
|
264
|
+
* Is this file a .brs file found somewhere within the `pkg:/source/` folder?
|
|
160
265
|
*/
|
|
161
|
-
|
|
266
|
+
private isSourceBrsFile;
|
|
267
|
+
/**
|
|
268
|
+
* Is this file a .brs file found somewhere within the `pkg:/source/` folder?
|
|
269
|
+
*/
|
|
270
|
+
private isComponentsXmlFile;
|
|
162
271
|
/**
|
|
163
272
|
* Ensure source scope is created.
|
|
164
273
|
* Note: automatically called internally, and no-op if it exists already.
|
|
@@ -166,114 +275,209 @@ export declare class Program {
|
|
|
166
275
|
createSourceScope(): void;
|
|
167
276
|
/**
|
|
168
277
|
* Remove a set of files from the program
|
|
169
|
-
* @param srcPaths
|
|
278
|
+
* @param srcPaths can be an array of srcPath or destPath strings
|
|
279
|
+
* @param normalizePath should this function repair and standardize the filePaths? Passing false should have a performance boost if you can guarantee your paths are already sanitized
|
|
170
280
|
*/
|
|
171
|
-
removeFiles(srcPaths: string[]): void;
|
|
281
|
+
removeFiles(srcPaths: string[], normalizePath?: boolean): void;
|
|
172
282
|
/**
|
|
173
283
|
* Remove a file from the program
|
|
174
|
-
* @param filePath can be a srcPath, a
|
|
284
|
+
* @param filePath can be a srcPath, a destPath, or a destPath with leading `pkg:/`
|
|
175
285
|
* @param normalizePath should this function repair and standardize the path? Passing false should have a performance boost if you can guarantee your path is already sanitized
|
|
176
|
-
|
|
177
286
|
*/
|
|
178
|
-
removeFile(filePath: string, normalizePath?: boolean): void;
|
|
287
|
+
removeFile(filePath: string, normalizePath?: boolean, keepSymbolInformation?: boolean): void;
|
|
288
|
+
crossScopeValidation: CrossScopeValidator;
|
|
289
|
+
private isFirstValidation;
|
|
290
|
+
private validationDetails;
|
|
291
|
+
lastValidationInfo: {
|
|
292
|
+
brsFilesSrcPath: Set<string>;
|
|
293
|
+
xmlFilesSrcPath: Set<string>;
|
|
294
|
+
scopeNames: Set<string>;
|
|
295
|
+
componentsRebuilt: Set<string>;
|
|
296
|
+
};
|
|
297
|
+
/**
|
|
298
|
+
* Counter used to track which validation run is being logged
|
|
299
|
+
*/
|
|
300
|
+
private validationRunSequence;
|
|
179
301
|
/**
|
|
180
|
-
*
|
|
181
|
-
* @param folderSrcPath The absolute path to the folder on disk
|
|
182
|
-
* @param normalizePath should the provided path be normalized before use?
|
|
302
|
+
* How many milliseconds can pass while doing synchronous operations in validate before we register a short timeout (i.e. yield to the event loop)
|
|
183
303
|
*/
|
|
184
|
-
|
|
304
|
+
private validationMinSyncDuration;
|
|
305
|
+
private validatePromise;
|
|
185
306
|
/**
|
|
186
307
|
* Traverse the entire project, and validate all scopes
|
|
187
|
-
* @param force - if true, then all scopes are force to validate, even if they aren't marked as dirty
|
|
188
308
|
*/
|
|
189
309
|
validate(): void;
|
|
310
|
+
validate(options: {
|
|
311
|
+
async: false;
|
|
312
|
+
cancellationToken?: CancellationToken;
|
|
313
|
+
}): void;
|
|
314
|
+
validate(options: {
|
|
315
|
+
async: true;
|
|
316
|
+
cancellationToken?: CancellationToken;
|
|
317
|
+
}): Promise<void>;
|
|
318
|
+
private getScopesForCrossScopeValidation;
|
|
319
|
+
private doesXmlFileRequireProvidedSymbols;
|
|
190
320
|
/**
|
|
191
321
|
* Flag all duplicate component names
|
|
192
322
|
*/
|
|
193
323
|
private detectDuplicateComponentNames;
|
|
194
324
|
/**
|
|
195
|
-
*
|
|
325
|
+
* Get the files for a list of filePaths
|
|
326
|
+
* @param filePaths can be an array of srcPath or a destPath strings
|
|
327
|
+
* @param normalizePath should this function repair and standardize the paths? Passing false should have a performance boost if you can guarantee your paths are already sanitized
|
|
196
328
|
*/
|
|
197
|
-
|
|
329
|
+
getFiles<T extends BscFile>(filePaths: string[], normalizePath?: boolean): T[];
|
|
330
|
+
private getFilePathCache;
|
|
198
331
|
/**
|
|
199
332
|
* Get the file at the given path
|
|
200
|
-
* @param filePath can be a srcPath
|
|
333
|
+
* @param filePath can be a srcPath or a destPath
|
|
201
334
|
* @param normalizePath should this function repair and standardize the path? Passing false should have a performance boost if you can guarantee your path is already sanitized
|
|
202
335
|
*/
|
|
203
336
|
getFile<T extends BscFile>(filePath: string, normalizePath?: boolean): T;
|
|
337
|
+
private sortedScopeNames;
|
|
338
|
+
/**
|
|
339
|
+
* Gets a sorted list of all scopeNames, always beginning with "global", "source", then any others in alphabetical order
|
|
340
|
+
*/
|
|
341
|
+
private getSortedScopeNames;
|
|
204
342
|
/**
|
|
205
343
|
* Get a list of all scopes the file is loaded into
|
|
206
|
-
* @param file
|
|
344
|
+
* @param file the file
|
|
345
|
+
*/
|
|
346
|
+
getScopesForFile(file: BscFile | string): Scope[];
|
|
347
|
+
/**
|
|
348
|
+
* Get the first found scope for a file.
|
|
207
349
|
*/
|
|
208
|
-
|
|
350
|
+
getFirstScopeForFile(file: BscFile): Scope | undefined;
|
|
209
351
|
getStatementsByName(name: string, originFile: BrsFile, namespaceName?: string): FileLink<Statement>[];
|
|
210
352
|
getStatementsForXmlFile(scope: XmlScope, filterName?: string): FileLink<FunctionStatement>[];
|
|
211
353
|
/**
|
|
212
354
|
* Find all available completion items at the given position
|
|
213
|
-
* @param
|
|
214
|
-
* @param
|
|
215
|
-
* @param columnIndex
|
|
355
|
+
* @param filePath can be a srcPath or a destPath
|
|
356
|
+
* @param position the position (line & column) where completions should be found
|
|
216
357
|
*/
|
|
217
|
-
getCompletions(
|
|
358
|
+
getCompletions(filePath: string, position: Position): import("vscode-languageserver-types").CompletionItem[];
|
|
218
359
|
/**
|
|
219
360
|
* Goes through each file and builds a list of workspace symbols for the program. Used by LanguageServer's onWorkspaceSymbol functionality
|
|
220
361
|
*/
|
|
221
|
-
getWorkspaceSymbols():
|
|
362
|
+
getWorkspaceSymbols(): import("vscode-languageserver-types").WorkspaceSymbol[];
|
|
222
363
|
/**
|
|
223
364
|
* Given a position in a file, if the position is sitting on some type of identifier,
|
|
224
365
|
* go to the definition of that identifier (where this thing was first defined)
|
|
225
|
-
* @param srcPath The absolute path to the source file on disk
|
|
226
366
|
*/
|
|
227
367
|
getDefinition(srcPath: string, position: Position): Location[];
|
|
228
368
|
/**
|
|
229
|
-
*
|
|
369
|
+
* Get hover information for a file and position
|
|
370
|
+
*/
|
|
371
|
+
getHover(srcPath: string, position: Position): Hover[];
|
|
372
|
+
/**
|
|
373
|
+
* Get full list of document symbols for a file
|
|
374
|
+
* @param srcPath path to the file
|
|
230
375
|
*/
|
|
231
|
-
|
|
376
|
+
getDocumentSymbols(srcPath: string): DocumentSymbol[] | undefined;
|
|
377
|
+
/**
|
|
378
|
+
* Get the selection ranges for the given positions in a file. Used for expand/shrink selection.
|
|
379
|
+
* @param srcPath path to the file
|
|
380
|
+
* @param positions the positions to get selection ranges for
|
|
381
|
+
*/
|
|
382
|
+
getSelectionRanges(srcPath: string, positions: Position[]): SelectionRange[];
|
|
232
383
|
/**
|
|
233
384
|
* Compute code actions for the given file and range
|
|
234
|
-
* @param srcPath The absolute path to the source file on disk
|
|
235
385
|
*/
|
|
236
386
|
getCodeActions(srcPath: string, range: Range): CodeAction[];
|
|
387
|
+
/**
|
|
388
|
+
* Compute "source fix all" code actions for the given file.
|
|
389
|
+
* Fires the `onGetSourceFixAllCodeActions` plugin event with all diagnostics for the file (no range filter),
|
|
390
|
+
* then converts each contributed SourceFixAllCodeAction into an LSP CodeAction.
|
|
391
|
+
*/
|
|
392
|
+
getSourceFixAllCodeActions(srcPath: string): CodeAction[];
|
|
237
393
|
/**
|
|
238
394
|
* Get semantic tokens for the specified file
|
|
239
395
|
*/
|
|
240
|
-
getSemanticTokens(srcPath: string): SemanticToken[];
|
|
241
|
-
getSignatureHelp(
|
|
242
|
-
|
|
243
|
-
private getPartialItemCounts;
|
|
396
|
+
getSemanticTokens(srcPath: string): SemanticToken[] | undefined;
|
|
397
|
+
getSignatureHelp(filePath: string, position: Position): SignatureInfoObj[];
|
|
398
|
+
getReferences(srcPath: string, position: Position): Location[];
|
|
244
399
|
/**
|
|
245
|
-
*
|
|
400
|
+
* Transpile a single file and get the result as a string.
|
|
401
|
+
* This does not write anything to the file system.
|
|
402
|
+
*
|
|
403
|
+
* This should only be called by `LanguageServer`.
|
|
404
|
+
* Internal usage should call `_getTranspiledFileContents` instead.
|
|
405
|
+
* @param filePath can be a srcPath or a destPath
|
|
246
406
|
*/
|
|
247
|
-
|
|
407
|
+
getTranspiledFileContents(filePath: string): Promise<FileTranspileResult>;
|
|
408
|
+
private getTranspiledFileContentsPipeline;
|
|
248
409
|
/**
|
|
249
|
-
* Get
|
|
250
|
-
* @param sourcePkgPath - the pkgPath of the source that wants to resolve script imports.
|
|
410
|
+
* Get the absolute output path for a file
|
|
251
411
|
*/
|
|
252
|
-
|
|
412
|
+
private getOutputPath;
|
|
413
|
+
private getOutDir;
|
|
253
414
|
/**
|
|
254
|
-
*
|
|
255
|
-
*
|
|
256
|
-
* @param srcPath The absolute path to the source file on disk
|
|
415
|
+
* Prepare the program for building
|
|
416
|
+
* @param files the list of files that should be prepared
|
|
257
417
|
*/
|
|
258
|
-
|
|
259
|
-
srcPath: string;
|
|
260
|
-
pkgPath: string;
|
|
261
|
-
code: string;
|
|
262
|
-
map: import("source-map").SourceMapGenerator;
|
|
263
|
-
};
|
|
264
|
-
transpile(fileEntries: FileObj[], stagingFolderPath: string): Promise<void>;
|
|
418
|
+
private prepare;
|
|
265
419
|
/**
|
|
266
|
-
*
|
|
420
|
+
* Generate the contents of every file
|
|
267
421
|
*/
|
|
268
|
-
|
|
422
|
+
private serialize;
|
|
423
|
+
/**
|
|
424
|
+
* Write the entire project to disk
|
|
425
|
+
*/
|
|
426
|
+
private write;
|
|
427
|
+
private buildPipeline;
|
|
428
|
+
/**
|
|
429
|
+
* Build the project. This transpiles/transforms/copies all files and moves them to the staging directory
|
|
430
|
+
* @param options the list of options used to build the program
|
|
431
|
+
*/
|
|
432
|
+
build(options?: ProgramBuildOptions): Promise<void>;
|
|
269
433
|
/**
|
|
270
434
|
* Find a list of files in the program that have a function with the given name (case INsensitive)
|
|
271
435
|
*/
|
|
272
|
-
|
|
436
|
+
findFilesForFunction(functionName: string): BscFile[];
|
|
273
437
|
/**
|
|
274
|
-
*
|
|
438
|
+
* Find a list of files in the program that have a class with the given name (case INsensitive)
|
|
275
439
|
*/
|
|
276
|
-
|
|
440
|
+
findFilesForClass(className: string): BscFile[];
|
|
441
|
+
findFilesForNamespace(name: string): BscFile[];
|
|
442
|
+
findFilesForEnum(name: string): BscFile[];
|
|
277
443
|
private _manifest;
|
|
444
|
+
/**
|
|
445
|
+
* The absolute source path to the manifest file. Set when loadManifest is called.
|
|
446
|
+
*/
|
|
447
|
+
manifestPath: string;
|
|
448
|
+
/**
|
|
449
|
+
* Modify a parsed manifest map by reading `bs_const` and injecting values from `options.manifest.bs_const`
|
|
450
|
+
* @param parsedManifest The manifest map to read from and modify
|
|
451
|
+
*/
|
|
452
|
+
private buildBsConstsIntoParsedManifest;
|
|
453
|
+
/**
|
|
454
|
+
* Try to find and load the manifest into memory
|
|
455
|
+
* @param manifestFileObj A pointer to a potential manifest file object found during loading
|
|
456
|
+
* @param replaceIfAlreadyLoaded should we overwrite the internal `_manifest` if it already exists
|
|
457
|
+
*/
|
|
458
|
+
loadManifest(manifestFileObj?: FileObj, replaceIfAlreadyLoaded?: boolean): void;
|
|
459
|
+
/**
|
|
460
|
+
* Get a map of the manifest information
|
|
461
|
+
*/
|
|
462
|
+
getManifest(): Map<string, string>;
|
|
278
463
|
dispose(): void;
|
|
279
464
|
}
|
|
465
|
+
export interface FileTranspileResult {
|
|
466
|
+
srcPath: string;
|
|
467
|
+
destPath: string;
|
|
468
|
+
pkgPath: string;
|
|
469
|
+
code: string;
|
|
470
|
+
map: string;
|
|
471
|
+
typedef: string;
|
|
472
|
+
}
|
|
473
|
+
export interface ProgramBuildOptions {
|
|
474
|
+
/**
|
|
475
|
+
* The directory where the final built files should be placed. This directory will be cleared before running
|
|
476
|
+
*/
|
|
477
|
+
outDir?: string;
|
|
478
|
+
/**
|
|
479
|
+
* An array of files to build. If omitted, the entire list of files from the program will be used instead.
|
|
480
|
+
* Typically you will want to leave this blank
|
|
481
|
+
*/
|
|
482
|
+
files?: BscFile[];
|
|
483
|
+
}
|