brighterscript 1.0.0-alpha.5 → 1.0.0-alpha.50
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 +76 -138
- package/bsconfig.schema.json +121 -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 +72 -39
- 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 +12 -4
- package/dist/CodeActionUtil.js +22 -5
- package/dist/CodeActionUtil.js.map +1 -1
- package/dist/CommentFlagProcessor.d.ts +7 -6
- package/dist/CommentFlagProcessor.js +11 -8
- package/dist/CommentFlagProcessor.js.map +1 -1
- package/dist/CrossScopeValidator.d.ts +68 -0
- package/dist/CrossScopeValidator.js +642 -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 +82 -0
- package/dist/DiagnosticManager.js +406 -0
- package/dist/DiagnosticManager.js.map +1 -0
- package/dist/DiagnosticMessages.d.ts +558 -196
- package/dist/DiagnosticMessages.js +870 -340
- 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 +100 -105
- package/dist/LanguageServer.js +444 -745
- 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 +241 -98
- package/dist/Program.js +1432 -717
- package/dist/Program.js.map +1 -1
- package/dist/ProgramBuilder.d.ts +47 -23
- package/dist/ProgramBuilder.js +224 -178
- package/dist/ProgramBuilder.js.map +1 -1
- package/dist/Scope.d.ts +149 -109
- package/dist/Scope.js +557 -550
- package/dist/Scope.js.map +1 -1
- 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 +136 -24
- package/dist/SymbolTable.js +565 -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 +334 -0
- package/dist/astUtils/CachedLookups.js.map +1 -0
- package/dist/astUtils/CachedLookups.spec.js +39 -0
- package/dist/astUtils/CachedLookups.spec.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/Editor.spec.js +258 -0
- package/dist/astUtils/Editor.spec.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/creators.spec.js +5 -5
- package/dist/astUtils/creators.spec.js.map +1 -1
- package/dist/astUtils/reflection.d.ts +196 -85
- package/dist/astUtils/reflection.js +497 -144
- package/dist/astUtils/reflection.js.map +1 -1
- package/dist/astUtils/reflection.spec.js +267 -167
- package/dist/astUtils/reflection.spec.js.map +1 -1
- package/dist/astUtils/stackedVisitor.js.map +1 -1
- package/dist/astUtils/stackedVisitor.spec.js +14 -14
- package/dist/astUtils/stackedVisitor.spec.js.map +1 -1
- package/dist/astUtils/visitors.d.ts +116 -53
- package/dist/astUtils/visitors.js +95 -15
- package/dist/astUtils/visitors.js.map +1 -1
- package/dist/astUtils/visitors.spec.js +629 -51
- package/dist/astUtils/visitors.spec.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 +24 -4
- package/dist/bscPlugin/BscPlugin.js +88 -4
- package/dist/bscPlugin/BscPlugin.js.map +1 -1
- package/dist/bscPlugin/CallExpressionInfo.d.ts +36 -0
- package/dist/bscPlugin/CallExpressionInfo.js +143 -0
- package/dist/bscPlugin/CallExpressionInfo.js.map +1 -0
- package/dist/bscPlugin/FileWriter.d.ts +6 -0
- package/dist/bscPlugin/FileWriter.js +24 -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 +6 -5
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.js +173 -27
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.js.map +1 -1
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js +138 -21
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js.map +1 -1
- 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/completions/CompletionsProcessor.spec.js +2512 -0
- package/dist/bscPlugin/completions/CompletionsProcessor.spec.js.map +1 -0
- package/dist/bscPlugin/definition/DefinitionProvider.d.ts +13 -0
- package/dist/bscPlugin/definition/DefinitionProvider.js +212 -0
- package/dist/bscPlugin/definition/DefinitionProvider.js.map +1 -0
- package/dist/bscPlugin/definition/DefinitionProvider.spec.js +87 -0
- package/dist/bscPlugin/definition/DefinitionProvider.spec.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 +230 -0
- package/dist/bscPlugin/hover/HoverProcessor.js.map +1 -0
- package/dist/bscPlugin/hover/HoverProcessor.spec.js +991 -0
- package/dist/bscPlugin/hover/HoverProcessor.spec.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/references/ReferencesProvider.spec.d.ts +1 -0
- package/dist/bscPlugin/references/ReferencesProvider.spec.js +51 -0
- package/dist/bscPlugin/references/ReferencesProvider.spec.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/semanticTokens/BrsFileSemanticTokensProcessor.spec.d.ts +1 -0
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.spec.js +564 -0
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.spec.js.map +1 -0
- package/dist/bscPlugin/serialize/BslibInjector.spec.d.ts +1 -0
- package/dist/bscPlugin/serialize/BslibInjector.spec.js +33 -0
- package/dist/bscPlugin/serialize/BslibInjector.spec.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 +75 -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/DocumentSymbolProcessor.spec.d.ts +1 -0
- package/dist/bscPlugin/symbols/DocumentSymbolProcessor.spec.js +291 -0
- package/dist/bscPlugin/symbols/DocumentSymbolProcessor.spec.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/WorkspaceSymbolProcessor.spec.d.ts +1 -0
- package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.spec.js +245 -0
- package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.spec.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 +27 -0
- package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.js +418 -0
- package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.js.map +1 -0
- package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.spec.d.ts +1 -0
- package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.spec.js +75 -0
- package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.spec.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 +37 -0
- package/dist/bscPlugin/validation/BrsFileValidator.js +638 -0
- package/dist/bscPlugin/validation/BrsFileValidator.js.map +1 -0
- package/dist/bscPlugin/validation/BrsFileValidator.spec.d.ts +1 -0
- package/dist/bscPlugin/validation/BrsFileValidator.spec.js +1517 -0
- package/dist/bscPlugin/validation/BrsFileValidator.spec.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 +141 -0
- package/dist/bscPlugin/validation/ScopeValidator.js +1323 -0
- package/dist/bscPlugin/validation/ScopeValidator.js.map +1 -0
- package/dist/bscPlugin/validation/ScopeValidator.spec.d.ts +1 -0
- package/dist/bscPlugin/validation/ScopeValidator.spec.js +6135 -0
- package/dist/bscPlugin/validation/ScopeValidator.spec.js.map +1 -0
- package/dist/bscPlugin/validation/XmlFileValidator.d.ts +8 -0
- package/dist/bscPlugin/validation/XmlFileValidator.js +36 -0
- package/dist/bscPlugin/validation/XmlFileValidator.js.map +1 -0
- package/dist/cli.js +126 -27
- 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/common/Sequencer.spec.d.ts +1 -0
- package/dist/common/Sequencer.spec.js +75 -0
- package/dist/common/Sequencer.spec.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 +10 -3
- package/dist/diagnosticUtils.js +64 -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.Class.spec.js +1213 -259
- package/dist/files/BrsFile.Class.spec.js.map +1 -1
- package/dist/files/BrsFile.d.ts +145 -87
- package/dist/files/BrsFile.js +836 -934
- package/dist/files/BrsFile.js.map +1 -1
- package/dist/files/BrsFile.spec.js +4226 -902
- package/dist/files/BrsFile.spec.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/LazyFileData.spec.d.ts +1 -0
- package/dist/files/LazyFileData.spec.js +27 -0
- package/dist/files/LazyFileData.spec.js.map +1 -0
- package/dist/files/XmlFile.d.ts +80 -41
- package/dist/files/XmlFile.js +161 -137
- package/dist/files/XmlFile.js.map +1 -1
- package/dist/files/XmlFile.spec.js +444 -336
- package/dist/files/XmlFile.spec.js.map +1 -1
- package/dist/files/tests/imports.spec.js +62 -52
- package/dist/files/tests/imports.spec.js.map +1 -1
- package/dist/files/tests/optionalChaning.spec.d.ts +1 -0
- package/dist/files/tests/optionalChaning.spec.js +152 -0
- package/dist/files/tests/optionalChaning.spec.js.map +1 -0
- 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 +942 -125
- package/dist/interfaces.js +21 -0
- package/dist/interfaces.js.map +1 -1
- package/dist/lexer/Character.spec.js +5 -5
- package/dist/lexer/Character.spec.js.map +1 -1
- package/dist/lexer/Lexer.d.ts +51 -12
- package/dist/lexer/Lexer.js +215 -65
- package/dist/lexer/Lexer.js.map +1 -1
- package/dist/lexer/Lexer.spec.js +812 -568
- package/dist/lexer/Lexer.spec.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 +40 -2
- package/dist/lexer/TokenKind.js +147 -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/ActionQueue.spec.d.ts +1 -0
- package/dist/lsp/ActionQueue.spec.js +80 -0
- package/dist/lsp/ActionQueue.spec.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/DocumentManager.spec.d.ts +1 -0
- package/dist/lsp/DocumentManager.spec.js +103 -0
- package/dist/lsp/DocumentManager.spec.js.map +1 -0
- package/dist/lsp/LspProject.d.ts +239 -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/PathFilterer.spec.d.ts +1 -0
- package/dist/lsp/PathFilterer.spec.js +182 -0
- package/dist/lsp/PathFilterer.spec.js.map +1 -0
- package/dist/lsp/Project.d.ts +168 -0
- package/dist/lsp/Project.js +437 -0
- package/dist/lsp/Project.js.map +1 -0
- package/dist/lsp/Project.spec.d.ts +1 -0
- package/dist/lsp/Project.spec.js +267 -0
- package/dist/lsp/Project.spec.js.map +1 -0
- package/dist/lsp/ProjectManager.d.ts +242 -0
- package/dist/lsp/ProjectManager.js +824 -0
- package/dist/lsp/ProjectManager.js.map +1 -0
- package/dist/lsp/ProjectManager.spec.d.ts +1 -0
- package/dist/lsp/ProjectManager.spec.js +913 -0
- package/dist/lsp/ProjectManager.spec.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/MessageHandler.spec.d.ts +1 -0
- package/dist/lsp/worker/MessageHandler.spec.js +64 -0
- package/dist/lsp/worker/MessageHandler.spec.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/WorkerPool.spec.d.ts +1 -0
- package/dist/lsp/worker/WorkerPool.spec.js +59 -0
- package/dist/lsp/worker/WorkerPool.spec.js.map +1 -0
- package/dist/lsp/worker/WorkerThreadProject.d.ts +143 -0
- package/dist/lsp/worker/WorkerThreadProject.js +189 -0
- package/dist/lsp/worker/WorkerThreadProject.js.map +1 -0
- package/dist/lsp/worker/WorkerThreadProject.spec.d.ts +2 -0
- package/dist/lsp/worker/WorkerThreadProject.spec.js +71 -0
- package/dist/lsp/worker/WorkerThreadProject.spec.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.d.ts +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 +203 -0
- package/dist/parser/AstNode.js +303 -0
- package/dist/parser/AstNode.js.map +1 -0
- package/dist/parser/AstNode.spec.d.ts +1 -0
- package/dist/parser/AstNode.spec.js +1455 -0
- package/dist/parser/AstNode.spec.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/BrightScriptDocParser.spec.d.ts +1 -0
- package/dist/parser/BrightScriptDocParser.spec.js +310 -0
- package/dist/parser/BrightScriptDocParser.spec.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 +553 -221
- package/dist/parser/Expression.js +1414 -505
- package/dist/parser/Expression.js.map +1 -1
- package/dist/parser/Expression.spec.d.ts +1 -0
- package/dist/parser/Expression.spec.js +40 -0
- package/dist/parser/Expression.spec.js.map +1 -0
- package/dist/parser/Parser.Class.spec.js +255 -125
- package/dist/parser/Parser.Class.spec.js.map +1 -1
- package/dist/parser/Parser.d.ts +117 -124
- package/dist/parser/Parser.js +1669 -982
- package/dist/parser/Parser.js.map +1 -1
- package/dist/parser/Parser.spec.d.ts +3 -1
- package/dist/parser/Parser.spec.js +2111 -525
- package/dist/parser/Parser.spec.js.map +1 -1
- package/dist/parser/SGParser.d.ts +29 -13
- package/dist/parser/SGParser.js +85 -56
- package/dist/parser/SGParser.js.map +1 -1
- package/dist/parser/SGParser.spec.js +30 -45
- package/dist/parser/SGParser.spec.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 +849 -267
- package/dist/parser/Statement.js +2412 -625
- package/dist/parser/Statement.js.map +1 -1
- package/dist/parser/Statement.spec.js +133 -36
- package/dist/parser/Statement.spec.js.map +1 -1
- package/dist/parser/TranspileState.d.ts +26 -12
- package/dist/parser/TranspileState.js +115 -24
- package/dist/parser/TranspileState.js.map +1 -1
- package/dist/parser/tests/Parser.spec.d.ts +3 -9
- package/dist/parser/tests/Parser.spec.js +7 -13
- package/dist/parser/tests/Parser.spec.js.map +1 -1
- package/dist/parser/tests/controlFlow/For.spec.js +83 -75
- package/dist/parser/tests/controlFlow/For.spec.js.map +1 -1
- package/dist/parser/tests/controlFlow/ForEach.spec.js +85 -51
- package/dist/parser/tests/controlFlow/ForEach.spec.js.map +1 -1
- package/dist/parser/tests/controlFlow/If.spec.js +382 -239
- package/dist/parser/tests/controlFlow/If.spec.js.map +1 -1
- package/dist/parser/tests/controlFlow/While.spec.js +52 -45
- package/dist/parser/tests/controlFlow/While.spec.js.map +1 -1
- package/dist/parser/tests/expression/Additive.spec.js +51 -43
- package/dist/parser/tests/expression/Additive.spec.js.map +1 -1
- package/dist/parser/tests/expression/ArrayLiterals.spec.js +192 -142
- package/dist/parser/tests/expression/ArrayLiterals.spec.js.map +1 -1
- package/dist/parser/tests/expression/AssociativeArrayLiterals.spec.js +236 -160
- package/dist/parser/tests/expression/AssociativeArrayLiterals.spec.js.map +1 -1
- package/dist/parser/tests/expression/Boolean.spec.js +41 -34
- package/dist/parser/tests/expression/Boolean.spec.js.map +1 -1
- package/dist/parser/tests/expression/Call.spec.js +173 -55
- package/dist/parser/tests/expression/Call.spec.js.map +1 -1
- package/dist/parser/tests/expression/Exponential.spec.js +20 -20
- package/dist/parser/tests/expression/Exponential.spec.js.map +1 -1
- package/dist/parser/tests/expression/Function.spec.js +291 -282
- package/dist/parser/tests/expression/Function.spec.js.map +1 -1
- package/dist/parser/tests/expression/Indexing.spec.js +193 -110
- package/dist/parser/tests/expression/Indexing.spec.js.map +1 -1
- package/dist/parser/tests/expression/Multiplicative.spec.js +42 -42
- package/dist/parser/tests/expression/Multiplicative.spec.js.map +1 -1
- package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js +260 -115
- package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js.map +1 -1
- package/dist/parser/tests/expression/PrefixUnary.spec.js +58 -52
- package/dist/parser/tests/expression/PrefixUnary.spec.js.map +1 -1
- package/dist/parser/tests/expression/Primary.spec.js +76 -60
- package/dist/parser/tests/expression/Primary.spec.js.map +1 -1
- package/dist/parser/tests/expression/RegexLiteralExpression.spec.d.ts +1 -0
- package/dist/parser/tests/expression/RegexLiteralExpression.spec.js +171 -0
- package/dist/parser/tests/expression/RegexLiteralExpression.spec.js.map +1 -0
- package/dist/parser/tests/expression/Relational.spec.js +50 -50
- package/dist/parser/tests/expression/Relational.spec.js.map +1 -1
- package/dist/parser/tests/expression/SourceLiteralExpression.spec.js +31 -31
- package/dist/parser/tests/expression/SourceLiteralExpression.spec.js.map +1 -1
- package/dist/parser/tests/expression/TemplateStringExpression.spec.js +281 -94
- package/dist/parser/tests/expression/TemplateStringExpression.spec.js.map +1 -1
- package/dist/parser/tests/expression/TernaryExpression.spec.js +747 -192
- package/dist/parser/tests/expression/TernaryExpression.spec.js.map +1 -1
- package/dist/parser/tests/expression/TypeExpression.spec.d.ts +1 -0
- package/dist/parser/tests/expression/TypeExpression.spec.js +126 -0
- package/dist/parser/tests/expression/TypeExpression.spec.js.map +1 -0
- package/dist/parser/tests/expression/UnaryExpression.spec.d.ts +1 -0
- package/dist/parser/tests/expression/UnaryExpression.spec.js +52 -0
- package/dist/parser/tests/expression/UnaryExpression.spec.js.map +1 -0
- package/dist/parser/tests/statement/AssignmentOperators.spec.js +44 -44
- package/dist/parser/tests/statement/AssignmentOperators.spec.js.map +1 -1
- package/dist/parser/tests/statement/ConstStatement.spec.d.ts +1 -0
- package/dist/parser/tests/statement/ConstStatement.spec.js +500 -0
- package/dist/parser/tests/statement/ConstStatement.spec.js.map +1 -0
- package/dist/parser/tests/statement/Continue.spec.d.ts +1 -0
- package/dist/parser/tests/statement/Continue.spec.js +119 -0
- package/dist/parser/tests/statement/Continue.spec.js.map +1 -0
- package/dist/parser/tests/statement/Declaration.spec.js +61 -55
- package/dist/parser/tests/statement/Declaration.spec.js.map +1 -1
- package/dist/parser/tests/statement/Dim.spec.js +29 -22
- package/dist/parser/tests/statement/Dim.spec.js.map +1 -1
- package/dist/parser/tests/statement/Enum.spec.d.ts +1 -0
- package/dist/parser/tests/statement/Enum.spec.js +744 -0
- package/dist/parser/tests/statement/Enum.spec.js.map +1 -0
- package/dist/parser/tests/statement/For.spec.d.ts +1 -0
- package/dist/parser/tests/statement/For.spec.js +45 -0
- package/dist/parser/tests/statement/For.spec.js.map +1 -0
- package/dist/parser/tests/statement/ForEach.spec.d.ts +1 -0
- package/dist/parser/tests/statement/ForEach.spec.js +36 -0
- package/dist/parser/tests/statement/ForEach.spec.js.map +1 -0
- package/dist/parser/tests/statement/Function.spec.js +226 -215
- package/dist/parser/tests/statement/Function.spec.js.map +1 -1
- package/dist/parser/tests/statement/Goto.spec.js +16 -15
- package/dist/parser/tests/statement/Goto.spec.js.map +1 -1
- package/dist/parser/tests/statement/Increment.spec.js +64 -61
- package/dist/parser/tests/statement/Increment.spec.js.map +1 -1
- package/dist/parser/tests/statement/InterfaceStatement.spec.d.ts +1 -0
- package/dist/parser/tests/statement/InterfaceStatement.spec.js +110 -0
- package/dist/parser/tests/statement/InterfaceStatement.spec.js.map +1 -0
- package/dist/parser/tests/statement/LibraryStatement.spec.js +22 -22
- package/dist/parser/tests/statement/LibraryStatement.spec.js.map +1 -1
- package/dist/parser/tests/statement/Misc.spec.js +127 -168
- package/dist/parser/tests/statement/Misc.spec.js.map +1 -1
- package/dist/parser/tests/statement/PrintStatement.spec.js +133 -114
- package/dist/parser/tests/statement/PrintStatement.spec.js.map +1 -1
- package/dist/parser/tests/statement/ReturnStatement.spec.js +57 -54
- package/dist/parser/tests/statement/ReturnStatement.spec.js.map +1 -1
- package/dist/parser/tests/statement/Set.spec.js +131 -117
- package/dist/parser/tests/statement/Set.spec.js.map +1 -1
- package/dist/parser/tests/statement/Stop.spec.js +14 -13
- package/dist/parser/tests/statement/Stop.spec.js.map +1 -1
- package/dist/parser/tests/statement/Throw.spec.js +11 -8
- package/dist/parser/tests/statement/Throw.spec.js.map +1 -1
- package/dist/parser/tests/statement/TryCatch.spec.js +26 -15
- package/dist/parser/tests/statement/TryCatch.spec.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/preprocessor/Manifest.spec.d.ts +1 -0
- package/dist/preprocessor/Manifest.spec.js +78 -103
- package/dist/preprocessor/Manifest.spec.js.map +1 -1
- package/dist/roku-types/data.json +20347 -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 +89 -24
- package/dist/types/ArrayType.js.map +1 -1
- package/dist/types/ArrayType.spec.js +39 -11
- package/dist/types/ArrayType.spec.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/BooleanType.spec.js +10 -4
- package/dist/types/BooleanType.spec.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/BuiltInInterfaceAdder.spec.d.ts +1 -0
- package/dist/types/BuiltInInterfaceAdder.spec.js +115 -0
- package/dist/types/BuiltInInterfaceAdder.spec.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 +60 -0
- package/dist/types/ClassType.js.map +1 -0
- package/dist/types/ClassType.spec.d.ts +1 -0
- package/dist/types/ClassType.spec.js +76 -0
- package/dist/types/ClassType.spec.js.map +1 -0
- package/dist/types/ComponentType.d.ts +22 -0
- package/dist/types/ComponentType.js +107 -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/DoubleType.spec.js +12 -4
- package/dist/types/DoubleType.spec.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/DynamicType.spec.js +16 -5
- package/dist/types/DynamicType.spec.js.map +1 -1
- package/dist/types/EnumType.d.ts +42 -0
- package/dist/types/EnumType.js +98 -0
- package/dist/types/EnumType.js.map +1 -0
- package/dist/types/EnumType.spec.d.ts +1 -0
- package/dist/types/EnumType.spec.js +33 -0
- package/dist/types/EnumType.spec.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/FloatType.spec.js +4 -4
- package/dist/types/FloatType.spec.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/IntegerType.spec.js +8 -4
- package/dist/types/IntegerType.spec.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/InterfaceType.spec.d.ts +1 -0
- package/dist/types/InterfaceType.spec.js +227 -0
- package/dist/types/InterfaceType.spec.js.map +1 -0
- package/dist/types/IntersectionType.d.ts +29 -0
- package/dist/types/IntersectionType.js +253 -0
- package/dist/types/IntersectionType.js.map +1 -0
- package/dist/types/IntersectionType.spec.d.ts +1 -0
- package/dist/types/IntersectionType.spec.js +150 -0
- package/dist/types/IntersectionType.spec.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/InvalidType.spec.js +8 -4
- package/dist/types/InvalidType.spec.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/LongIntegerType.spec.js +10 -4
- package/dist/types/LongIntegerType.spec.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/ObjectType.spec.js +3 -3
- package/dist/types/ObjectType.spec.js.map +1 -1
- package/dist/types/ReferenceType.d.ts +123 -0
- package/dist/types/ReferenceType.js +720 -0
- package/dist/types/ReferenceType.js.map +1 -0
- package/dist/types/ReferenceType.spec.d.ts +1 -0
- package/dist/types/ReferenceType.spec.js +151 -0
- package/dist/types/ReferenceType.spec.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/StringType.spec.js +3 -3
- package/dist/types/StringType.spec.js.map +1 -1
- package/dist/types/TypeStatementType.d.ts +18 -0
- package/dist/types/TypeStatementType.js +45 -0
- package/dist/types/TypeStatementType.js.map +1 -0
- package/dist/types/TypedFunctionType.d.ts +34 -0
- package/dist/types/TypedFunctionType.js +147 -0
- package/dist/types/TypedFunctionType.js.map +1 -0
- package/dist/types/TypedFunctionType.spec.d.ts +1 -0
- package/dist/types/TypedFunctionType.spec.js +122 -0
- package/dist/types/TypedFunctionType.spec.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 +193 -0
- package/dist/types/UnionType.js.map +1 -0
- package/dist/types/UnionType.spec.d.ts +1 -0
- package/dist/types/UnionType.spec.js +205 -0
- package/dist/types/UnionType.spec.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/VoidType.spec.js +3 -3
- package/dist/types/VoidType.spec.js.map +1 -1
- package/dist/types/helper.spec.d.ts +1 -0
- package/dist/types/helper.spec.js +174 -0
- package/dist/types/helper.spec.js.map +1 -0
- package/dist/types/helpers.d.ts +51 -0
- package/dist/types/helpers.js +323 -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/types/roFunctionType.spec.d.ts +1 -0
- package/dist/types/roFunctionType.spec.js +20 -0
- package/dist/types/roFunctionType.spec.js.map +1 -0
- package/dist/util.d.ts +288 -187
- package/dist/util.js +2018 -575
- 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 +185 -138
- package/CHANGELOG.md +0 -1188
- 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/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.js +0 -45
- package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.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/SGTypes.spec.js +0 -351
- package/dist/parser/SGTypes.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/preprocessor/Chunk.d.ts +0 -82
- package/dist/preprocessor/Chunk.js +0 -77
- package/dist/preprocessor/Chunk.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.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.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/CustomType.d.ts +0 -10
- package/dist/types/CustomType.js +0 -35
- package/dist/types/CustomType.js.map +0 -1
- package/dist/types/FunctionType.spec.js +0 -29
- package/dist/types/FunctionType.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/{bscPlugin/semanticTokens/SemanticTokensProcessor.spec.d.ts → astUtils/CachedLookups.spec.d.ts} +0 -0
- /package/dist/{parser/SGTypes.spec.d.ts → astUtils/Editor.spec.d.ts} +0 -0
- /package/dist/{preprocessor/Preprocessor.spec.d.ts → bscPlugin/completions/CompletionsProcessor.spec.d.ts} +0 -0
- /package/dist/{preprocessor/PreprocessorParser.spec.d.ts → bscPlugin/definition/DefinitionProvider.spec.d.ts} +0 -0
- /package/dist/{types/FunctionType.spec.d.ts → bscPlugin/hover/HoverProcessor.spec.d.ts} +0 -0
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isTypeWithPotentialDefaultDynamicMember = exports.joinTypesString = exports.TypesCreated = exports.addAssociatedTypesTableAsSiblingToMemberTable = exports.getAllTypesFromCompoundType = exports.isNativeInterfaceCompatibleNumber = exports.isNativeInterfaceCompatible = exports.isEnumTypeCompatible = exports.isUnionTypeCompatible = exports.getUniqueType = exports.reduceTypesForIntersectionType = exports.reduceTypesToMostGeneric = exports.getUniqueTypesFromArray = exports.findTypeUnionDeepCheck = exports.findTypeUnion = exports.findTypeIntersection = void 0;
|
|
4
|
+
const reflection_1 = require("../astUtils/reflection");
|
|
5
|
+
function findTypeIntersection(typesArr1, typesArr2) {
|
|
6
|
+
if (!typesArr1 || !typesArr2) {
|
|
7
|
+
return undefined;
|
|
8
|
+
}
|
|
9
|
+
return typesArr1 === null || typesArr1 === void 0 ? void 0 : typesArr1.filter((currentType) => {
|
|
10
|
+
if (!currentType) {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
const indexOfCurrentTypeInArr2 = typesArr2.findIndex((checkType) => {
|
|
14
|
+
return currentType.isEqual(checkType);
|
|
15
|
+
});
|
|
16
|
+
return indexOfCurrentTypeInArr2 >= 0;
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
exports.findTypeIntersection = findTypeIntersection;
|
|
20
|
+
function findTypeUnion(...typesArr) {
|
|
21
|
+
return getUniqueTypesFromArray([].concat(...typesArr));
|
|
22
|
+
}
|
|
23
|
+
exports.findTypeUnion = findTypeUnion;
|
|
24
|
+
/**
|
|
25
|
+
* Same as findTypeUnion, but does not allow short cutting by just checking names
|
|
26
|
+
* Useful for checking types between callfuncs, as the parameter types may have the same name, but mean different things
|
|
27
|
+
*/
|
|
28
|
+
function findTypeUnionDeepCheck(...typesArr) {
|
|
29
|
+
return getUniqueTypesFromArray([].concat(...typesArr), false);
|
|
30
|
+
}
|
|
31
|
+
exports.findTypeUnionDeepCheck = findTypeUnionDeepCheck;
|
|
32
|
+
function getUniqueTypesFromArray(types, allowNameEquality = true) {
|
|
33
|
+
if (!types) {
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
return types === null || types === void 0 ? void 0 : types.filter((currentType, currentIndex) => {
|
|
37
|
+
if (!currentType) {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
if (((0, reflection_1.isTypePropertyReferenceType)(currentType) || (0, reflection_1.isArrayDefaultTypeReferenceType)(currentType)) && !currentType.isResolvable()) {
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
const latestIndex = types.findIndex((checkType) => {
|
|
44
|
+
return currentType.isEqual(checkType, { allowNameEquality: allowNameEquality });
|
|
45
|
+
});
|
|
46
|
+
// the index that was found is the index we're checking --- there are no equal types after this
|
|
47
|
+
return latestIndex === currentIndex;
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
exports.getUniqueTypesFromArray = getUniqueTypesFromArray;
|
|
51
|
+
/**
|
|
52
|
+
* Reduces a list of types based on equality or inheritance
|
|
53
|
+
* If all types are the same - just that type is returned
|
|
54
|
+
* If one of the types is Dynamic, then Dynamic.instance is returned
|
|
55
|
+
* If any types inherit another type, the more general type is returned
|
|
56
|
+
* @param types array of types
|
|
57
|
+
* @returns an array of the most general types
|
|
58
|
+
*/
|
|
59
|
+
function reduceTypesToMostGeneric(types, allowNameEquality = true) {
|
|
60
|
+
if (!types || (types === null || types === void 0 ? void 0 : types.length) === 0) {
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
if (types.length === 1) {
|
|
64
|
+
// only one type
|
|
65
|
+
return [types[0]];
|
|
66
|
+
}
|
|
67
|
+
types = types.map(t => {
|
|
68
|
+
var _a;
|
|
69
|
+
if ((0, reflection_1.isReferenceType)(t) && t.isResolvable()) {
|
|
70
|
+
return (_a = t.getTarget()) !== null && _a !== void 0 ? _a : t;
|
|
71
|
+
}
|
|
72
|
+
return t;
|
|
73
|
+
});
|
|
74
|
+
// Get a list of unique types, based on the `isEqual()` method
|
|
75
|
+
const uniqueTypes = getUniqueTypesFromArray(types, allowNameEquality).map(t => {
|
|
76
|
+
// map to object with `shouldIgnore` flag
|
|
77
|
+
return { type: t, shouldIgnore: false };
|
|
78
|
+
});
|
|
79
|
+
if (uniqueTypes.length === 1) {
|
|
80
|
+
// only one type after filtering
|
|
81
|
+
return [uniqueTypes[0].type];
|
|
82
|
+
}
|
|
83
|
+
const existingDynamicType = uniqueTypes.find(t => !(0, reflection_1.isAnyReferenceType)(t.type) && (0, reflection_1.isDynamicType)(t.type));
|
|
84
|
+
if (existingDynamicType) {
|
|
85
|
+
// If it includes dynamic, then the result is dynamic
|
|
86
|
+
return [existingDynamicType.type];
|
|
87
|
+
}
|
|
88
|
+
const generalizedTypes = [];
|
|
89
|
+
//check assignability:
|
|
90
|
+
for (let i = 0; i < uniqueTypes.length; i++) {
|
|
91
|
+
const currentType = uniqueTypes[i].type;
|
|
92
|
+
if (i === uniqueTypes.length - 1) {
|
|
93
|
+
if (!uniqueTypes[i].shouldIgnore) {
|
|
94
|
+
//this type was not convertible to anything else... it is as general as possible
|
|
95
|
+
generalizedTypes.push(currentType);
|
|
96
|
+
}
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
for (let j = i + 1; j < uniqueTypes.length; j++) {
|
|
100
|
+
if (uniqueTypes[j].shouldIgnore) {
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
const checkType = uniqueTypes[j].type;
|
|
104
|
+
if (currentType.isResolvable() && currentType.isEqual(uniqueTypes[j].type, { allowNameEquality: allowNameEquality })) {
|
|
105
|
+
uniqueTypes[j].shouldIgnore = true;
|
|
106
|
+
}
|
|
107
|
+
else if ((0, reflection_1.isInheritableType)(currentType) && (0, reflection_1.isInheritableType)(checkType)) {
|
|
108
|
+
if (currentType.isTypeDescendent(checkType)) {
|
|
109
|
+
//the type we're checking is less general than the current type... it can be ignored
|
|
110
|
+
uniqueTypes[j].shouldIgnore = true;
|
|
111
|
+
}
|
|
112
|
+
if (checkType.isTypeDescendent(currentType)) {
|
|
113
|
+
// the currentType is a descendent to some other type - it won't be in the final set
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
if (j === uniqueTypes.length - 1) {
|
|
118
|
+
//this type was not convertible to anything else... it is as general as possible
|
|
119
|
+
generalizedTypes.push(currentType);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return generalizedTypes;
|
|
124
|
+
}
|
|
125
|
+
exports.reduceTypesToMostGeneric = reduceTypesToMostGeneric;
|
|
126
|
+
/**
|
|
127
|
+
* Reduces a list of types based on equality or inheritance
|
|
128
|
+
* If all types are the same - just that type is returned
|
|
129
|
+
* If one of the types is Dynamic, then Dynamic.instance is returned
|
|
130
|
+
* If any types inherit another type, the more Specific type is returned, eg. the one with the most members
|
|
131
|
+
* @param types array of types
|
|
132
|
+
* @returns an array of the most specific types
|
|
133
|
+
*/
|
|
134
|
+
function reduceTypesForIntersectionType(types, allowNameEquality = true) {
|
|
135
|
+
if (!types || (types === null || types === void 0 ? void 0 : types.length) === 0) {
|
|
136
|
+
return undefined;
|
|
137
|
+
}
|
|
138
|
+
if (types.length === 1) {
|
|
139
|
+
// only one type
|
|
140
|
+
return [types[0]];
|
|
141
|
+
}
|
|
142
|
+
types = types.map(t => {
|
|
143
|
+
var _a;
|
|
144
|
+
if ((0, reflection_1.isReferenceType)(t)) {
|
|
145
|
+
if (t.isResolvable()) {
|
|
146
|
+
return (_a = t.getTarget()) !== null && _a !== void 0 ? _a : t;
|
|
147
|
+
}
|
|
148
|
+
return undefined;
|
|
149
|
+
}
|
|
150
|
+
return t;
|
|
151
|
+
}).filter(t => t);
|
|
152
|
+
// Get a list of unique types, based on the `isEqual()` method
|
|
153
|
+
const uniqueTypes = getUniqueTypesFromArray(types, allowNameEquality).map(t => {
|
|
154
|
+
// map to object with `shouldIgnore` flag
|
|
155
|
+
return { type: t, shouldIgnore: false };
|
|
156
|
+
});
|
|
157
|
+
if (uniqueTypes.length === 1) {
|
|
158
|
+
// only one type after filtering
|
|
159
|
+
return [uniqueTypes[0].type];
|
|
160
|
+
}
|
|
161
|
+
const existingDynamicType = uniqueTypes.find(t => !(0, reflection_1.isAnyReferenceType)(t.type) && (0, reflection_1.isDynamicType)(t.type));
|
|
162
|
+
if (existingDynamicType) {
|
|
163
|
+
// If it includes dynamic, then the result is dynamic
|
|
164
|
+
return [existingDynamicType.type];
|
|
165
|
+
}
|
|
166
|
+
const specificTypes = [];
|
|
167
|
+
//check assignability:
|
|
168
|
+
for (let i = 0; i < uniqueTypes.length; i++) {
|
|
169
|
+
const currentType = uniqueTypes[i].type;
|
|
170
|
+
if (i === uniqueTypes.length - 1) {
|
|
171
|
+
if (!uniqueTypes[i].shouldIgnore) {
|
|
172
|
+
//this type was not convertible to anything else... it is as general as possible
|
|
173
|
+
specificTypes.push(currentType);
|
|
174
|
+
}
|
|
175
|
+
break;
|
|
176
|
+
}
|
|
177
|
+
for (let j = i + 1; j < uniqueTypes.length; j++) {
|
|
178
|
+
if (uniqueTypes[j].shouldIgnore) {
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
const checkType = uniqueTypes[j].type;
|
|
182
|
+
if (currentType.isResolvable() && currentType.isEqual(uniqueTypes[j].type, { allowNameEquality: allowNameEquality })) {
|
|
183
|
+
uniqueTypes[j].shouldIgnore = true;
|
|
184
|
+
}
|
|
185
|
+
else if ((0, reflection_1.isInheritableType)(currentType) && (0, reflection_1.isInheritableType)(checkType)) {
|
|
186
|
+
if (checkType.isTypeDescendent(currentType)) {
|
|
187
|
+
//the type we're checking is more general than the current type... it can be ignored
|
|
188
|
+
uniqueTypes[j].shouldIgnore = true;
|
|
189
|
+
}
|
|
190
|
+
if (currentType.isTypeDescendent(checkType)) {
|
|
191
|
+
// the currentType is an ancestor to some other type - it won't be in the final set
|
|
192
|
+
break;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
if (j === uniqueTypes.length - 1) {
|
|
196
|
+
//this type was not convertible to anything else... it is as general as possible
|
|
197
|
+
specificTypes.push(currentType);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
return specificTypes;
|
|
202
|
+
}
|
|
203
|
+
exports.reduceTypesForIntersectionType = reduceTypesForIntersectionType;
|
|
204
|
+
/**
|
|
205
|
+
* Gets a Unique type from a list of types
|
|
206
|
+
* @param types array of types
|
|
207
|
+
* @returns either the singular most general type, if there is one, otherwise a UnionType of the most general types
|
|
208
|
+
*/
|
|
209
|
+
function getUniqueType(types, unionTypeFactory, allowNameEquality = true) {
|
|
210
|
+
if (!types || types.length === 0) {
|
|
211
|
+
return undefined;
|
|
212
|
+
}
|
|
213
|
+
const dynType = types.find((x) => !(0, reflection_1.isAnyReferenceType)(x) && ((0, reflection_1.isDynamicType)(x) || (0, reflection_1.isVoidType)(x)));
|
|
214
|
+
if (dynType) {
|
|
215
|
+
return dynType;
|
|
216
|
+
}
|
|
217
|
+
types = types === null || types === void 0 ? void 0 : types.map(type => {
|
|
218
|
+
if (!(0, reflection_1.isAnyReferenceType)(type) && (0, reflection_1.isUnionType)(type)) {
|
|
219
|
+
return type.types;
|
|
220
|
+
}
|
|
221
|
+
return type;
|
|
222
|
+
}).flat();
|
|
223
|
+
const generalizedTypes = reduceTypesToMostGeneric(types, allowNameEquality);
|
|
224
|
+
if (!generalizedTypes || generalizedTypes.length === 0) {
|
|
225
|
+
return undefined;
|
|
226
|
+
}
|
|
227
|
+
if ((generalizedTypes === null || generalizedTypes === void 0 ? void 0 : generalizedTypes.length) === 1) {
|
|
228
|
+
// only one type
|
|
229
|
+
return generalizedTypes[0];
|
|
230
|
+
}
|
|
231
|
+
return unionTypeFactory(generalizedTypes);
|
|
232
|
+
}
|
|
233
|
+
exports.getUniqueType = getUniqueType;
|
|
234
|
+
function isUnionTypeCompatible(thisType, maybeUnionType, data) {
|
|
235
|
+
if ((0, reflection_1.isUnionType)(maybeUnionType)) {
|
|
236
|
+
for (const innerType of maybeUnionType.types) {
|
|
237
|
+
if (!thisType.isTypeCompatible(innerType, data)) {
|
|
238
|
+
return false;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
return true;
|
|
242
|
+
}
|
|
243
|
+
return false;
|
|
244
|
+
}
|
|
245
|
+
exports.isUnionTypeCompatible = isUnionTypeCompatible;
|
|
246
|
+
function isEnumTypeCompatible(thisType, maybeEnumType, data) {
|
|
247
|
+
if ((0, reflection_1.isEnumMemberType)(maybeEnumType) || (0, reflection_1.isEnumType)(maybeEnumType)) {
|
|
248
|
+
return thisType.isTypeCompatible(maybeEnumType.underlyingType, data);
|
|
249
|
+
}
|
|
250
|
+
return false;
|
|
251
|
+
}
|
|
252
|
+
exports.isEnumTypeCompatible = isEnumTypeCompatible;
|
|
253
|
+
function isNativeInterfaceCompatible(thisType, otherType, allowedType, data) {
|
|
254
|
+
if ((0, reflection_1.isInterfaceType)(otherType)) {
|
|
255
|
+
// TODO: it is not great to do type checking based on interface name
|
|
256
|
+
const lowerOtherName = otherType.name.toLowerCase();
|
|
257
|
+
return allowedType === lowerOtherName;
|
|
258
|
+
}
|
|
259
|
+
return false;
|
|
260
|
+
}
|
|
261
|
+
exports.isNativeInterfaceCompatible = isNativeInterfaceCompatible;
|
|
262
|
+
function isNativeInterfaceCompatibleNumber(thisType, otherType, data) {
|
|
263
|
+
if ((0, reflection_1.isInterfaceType)(otherType)) {
|
|
264
|
+
// TODO: it is not great to do type checking based on interface name
|
|
265
|
+
const lowerOtherName = otherType.name.toLowerCase();
|
|
266
|
+
return lowerOtherName === 'roint' ||
|
|
267
|
+
lowerOtherName === 'rofloat' ||
|
|
268
|
+
lowerOtherName === 'rodouble' ||
|
|
269
|
+
lowerOtherName === 'rolonginteger';
|
|
270
|
+
}
|
|
271
|
+
return false;
|
|
272
|
+
}
|
|
273
|
+
exports.isNativeInterfaceCompatibleNumber = isNativeInterfaceCompatibleNumber;
|
|
274
|
+
function getAllTypesFromCompoundType(complex) {
|
|
275
|
+
const results = [];
|
|
276
|
+
for (const type of complex.types) {
|
|
277
|
+
if ((0, reflection_1.isCompoundType)(type)) {
|
|
278
|
+
results.push(...getAllTypesFromCompoundType(type));
|
|
279
|
+
}
|
|
280
|
+
else {
|
|
281
|
+
results.push(type);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
return results;
|
|
285
|
+
}
|
|
286
|
+
exports.getAllTypesFromCompoundType = getAllTypesFromCompoundType;
|
|
287
|
+
function addAssociatedTypesTableAsSiblingToMemberTable(type, associatedTypesTable, bitFlags) {
|
|
288
|
+
if ((0, reflection_1.isReferenceType)(type) &&
|
|
289
|
+
!type.isResolvable()) {
|
|
290
|
+
// This param or return type is a reference - make sure the associated types are included
|
|
291
|
+
type.tableProvider().addSibling(associatedTypesTable);
|
|
292
|
+
// add this as a sister table to member tables too!
|
|
293
|
+
const memberTable = type.getMemberTable();
|
|
294
|
+
if (memberTable.getAllSymbols) {
|
|
295
|
+
for (const memberSymbol of memberTable.getAllSymbols(bitFlags)) {
|
|
296
|
+
addAssociatedTypesTableAsSiblingToMemberTable(memberSymbol === null || memberSymbol === void 0 ? void 0 : memberSymbol.type, associatedTypesTable, bitFlags);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
exports.addAssociatedTypesTableAsSiblingToMemberTable = addAssociatedTypesTableAsSiblingToMemberTable;
|
|
302
|
+
/**
|
|
303
|
+
* A map of all types created in the program during its lifetime. This applies across all programs, validate runs, etc. Mostly useful for a single run to track types created.
|
|
304
|
+
*/
|
|
305
|
+
exports.TypesCreated = {};
|
|
306
|
+
function joinTypesString(types, separator, thisTypeKind) {
|
|
307
|
+
return [...new Set(types.map(t => {
|
|
308
|
+
const typeString = t.toString();
|
|
309
|
+
if (((0, reflection_1.isUnionType)(t) || (0, reflection_1.isIntersectionType)(t)) && t.kind !== thisTypeKind) {
|
|
310
|
+
return `(${typeString})`;
|
|
311
|
+
}
|
|
312
|
+
return t.toString();
|
|
313
|
+
}))].join(` ${separator} `);
|
|
314
|
+
}
|
|
315
|
+
exports.joinTypesString = joinTypesString;
|
|
316
|
+
function isTypeWithPotentialDefaultDynamicMember(type) {
|
|
317
|
+
return ((0, reflection_1.isInheritableType)(type) && type.changeUnknownMemberToDynamic) ||
|
|
318
|
+
(0, reflection_1.isAssociativeArrayTypeLike)(type) ||
|
|
319
|
+
(0, reflection_1.isObjectType)(type) ||
|
|
320
|
+
(0, reflection_1.isUnionTypeOf)(type, isTypeWithPotentialDefaultDynamicMember);
|
|
321
|
+
}
|
|
322
|
+
exports.isTypeWithPotentialDefaultDynamicMember = isTypeWithPotentialDefaultDynamicMember;
|
|
323
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/types/helpers.ts"],"names":[],"mappings":";;;AACA,uDAAkV;AAQlV,SAAgB,oBAAoB,CAAC,SAAoB,EAAE,SAAoB;IAC3E,IAAI,CAAC,SAAS,IAAI,CAAC,SAAS,EAAE;QAC1B,OAAO,SAAS,CAAC;KACpB;IACD,OAAO,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,MAAM,CAAC,CAAC,WAAW,EAAE,EAAE;QACrC,IAAI,CAAC,WAAW,EAAE;YACd,OAAO,KAAK,CAAC;SAChB;QACD,MAAM,wB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AAC,aAAa,CAAC,QAAQ,CAAC,EAAE;gBAC5D,6CAA6C,CAAC,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,IAAI,EAAE,oBAAoB,EAAE,QAAQ,CAAC,CAAC;aACrG;SACJ;KACJ;AACL,CAAC;AAdD,sGAcC;AACD;;GAEG;AACU,QAAA,YAAY,GAA2B,EAAE,CAAC;AAEvD,SAAgB,eAAe,CAAC,KAAgB,EAAE,SAAiB,EAAE,YAAyB;IAC1F,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;YAC7B,MAAM,UAAU,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC;YAChC,IAAI,CAAC,IAAA,wBAAW,EAAC,CAAC,CAAC,IAAI,IAAA,+BAAkB,EAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,YAAY,EAAE;gBACtE,OAAO,IAAI,UAAU,GAAG,CAAC;aAC5B;YACD,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,SAAS,GAAG,CAAC,CAAC;AAChC,CAAC;AARD,0CAQC;AAGD,SAAgB,uCAAuC,CAAC,IAAa;IACjE,OAAO,CAAC,IAAA,8BAAiB,EAAC,IAAI,CAAC,IAAI,IAAI,CAAC,4BAA4B,CAAC;QACjE,IAAA,uCAA0B,EAAC,IAAI,CAAC;QAChC,IAAA,yBAAY,EAAC,IAAI,CAAC;QAClB,IAAA,0BAAa,EAAC,IAAI,EAAE,uCAAuC,CAAC,CAAC;AACrE,CAAC;AALD,0FAKC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export * from './ArrayType';
|
|
2
|
+
export * from './BooleanType';
|
|
3
|
+
export * from './BscType';
|
|
4
|
+
export * from './ClassType';
|
|
5
|
+
export * from './DoubleType';
|
|
6
|
+
export * from './DynamicType';
|
|
7
|
+
export * from './EnumType';
|
|
8
|
+
export * from './FloatType';
|
|
9
|
+
export * from './TypedFunctionType';
|
|
10
|
+
export * from './helpers';
|
|
11
|
+
export * from './InheritableType';
|
|
12
|
+
export * from './IntegerType';
|
|
13
|
+
export * from './InterfaceType';
|
|
14
|
+
export * from './InvalidType';
|
|
15
|
+
export * from './LongIntegerType';
|
|
16
|
+
export * from './NamespaceType';
|
|
17
|
+
export * from './ObjectType';
|
|
18
|
+
export * from './ReferenceType';
|
|
19
|
+
export * from './StringType';
|
|
20
|
+
export * from './UninitializedType';
|
|
21
|
+
export * from './UnionType';
|
|
22
|
+
export * from './VoidType';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./ArrayType"), exports);
|
|
18
|
+
__exportStar(require("./BooleanType"), exports);
|
|
19
|
+
__exportStar(require("./BscType"), exports);
|
|
20
|
+
__exportStar(require("./ClassType"), exports);
|
|
21
|
+
__exportStar(require("./DoubleType"), exports);
|
|
22
|
+
__exportStar(require("./DynamicType"), exports);
|
|
23
|
+
__exportStar(require("./EnumType"), exports);
|
|
24
|
+
__exportStar(require("./FloatType"), exports);
|
|
25
|
+
__exportStar(require("./TypedFunctionType"), exports);
|
|
26
|
+
__exportStar(require("./helpers"), exports);
|
|
27
|
+
__exportStar(require("./InheritableType"), exports);
|
|
28
|
+
__exportStar(require("./IntegerType"), exports);
|
|
29
|
+
__exportStar(require("./InterfaceType"), exports);
|
|
30
|
+
__exportStar(require("./InvalidType"), exports);
|
|
31
|
+
__exportStar(require("./LongIntegerType"), exports);
|
|
32
|
+
__exportStar(require("./NamespaceType"), exports);
|
|
33
|
+
__exportStar(require("./ObjectType"), exports);
|
|
34
|
+
__exportStar(require("./ReferenceType"), exports);
|
|
35
|
+
__exportStar(require("./StringType"), exports);
|
|
36
|
+
__exportStar(require("./UninitializedType"), exports);
|
|
37
|
+
__exportStar(require("./UnionType"), exports);
|
|
38
|
+
__exportStar(require("./VoidType"), exports);
|
|
39
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,gDAA8B;AAC9B,4CAA0B;AAC1B,8CAA4B;AAC5B,+CAA6B;AAC7B,gDAA8B;AAC9B,6CAA2B;AAC3B,8CAA4B;AAC5B,sDAAoC;AACpC,4CAA0B;AAC1B,oDAAkC;AAClC,gDAA8B;AAC9B,kDAAgC;AAChC,gDAA8B;AAC9B,oDAAkC;AAClC,kDAAgC;AAChC,+CAA6B;AAC7B,kDAAgC;AAChC,+CAA6B;AAC7B,sDAAoC;AACpC,8CAA4B;AAC5B,6CAA2B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TypeCompatibilityData } from '../interfaces';
|
|
2
|
+
import { BaseFunctionType } from './BaseFunctionType';
|
|
3
|
+
import type { BscType } from './BscType';
|
|
4
|
+
import { BscTypeKind } from './BscTypeKind';
|
|
5
|
+
export declare class roFunctionType extends BaseFunctionType {
|
|
6
|
+
readonly kind = BscTypeKind.RoFunctionType;
|
|
7
|
+
isTypeCompatible(targetType: BscType, data?: TypeCompatibilityData): boolean;
|
|
8
|
+
toString(): string;
|
|
9
|
+
toTypeString(): string;
|
|
10
|
+
isEqual(targetType: BscType): boolean;
|
|
11
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.roFunctionType = void 0;
|
|
4
|
+
const reflection_1 = require("../astUtils/reflection");
|
|
5
|
+
const BaseFunctionType_1 = require("./BaseFunctionType");
|
|
6
|
+
const BscTypeKind_1 = require("./BscTypeKind");
|
|
7
|
+
const helpers_1 = require("./helpers");
|
|
8
|
+
class roFunctionType extends BaseFunctionType_1.BaseFunctionType {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.kind = BscTypeKind_1.BscTypeKind.RoFunctionType;
|
|
12
|
+
}
|
|
13
|
+
isTypeCompatible(targetType, data) {
|
|
14
|
+
if ((0, reflection_1.isDynamicType)(targetType) ||
|
|
15
|
+
(0, reflection_1.isCallableType)(targetType) ||
|
|
16
|
+
(0, reflection_1.isFunctionTypeLike)(targetType) ||
|
|
17
|
+
(0, reflection_1.isObjectType)(targetType) ||
|
|
18
|
+
(0, helpers_1.isUnionTypeCompatible)(this, targetType, data)) {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
toString() {
|
|
24
|
+
return 'roFunction';
|
|
25
|
+
}
|
|
26
|
+
toTypeString() {
|
|
27
|
+
return 'dynamic';
|
|
28
|
+
}
|
|
29
|
+
isEqual(targetType) {
|
|
30
|
+
if ((0, reflection_1.isFunctionTypeLike)(targetType)) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.roFunctionType = roFunctionType;
|
|
37
|
+
//# sourceMappingURL=roFunctionType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roFunctionType.js","sourceRoot":"","sources":["../../src/types/roFunctionType.ts"],"names":[],"mappings":";;;AAAA,uDAAyG;AAEzG,yDAAsD;AAEtD,+CAA4C;AAC5C,uCAAkD;AAElD,MAAa,cAAe,SAAQ,mCAAgB;IAApD;;QACoB,SAAI,GAAG,yBAAW,CAAC,cAAc,CAAC;IA8BtD,CAAC;IA5BU,gBAAgB,CAAC,UAAmB,EAAE,IAA4B;QACrE,IACI,IAAA,0BAAa,EAAC,UAAU,CAAC;YACzB,IAAA,2BAAc,EAAC,UAAU,CAAC;YAC1B,IAAA,+BAAkB,EAAC,UAAU,CAAC;YAC9B,IAAA,yBAAY,EAAC,UAAU,CAAC;YACxB,IAAA,+BAAqB,EAAC,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,EAC/C;YACE,OAAO,IAAI,CAAC;SACf;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;IAEM,QAAQ;QACX,OAAO,YAAY,CAAC;IACxB,CAAC;IAEM,YAAY;QACf,OAAO,SAAS,CAAC;IACrB,CAAC;IAGD,OAAO,CAAC,UAAmB;QACvB,IAAI,IAAA,+BAAkB,EAAC,UAAU,CAAC,EAAE;YAChC,OAAO,IAAI,CAAC;SACf;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ;AA/BD,wCA+BC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const chai_config_spec_1 = require("../chai-config.spec");
|
|
4
|
+
const DynamicType_1 = require("./DynamicType");
|
|
5
|
+
const FunctionType_1 = require("./FunctionType");
|
|
6
|
+
const IntegerType_1 = require("./IntegerType");
|
|
7
|
+
const ObjectType_1 = require("./ObjectType");
|
|
8
|
+
const roFunctionType_1 = require("./roFunctionType");
|
|
9
|
+
const TypedFunctionType_1 = require("./TypedFunctionType");
|
|
10
|
+
describe('roFunctionType', () => {
|
|
11
|
+
it('is equivalent to other function types', () => {
|
|
12
|
+
const roFunc = new roFunctionType_1.roFunctionType();
|
|
13
|
+
(0, chai_config_spec_1.expect)(roFunc.isTypeCompatible(new ObjectType_1.ObjectType())).to.be.true;
|
|
14
|
+
(0, chai_config_spec_1.expect)(roFunc.isTypeCompatible(new DynamicType_1.DynamicType())).to.be.true;
|
|
15
|
+
(0, chai_config_spec_1.expect)(roFunc.isTypeCompatible(new FunctionType_1.FunctionType())).to.be.true;
|
|
16
|
+
(0, chai_config_spec_1.expect)(roFunc.isTypeCompatible(new roFunctionType_1.roFunctionType())).to.be.true;
|
|
17
|
+
(0, chai_config_spec_1.expect)(roFunc.isTypeCompatible(new TypedFunctionType_1.TypedFunctionType(IntegerType_1.IntegerType.instance))).to.be.true;
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
//# sourceMappingURL=roFunctionType.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roFunctionType.spec.js","sourceRoot":"","sources":["../../src/types/roFunctionType.spec.ts"],"names":[],"mappings":";;AAAA,0DAA6C;AAE7C,+CAA4C;AAC5C,iDAA8C;AAC9C,+CAA4C;AAC5C,6CAA0C;AAC1C,qDAAkD;AAClD,2DAAwD;AAExD,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC5B,EAAE,CAAC,uCAAuC,EAAE,GAAG,EAAE;QAC7C,MAAM,MAAM,GAAG,IAAI,+BAAc,EAAE,CAAC;QAEpC,IAAA,yBAAM,EAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,uBAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QAC7D,IAAA,yBAAM,EAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,yBAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QAC9D,IAAA,yBAAM,EAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,2BAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QAC/D,IAAA,yBAAM,EAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,+BAAc,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QACjE,IAAA,yBAAM,EAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,qCAAiB,CAAC,yBAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IAC5F,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|