brighterscript 1.0.0-alpha.52 → 1.0.0-alpha.53
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 +5 -3
- package/bsconfig.schema.json +151 -0
- package/dist/BsConfig.d.ts +158 -44
- package/dist/BsConfig.js +24 -0
- package/dist/BsConfig.js.map +1 -1
- package/dist/BusyStatusTracker.js +3 -0
- package/dist/BusyStatusTracker.js.map +1 -1
- package/dist/CrossScopeValidator.js +5 -0
- package/dist/CrossScopeValidator.js.map +1 -1
- package/dist/DiagnosticFilterer.d.ts +17 -1
- package/dist/DiagnosticFilterer.js +69 -6
- package/dist/DiagnosticFilterer.js.map +1 -1
- package/dist/DiagnosticManager.d.ts +11 -1
- package/dist/DiagnosticManager.js +22 -3
- package/dist/DiagnosticManager.js.map +1 -1
- package/dist/DiagnosticMessages.d.ts +93 -4
- package/dist/DiagnosticMessages.js +91 -5
- package/dist/DiagnosticMessages.js.map +1 -1
- package/dist/LanguageServer.d.ts +15 -3
- package/dist/LanguageServer.js +53 -6
- package/dist/LanguageServer.js.map +1 -1
- package/dist/Logger.d.ts +7 -7
- package/dist/Logger.js +2 -2
- package/dist/Logger.js.map +1 -1
- package/dist/PluginInterface.js +2 -1
- package/dist/PluginInterface.js.map +1 -1
- package/dist/Program.d.ts +106 -9
- package/dist/Program.js +273 -23
- package/dist/Program.js.map +1 -1
- package/dist/ProgramBuilder.js +6 -0
- package/dist/ProgramBuilder.js.map +1 -1
- package/dist/RokuConstants.d.ts +123 -0
- package/dist/RokuConstants.js +87 -0
- package/dist/RokuConstants.js.map +1 -0
- package/dist/ScopeNamespaceLookup.js.map +1 -1
- package/dist/Stopwatch.js +2 -2
- package/dist/Stopwatch.js.map +1 -1
- package/dist/SymbolTable.d.ts +1 -0
- package/dist/SymbolTable.js +20 -12
- package/dist/SymbolTable.js.map +1 -1
- package/dist/Throttler.d.ts +1 -1
- package/dist/Throttler.js.map +1 -1
- package/dist/astUtils/reflection.d.ts +6 -1
- package/dist/astUtils/reflection.js +15 -4
- package/dist/astUtils/reflection.js.map +1 -1
- package/dist/astUtils/visitors.d.ts +1 -1
- package/dist/astUtils/visitors.js +2 -0
- package/dist/astUtils/visitors.js.map +1 -1
- package/dist/bscPlugin/BscPlugin.d.ts +2 -2
- package/dist/bscPlugin/BscPlugin.js +1 -1
- package/dist/bscPlugin/BscPlugin.js.map +1 -1
- package/dist/bscPlugin/CallExpressionInfo.js.map +1 -1
- package/dist/bscPlugin/SignatureHelpUtil.js.map +1 -1
- package/dist/bscPlugin/codeActions/FixAllCodeActionsProcessor.d.ts +3 -3
- package/dist/bscPlugin/codeActions/FixAllCodeActionsProcessor.js.map +1 -1
- package/dist/bscPlugin/completions/CompletionsProcessor.js +2 -3
- package/dist/bscPlugin/completions/CompletionsProcessor.js.map +1 -1
- package/dist/bscPlugin/definition/DefinitionProvider.d.ts +67 -2
- package/dist/bscPlugin/definition/DefinitionProvider.js +244 -5
- package/dist/bscPlugin/definition/DefinitionProvider.js.map +1 -1
- package/dist/bscPlugin/references/ReferencesProvider.js +7 -1
- package/dist/bscPlugin/references/ReferencesProvider.js.map +1 -1
- package/dist/bscPlugin/validation/BrsFileValidator.d.ts +40 -6
- package/dist/bscPlugin/validation/BrsFileValidator.js +109 -18
- package/dist/bscPlugin/validation/BrsFileValidator.js.map +1 -1
- package/dist/bscPlugin/validation/ProgramValidator.d.ts +10 -0
- package/dist/bscPlugin/validation/ProgramValidator.js +54 -0
- package/dist/bscPlugin/validation/ProgramValidator.js.map +1 -1
- package/dist/bscPlugin/validation/ScopeValidator.js +55 -30
- package/dist/bscPlugin/validation/ScopeValidator.js.map +1 -1
- package/dist/bscPlugin/validation/XmlFileValidator.d.ts +18 -0
- package/dist/bscPlugin/validation/XmlFileValidator.js +51 -0
- package/dist/bscPlugin/validation/XmlFileValidator.js.map +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/diagnosticUtils.d.ts +1 -1
- package/dist/diagnosticUtils.js.map +1 -1
- package/dist/files/BrsFile.d.ts +2 -2
- package/dist/files/BrsFile.js +2 -2
- package/dist/files/BrsFile.js.map +1 -1
- package/dist/files/XmlFile.d.ts +51 -1
- package/dist/files/XmlFile.js +264 -0
- package/dist/files/XmlFile.js.map +1 -1
- package/dist/formatUtils.d.ts +20 -0
- package/dist/formatUtils.js +38 -0
- package/dist/formatUtils.js.map +1 -0
- package/dist/globalCallables.d.ts +1 -1
- package/dist/globalCallables.js +4 -1
- package/dist/globalCallables.js.map +1 -1
- package/dist/interfaces.d.ts +60 -5
- package/dist/interfaces.js.map +1 -1
- package/dist/lexer/Lexer.d.ts +26 -0
- package/dist/lexer/Lexer.js +140 -15
- package/dist/lexer/Lexer.js.map +1 -1
- package/dist/lexer/TokenKind.d.ts +27 -0
- package/dist/lexer/TokenKind.js +77 -3
- package/dist/lexer/TokenKind.js.map +1 -1
- package/dist/lsp/ActionQueue.js +1 -2
- package/dist/lsp/ActionQueue.js.map +1 -1
- package/dist/lsp/DocumentManager.js +4 -0
- package/dist/lsp/DocumentManager.js.map +1 -1
- package/dist/lsp/LspProject.d.ts +2 -2
- package/dist/lsp/Project.d.ts +2 -2
- package/dist/lsp/Project.js +2 -0
- package/dist/lsp/Project.js.map +1 -1
- package/dist/lsp/ProjectManager.d.ts +7 -2
- package/dist/lsp/ProjectManager.js +3 -1
- package/dist/lsp/ProjectManager.js.map +1 -1
- package/dist/lsp/worker/MessageHandler.d.ts +1 -0
- package/dist/lsp/worker/MessageHandler.js +9 -0
- package/dist/lsp/worker/MessageHandler.js.map +1 -1
- package/dist/lsp/worker/WorkerPool.d.ts +51 -17
- package/dist/lsp/worker/WorkerPool.js +118 -40
- package/dist/lsp/worker/WorkerPool.js.map +1 -1
- package/dist/lsp/worker/WorkerThreadProject.d.ts +16 -3
- package/dist/lsp/worker/WorkerThreadProject.js +50 -10
- package/dist/lsp/worker/WorkerThreadProject.js.map +1 -1
- package/dist/lsp/worker/WorkerThreadProjectRunner.js +6 -0
- package/dist/lsp/worker/WorkerThreadProjectRunner.js.map +1 -1
- package/dist/lsp/worker/run.js +20 -3
- package/dist/lsp/worker/run.js.map +1 -1
- package/dist/parser/AstNode.d.ts +59 -2
- package/dist/parser/AstNode.js +63 -5
- package/dist/parser/AstNode.js.map +1 -1
- package/dist/parser/BrsTranspileState.d.ts +44 -0
- package/dist/parser/BrsTranspileState.js +49 -0
- package/dist/parser/BrsTranspileState.js.map +1 -1
- package/dist/parser/Expression.d.ts +56 -8
- package/dist/parser/Expression.js +91 -8
- package/dist/parser/Expression.js.map +1 -1
- package/dist/parser/Parser.d.ts +0 -5
- package/dist/parser/Parser.js +5 -9
- package/dist/parser/Parser.js.map +1 -1
- package/dist/parser/SGParser.d.ts +7 -1
- package/dist/parser/SGParser.js +20 -10
- package/dist/parser/SGParser.js.map +1 -1
- package/dist/parser/SGTypes.js +8 -2
- package/dist/parser/SGTypes.js.map +1 -1
- package/dist/parser/Statement.d.ts +21 -10
- package/dist/parser/Statement.js +61 -1
- package/dist/parser/Statement.js.map +1 -1
- package/dist/preprocessor/Manifest.d.ts +16 -0
- package/dist/preprocessor/Manifest.js +21 -5
- package/dist/preprocessor/Manifest.js.map +1 -1
- package/dist/roku-types/index.d.ts +3 -0
- package/dist/types/BuiltInInterfaceAdder.js +1 -1
- package/dist/types/BuiltInInterfaceAdder.js.map +1 -1
- package/dist/types/InheritableType.d.ts +0 -1
- package/dist/types/InheritableType.js +12 -11
- package/dist/types/InheritableType.js.map +1 -1
- package/dist/types/InterfaceType.js +6 -0
- package/dist/types/InterfaceType.js.map +1 -1
- package/dist/types/IntersectionType.d.ts +1 -1
- package/dist/types/IntersectionType.js +7 -7
- package/dist/types/IntersectionType.js.map +1 -1
- package/dist/types/ReferenceType.js +1 -1
- package/dist/types/ReferenceType.js.map +1 -1
- package/dist/types/helpers.d.ts +2 -2
- package/dist/types/helpers.js +8 -5
- package/dist/types/helpers.js.map +1 -1
- package/dist/util.d.ts +38 -4
- package/dist/util.js +296 -29
- package/dist/util.js.map +1 -1
- package/package.json +12 -18
package/README.md
CHANGED
|
@@ -186,9 +186,11 @@ The presence of a `bsconfig.json` file in a directory indicates that the directo
|
|
|
186
186
|
"**/*"
|
|
187
187
|
],
|
|
188
188
|
"outDir": "out",
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
189
|
+
"compilerOptions": {
|
|
190
|
+
//this flag tells BrighterScript that for every xml file, try to import a .bs file with the same name and location
|
|
191
|
+
"autoImportComponentScript": true,
|
|
192
|
+
"sourceMap": true
|
|
193
|
+
}
|
|
192
194
|
}
|
|
193
195
|
```
|
|
194
196
|
|
package/bsconfig.schema.json
CHANGED
|
@@ -70,6 +70,8 @@
|
|
|
70
70
|
},
|
|
71
71
|
"manifest": {
|
|
72
72
|
"description": "A entry to modify manifest values",
|
|
73
|
+
"deprecated": true,
|
|
74
|
+
"deprecationMessage": "Deprecated starting in v1. Use `compilerOptions.manifest` instead.",
|
|
73
75
|
"type": "object",
|
|
74
76
|
"properties": {
|
|
75
77
|
"bs_const": {
|
|
@@ -147,11 +149,15 @@
|
|
|
147
149
|
},
|
|
148
150
|
"sourceMap": {
|
|
149
151
|
"description": "Enables generating sourcemap files, which allow debugging tools to show the original source code while running the emitted files.",
|
|
152
|
+
"deprecated": true,
|
|
153
|
+
"deprecationMessage": "Deprecated starting in v1. Use `compilerOptions.sourceMap` instead.",
|
|
150
154
|
"type": "boolean",
|
|
151
155
|
"default": false
|
|
152
156
|
},
|
|
153
157
|
"relativeSourceMaps": {
|
|
154
158
|
"description": "If true, source file paths in generated sourcemaps will be relative to the map file location instead of absolute. This makes sourcemaps portable across different machines and environments.",
|
|
159
|
+
"deprecated": true,
|
|
160
|
+
"deprecationMessage": "Deprecated starting in v1. Use `compilerOptions.relativeSourceMaps` instead.",
|
|
155
161
|
"type": "boolean",
|
|
156
162
|
"default": false
|
|
157
163
|
},
|
|
@@ -258,16 +264,22 @@
|
|
|
258
264
|
},
|
|
259
265
|
"emitFullPaths": {
|
|
260
266
|
"description": "Emit full paths to files when printing diagnostics to the console.",
|
|
267
|
+
"deprecated": true,
|
|
268
|
+
"deprecationMessage": "Deprecated starting in v1. Use `compilerOptions.emitFullPaths` instead.",
|
|
261
269
|
"type": "boolean",
|
|
262
270
|
"default": false
|
|
263
271
|
},
|
|
264
272
|
"emitDefinitions": {
|
|
265
273
|
"description": "Emit type definition files (`d.bs`) during transpile",
|
|
274
|
+
"deprecated": true,
|
|
275
|
+
"deprecationMessage": "Deprecated starting in v1. Use `compilerOptions.emitDefinitions` instead.",
|
|
266
276
|
"type": "boolean",
|
|
267
277
|
"default": false
|
|
268
278
|
},
|
|
269
279
|
"removeParameterTypes": {
|
|
270
280
|
"description": "Removes the explicit type to function's parameters and return (i.e. the `as type` syntax) ",
|
|
281
|
+
"deprecated": true,
|
|
282
|
+
"deprecationMessage": "Deprecated starting in v1. Use `compilerOptions.removeParameterTypes` instead.",
|
|
271
283
|
"type": "boolean",
|
|
272
284
|
"default": false
|
|
273
285
|
},
|
|
@@ -343,6 +355,8 @@
|
|
|
343
355
|
},
|
|
344
356
|
"autoImportComponentScript": {
|
|
345
357
|
"description": "When enabled, every xml component will search for a .bs or .brs file with the same name in the same folder, and add it as a script import if found. Disabled by default",
|
|
358
|
+
"deprecated": true,
|
|
359
|
+
"deprecationMessage": "Deprecated starting in v1. Use `compilerOptions.autoImportComponentScript` instead.",
|
|
346
360
|
"type": "boolean",
|
|
347
361
|
"default": false
|
|
348
362
|
},
|
|
@@ -361,10 +375,14 @@
|
|
|
361
375
|
},
|
|
362
376
|
"sourceRoot": {
|
|
363
377
|
"description": "Override the root directory path where debugger should locate the source files. The location will be embedded in the source map to help debuggers locate the original source files. This only applies to files found within rootDir. This is useful when you want to preprocess files before passing them to BrighterScript, and want a debugger to open the original files. This option also affects the `SOURCE_FILE_PATH` and `SOURCE_LOCATION` source literals.",
|
|
378
|
+
"deprecated": true,
|
|
379
|
+
"deprecationMessage": "Deprecated starting in v1. Use `compilerOptions.sourceRoot` instead.",
|
|
364
380
|
"type": "string"
|
|
365
381
|
},
|
|
366
382
|
"resolveSourceRoot": {
|
|
367
383
|
"description": "Should the `sourceRoot` property be resolve to an absolute path (relative to the bsconfig it's defined in)",
|
|
384
|
+
"deprecated": true,
|
|
385
|
+
"deprecationMessage": "Deprecated starting in v1. Use `compilerOptions.resolveSourceRoot` instead.",
|
|
368
386
|
"type": "boolean",
|
|
369
387
|
"default": false
|
|
370
388
|
},
|
|
@@ -396,21 +414,154 @@
|
|
|
396
414
|
},
|
|
397
415
|
"allowBrighterScriptInBrightScript": {
|
|
398
416
|
"description": "Allow brighterscript features (classes, interfaces, etc...) to be included in BrightScript (`.brs`) files, and force those files to be transpiled.",
|
|
417
|
+
"deprecated": true,
|
|
418
|
+
"deprecationMessage": "Deprecated starting in v1. Use `compilerOptions.allowBrighterScriptInBrightScript` instead.",
|
|
399
419
|
"type": "boolean",
|
|
400
420
|
"default": false
|
|
401
421
|
},
|
|
402
422
|
"legacyCallfuncHandling": {
|
|
403
423
|
"description": "Legacy RokuOS versions required at least one argument in callfunc() invocations. Previous brighterscript versions handled this by inserting invalid as an argument when no other args are present. This is not necessary in modern RokuOS versions.",
|
|
424
|
+
"deprecated": true,
|
|
425
|
+
"deprecationMessage": "Deprecated starting in v1. Use `compilerOptions.legacyCallfuncHandling` instead.",
|
|
404
426
|
"type": "boolean",
|
|
405
427
|
"default": false
|
|
406
428
|
},
|
|
407
429
|
"minFirmwareVersion": {
|
|
408
430
|
"description": "The minimum Roku firmware version required to run this project. When set, BrightScript (.brs) files will be validated to ensure they only use language features available in that firmware version or earlier. BrighterScript (.bs) files are always allowed to use all features since they are transpiled. Should be a semver-compatible string (e.g. \"11.0.0\").",
|
|
431
|
+
"deprecated": true,
|
|
432
|
+
"deprecationMessage": "Deprecated starting in v1. Use `compilerOptions.minFirmwareVersion` instead.",
|
|
409
433
|
"type": "string",
|
|
410
434
|
"examples": [
|
|
411
435
|
"11.0.0",
|
|
412
436
|
"12.0.0"
|
|
413
437
|
]
|
|
438
|
+
},
|
|
439
|
+
"strict": {
|
|
440
|
+
"description": "Enables a set of stricter type-checking rules and language features. When set, this acts as a default value for other `strict`-related options. Defaults to false.",
|
|
441
|
+
"deprecated": true,
|
|
442
|
+
"deprecationMessage": "Deprecated starting in v1. Use `compilerOptions.strict` instead.",
|
|
443
|
+
"type": "boolean",
|
|
444
|
+
"default": false
|
|
445
|
+
},
|
|
446
|
+
"strictCallFunc": {
|
|
447
|
+
"description": "Enables stricter type-checking for callfunc() invocations. When true, callfunc() invocations will not be allowed on generic Node types. Defaults to false.",
|
|
448
|
+
"deprecated": true,
|
|
449
|
+
"deprecationMessage": "Deprecated starting in v1. Use `compilerOptions.strictCallFunc` instead.",
|
|
450
|
+
"type": "boolean",
|
|
451
|
+
"default": false
|
|
452
|
+
},
|
|
453
|
+
"strictNodeMembers": {
|
|
454
|
+
"description": "Enables stricter type-checking for Node members. When true, unknown members on Node types will be treated as errors instead of dynamic values. Defaults to false.",
|
|
455
|
+
"deprecated": true,
|
|
456
|
+
"deprecationMessage": "Deprecated starting in v1. Use `compilerOptions.strictNodeMembers` instead.",
|
|
457
|
+
"type": "boolean",
|
|
458
|
+
"default": false
|
|
459
|
+
},
|
|
460
|
+
"compilerOptions": {
|
|
461
|
+
"description": "Options that control how BrighterScript interprets, validates, and compiles your code (as opposed to the top-level options, which control project structure, file discovery, and tooling/reporting behavior). Similar in spirit to TypeScript's `compilerOptions`. If an option is set both here and at the top level (deprecated location), the value here wins.",
|
|
462
|
+
"type": "object",
|
|
463
|
+
"properties": {
|
|
464
|
+
"allowBrighterScriptInBrightScript": {
|
|
465
|
+
"description": "Allow brighterscript features (classes, interfaces, etc...) to be included in BrightScript (`.brs`) files, and force those files to be transpiled.",
|
|
466
|
+
"type": "boolean",
|
|
467
|
+
"default": false
|
|
468
|
+
},
|
|
469
|
+
"autoImportComponentScript": {
|
|
470
|
+
"description": "When enabled, every xml component will search for a .bs or .brs file with the same name in the same folder, and add it as a script import if found. Disabled by default",
|
|
471
|
+
"type": "boolean",
|
|
472
|
+
"default": false
|
|
473
|
+
},
|
|
474
|
+
"bslibDestinationDir": {
|
|
475
|
+
"description": "Override the destination directory for the bslib.brs file. Use this if you want to customize where the bslib.brs file is located in the staging directory. Note that using a location outside of `source` will break scripts inside `source` that depend on bslib.brs. Defaults to `source`.",
|
|
476
|
+
"type": "string",
|
|
477
|
+
"default": "source"
|
|
478
|
+
},
|
|
479
|
+
"emitDefinitions": {
|
|
480
|
+
"description": "Emit type definition files (`d.bs`) during transpile",
|
|
481
|
+
"type": "boolean",
|
|
482
|
+
"default": false
|
|
483
|
+
},
|
|
484
|
+
"emitFullPaths": {
|
|
485
|
+
"description": "Emit full paths to files when printing diagnostics to the console.",
|
|
486
|
+
"type": "boolean",
|
|
487
|
+
"default": false
|
|
488
|
+
},
|
|
489
|
+
"legacyCallfuncHandling": {
|
|
490
|
+
"description": "Legacy RokuOS versions required at least one argument in callfunc() invocations. Previous brighterscript versions handled this by inserting invalid as an argument when no other args are present. This is not necessary in modern RokuOS versions.",
|
|
491
|
+
"type": "boolean",
|
|
492
|
+
"default": false
|
|
493
|
+
},
|
|
494
|
+
"manifest": {
|
|
495
|
+
"description": "A entry to modify manifest values",
|
|
496
|
+
"type": "object",
|
|
497
|
+
"properties": {
|
|
498
|
+
"bs_const": {
|
|
499
|
+
"description": "A dictionary of bs_consts to change or add to the manifest. Each entry ",
|
|
500
|
+
"type": "object",
|
|
501
|
+
"patternProperties": {
|
|
502
|
+
"^.+$": {
|
|
503
|
+
"type": [
|
|
504
|
+
"boolean",
|
|
505
|
+
"null"
|
|
506
|
+
]
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
},
|
|
512
|
+
"minFirmwareVersion": {
|
|
513
|
+
"description": "The minimum Roku firmware version required to run this project. When set, BrightScript (.brs) files will be validated to ensure they only use language features available in that firmware version or earlier. BrighterScript (.bs) files are always allowed to use all features since they are transpiled. Should be a semver-compatible string (e.g. \"11.0.0\").",
|
|
514
|
+
"type": "string",
|
|
515
|
+
"examples": [
|
|
516
|
+
"11.0.0",
|
|
517
|
+
"12.0.0"
|
|
518
|
+
]
|
|
519
|
+
},
|
|
520
|
+
"pruneEmptyCodeFiles": {
|
|
521
|
+
"description": "Excludes empty files from being included in the output. Some Brighterscript files are left empty or with only comments after transpilation to Brightscript. The default behavior is to write these to disk after transpilation. Setting this flag to `true` will prevent empty files being written and will remove associated script tags from XML.",
|
|
522
|
+
"type": "boolean",
|
|
523
|
+
"default": false
|
|
524
|
+
},
|
|
525
|
+
"relativeSourceMaps": {
|
|
526
|
+
"description": "If true, source file paths in generated sourcemaps will be relative to the map file location instead of absolute. This makes sourcemaps portable across different machines and environments.",
|
|
527
|
+
"type": "boolean",
|
|
528
|
+
"default": false
|
|
529
|
+
},
|
|
530
|
+
"removeParameterTypes": {
|
|
531
|
+
"description": "Removes the explicit type to function's parameters and return (i.e. the `as type` syntax) ",
|
|
532
|
+
"type": "boolean",
|
|
533
|
+
"default": false
|
|
534
|
+
},
|
|
535
|
+
"resolveSourceRoot": {
|
|
536
|
+
"description": "Should the `sourceRoot` property be resolve to an absolute path (relative to the bsconfig it's defined in)",
|
|
537
|
+
"type": "boolean",
|
|
538
|
+
"default": false
|
|
539
|
+
},
|
|
540
|
+
"sourceMap": {
|
|
541
|
+
"description": "Enables generating sourcemap files, which allow debugging tools to show the original source code while running the emitted files.",
|
|
542
|
+
"type": "boolean",
|
|
543
|
+
"default": false
|
|
544
|
+
},
|
|
545
|
+
"sourceRoot": {
|
|
546
|
+
"description": "Override the root directory path where debugger should locate the source files. The location will be embedded in the source map to help debuggers locate the original source files. This only applies to files found within rootDir. This is useful when you want to preprocess files before passing them to BrighterScript, and want a debugger to open the original files. This option also affects the `SOURCE_FILE_PATH` and `SOURCE_LOCATION` source literals.",
|
|
547
|
+
"type": "string"
|
|
548
|
+
},
|
|
549
|
+
"strict": {
|
|
550
|
+
"description": "Enables a set of stricter type-checking rules and language features. When set, this acts as a default value for other `strict`-related options. Defaults to false.",
|
|
551
|
+
"type": "boolean",
|
|
552
|
+
"default": false
|
|
553
|
+
},
|
|
554
|
+
"strictCallFunc": {
|
|
555
|
+
"description": "Enables stricter type-checking for callfunc() invocations. When true, callfunc() invocations will not be allowed on generic Node types. Defaults to false.",
|
|
556
|
+
"type": "boolean",
|
|
557
|
+
"default": false
|
|
558
|
+
},
|
|
559
|
+
"strictNodeMembers": {
|
|
560
|
+
"description": "Enables stricter type-checking for Node members. When true, unknown members on Node types will be treated as errors instead of dynamic values. Defaults to false.",
|
|
561
|
+
"type": "boolean",
|
|
562
|
+
"default": false
|
|
563
|
+
}
|
|
564
|
+
}
|
|
414
565
|
}
|
|
415
566
|
}
|
|
416
567
|
}
|
package/dist/BsConfig.d.ts
CHANGED
|
@@ -9,6 +9,9 @@ export interface BsConfig {
|
|
|
9
9
|
* Prefix with a question mark (?) to prevent throwing an exception if the file does not exist.
|
|
10
10
|
*/
|
|
11
11
|
project?: string;
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated Moved to `compilerOptions.manifest`. If both are present, `compilerOptions.manifest` wins.
|
|
14
|
+
*/
|
|
12
15
|
manifest?: {
|
|
13
16
|
bs_const?: Record<string, boolean | null>;
|
|
14
17
|
};
|
|
@@ -42,6 +45,18 @@ export interface BsConfig {
|
|
|
42
45
|
* If true, the files are not copied to outDir.
|
|
43
46
|
*/
|
|
44
47
|
noEmit?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* @deprecated packaging is handled outside of `BsConfig`
|
|
50
|
+
*/
|
|
51
|
+
createPackage?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* @deprecated deployment is handled outside of `BsConfig`
|
|
54
|
+
*/
|
|
55
|
+
deploy?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* @deprecated staging copy behavior is handled outside of `BsConfig`
|
|
58
|
+
*/
|
|
59
|
+
copyToStaging?: boolean;
|
|
45
60
|
/**
|
|
46
61
|
* If true, the server will keep running and will watch and recompile on every file change
|
|
47
62
|
* @default false
|
|
@@ -69,17 +84,15 @@ export interface BsConfig {
|
|
|
69
84
|
*/
|
|
70
85
|
diagnosticSeverityOverrides?: Record<number | string, 'error' | 'warn' | 'info' | 'hint'>;
|
|
71
86
|
/**
|
|
72
|
-
*
|
|
87
|
+
* @deprecated Moved to `compilerOptions.emitFullPaths`. If both are present, `compilerOptions.emitFullPaths` wins.
|
|
73
88
|
*/
|
|
74
89
|
emitFullPaths?: boolean;
|
|
75
90
|
/**
|
|
76
|
-
*
|
|
77
|
-
* @default false
|
|
91
|
+
* @deprecated Moved to `compilerOptions.emitDefinitions`. If both are present, `compilerOptions.emitDefinitions` wins.
|
|
78
92
|
*/
|
|
79
93
|
emitDefinitions?: boolean;
|
|
80
94
|
/**
|
|
81
|
-
*
|
|
82
|
-
* @default false
|
|
95
|
+
* @deprecated Moved to `compilerOptions.removeParameterTypes`. If both are present, `compilerOptions.removeParameterTypes` wins.
|
|
83
96
|
*/
|
|
84
97
|
removeParameterTypes?: boolean;
|
|
85
98
|
/**
|
|
@@ -132,8 +145,7 @@ export interface BsConfig {
|
|
|
132
145
|
*/
|
|
133
146
|
require?: Array<string>;
|
|
134
147
|
/**
|
|
135
|
-
*
|
|
136
|
-
* in the same folder, and add it as a script import if found. Disabled by default"
|
|
148
|
+
* @deprecated Moved to `compilerOptions.autoImportComponentScript`. If both are present, `compilerOptions.autoImportComponentScript` wins.
|
|
137
149
|
*/
|
|
138
150
|
autoImportComponentScript?: boolean;
|
|
139
151
|
/**
|
|
@@ -148,56 +160,83 @@ export interface BsConfig {
|
|
|
148
160
|
*/
|
|
149
161
|
logLevel?: LogLevel | 'error' | 'warn' | 'log' | 'info' | 'debug' | 'trace' | 'off';
|
|
150
162
|
/**
|
|
151
|
-
*
|
|
152
|
-
* `SOURCE_LOCATION` runtime literals. Only applies to files within `rootDir`.
|
|
153
|
-
*
|
|
154
|
-
* When `relativeSourceMaps` is false (default): the `rootDir` portion of each source path is
|
|
155
|
-
* replaced with `sourceRoot` directly in `sources[]`. The map's `sourceRoot` field is not written.
|
|
156
|
-
*
|
|
157
|
-
* When `relativeSourceMaps` is true: the map's `sourceRoot` field is set to this value, and
|
|
158
|
-
* `sources[]` entries are relative to `sourceRoot` (per the sourcemap spec).
|
|
159
|
-
*
|
|
160
|
-
* In both modes, `SOURCE_FILE_PATH` and `SOURCE_LOCATION` reflect the `sourceRoot`-substituted path.
|
|
163
|
+
* @deprecated Moved to `compilerOptions.sourceRoot`. If both are present, `compilerOptions.sourceRoot` wins.
|
|
161
164
|
*/
|
|
162
165
|
sourceRoot?: string;
|
|
163
166
|
/**
|
|
164
|
-
*
|
|
165
|
-
* @default false
|
|
167
|
+
* @deprecated Moved to `compilerOptions.resolveSourceRoot`. If both are present, `compilerOptions.resolveSourceRoot` wins.
|
|
166
168
|
*/
|
|
167
169
|
resolveSourceRoot?: boolean;
|
|
168
170
|
/**
|
|
169
|
-
*
|
|
170
|
-
* @default true
|
|
171
|
+
* @deprecated Moved to `compilerOptions.sourceMap`. If both are present, `compilerOptions.sourceMap` wins.
|
|
171
172
|
*/
|
|
172
173
|
sourceMap?: boolean;
|
|
173
174
|
/**
|
|
174
|
-
*
|
|
175
|
-
* Only has an effect when `sourceMap` is true.
|
|
176
|
-
*
|
|
177
|
-
* When false (default): `sources[]` contains absolute paths. If `sourceRoot` is set, the `rootDir`
|
|
178
|
-
* portion is replaced with `sourceRoot` in-place; the map's `sourceRoot` field is never written.
|
|
179
|
-
*
|
|
180
|
-
* When true: `sources[]` entries are relative to the map file's directory, making sourcemaps
|
|
181
|
-
* portable across machines. If `sourceRoot` is also set, the map's `sourceRoot` field is written
|
|
182
|
-
* and `sources[]` entries are instead relative to `sourceRoot` (per the sourcemap spec — consumers
|
|
183
|
-
* reconstruct the full path as `path.resolve(sourceRoot, sources[0])`).
|
|
184
|
-
* @default false
|
|
175
|
+
* @deprecated Moved to `compilerOptions.relativeSourceMaps`. If both are present, `compilerOptions.relativeSourceMaps` wins.
|
|
185
176
|
*/
|
|
186
177
|
relativeSourceMaps?: boolean;
|
|
187
178
|
/**
|
|
188
|
-
*
|
|
189
|
-
* are left empty or with only comments after transpilation to Brightscript.
|
|
190
|
-
* The default behavior is to write these to disk after transpilation.
|
|
191
|
-
* Setting this flag to `true` will prevent empty files being written and will
|
|
192
|
-
* remove associated script tags from XML
|
|
193
|
-
* @default false
|
|
179
|
+
* @deprecated Moved to `compilerOptions.pruneEmptyCodeFiles`. If both are present, `compilerOptions.pruneEmptyCodeFiles` wins.
|
|
194
180
|
*/
|
|
195
181
|
pruneEmptyCodeFiles?: boolean;
|
|
182
|
+
/**
|
|
183
|
+
* @deprecated Moved to `compilerOptions.allowBrighterScriptInBrightScript`. If both are present, `compilerOptions.allowBrighterScriptInBrightScript` wins.
|
|
184
|
+
*/
|
|
185
|
+
allowBrighterScriptInBrightScript?: boolean;
|
|
186
|
+
/**
|
|
187
|
+
* @deprecated Moved to `compilerOptions.bslibDestinationDir`. If both are present, `compilerOptions.bslibDestinationDir` wins.
|
|
188
|
+
*/
|
|
189
|
+
bslibDestinationDir?: string;
|
|
190
|
+
/**
|
|
191
|
+
* @deprecated Moved to `compilerOptions.legacyCallfuncHandling`. If both are present, `compilerOptions.legacyCallfuncHandling` wins.
|
|
192
|
+
*/
|
|
193
|
+
legacyCallfuncHandling?: boolean;
|
|
194
|
+
/**
|
|
195
|
+
* @deprecated Moved to `compilerOptions.minFirmwareVersion`. If both are present, `compilerOptions.minFirmwareVersion` wins.
|
|
196
|
+
*/
|
|
197
|
+
minFirmwareVersion?: string;
|
|
198
|
+
/**
|
|
199
|
+
* When set to false, validation is skipped entirely. This can speed up builds when diagnostics
|
|
200
|
+
* are not needed (e.g. when using the VSCode extension which already surfaces diagnostics in the
|
|
201
|
+
* editor). Note that skipping validation may cause transpilation to fail or produce incorrect
|
|
202
|
+
* output if the project contains errors that would normally be caught during validation.
|
|
203
|
+
* @default true
|
|
204
|
+
*/
|
|
205
|
+
validate?: boolean;
|
|
206
|
+
/**
|
|
207
|
+
* @deprecated Moved to `compilerOptions.strict`. If both are present, `compilerOptions.strict` wins.
|
|
208
|
+
*/
|
|
209
|
+
strict?: boolean;
|
|
210
|
+
/**
|
|
211
|
+
* @deprecated Moved to `compilerOptions.strictCallFunc`. If both are present, `compilerOptions.strictCallFunc` wins.
|
|
212
|
+
*/
|
|
213
|
+
strictCallFunc?: boolean;
|
|
214
|
+
/**
|
|
215
|
+
* @deprecated Moved to `compilerOptions.strictNodeMembers`. If both are present, `compilerOptions.strictNodeMembers` wins.
|
|
216
|
+
*/
|
|
217
|
+
strictNodeMembers?: boolean;
|
|
218
|
+
/**
|
|
219
|
+
* Options that control how BrighterScript interprets, validates, and compiles your code
|
|
220
|
+
* (as opposed to top-level options, which control project structure, file discovery, and
|
|
221
|
+
* tooling/reporting behavior). Similar in spirit to TypeScript's `compilerOptions`.
|
|
222
|
+
*
|
|
223
|
+
* Several of these options used to live at the top level of `bsconfig.json`. Those top-level
|
|
224
|
+
* options still work, but are deprecated: if an option is set in both places, the value in
|
|
225
|
+
* `compilerOptions` wins, and a deprecation warning is emitted for the top-level usage.
|
|
226
|
+
*/
|
|
227
|
+
compilerOptions?: BsConfigCompilerOptions;
|
|
228
|
+
}
|
|
229
|
+
export interface BsConfigCompilerOptions {
|
|
196
230
|
/**
|
|
197
231
|
* Allow brighterscript features (classes, interfaces, etc...) to be included in BrightScript (`.brs`) files, and force those files to be transpiled.
|
|
198
232
|
* @default false
|
|
199
233
|
*/
|
|
200
234
|
allowBrighterScriptInBrightScript?: boolean;
|
|
235
|
+
/**
|
|
236
|
+
* When enabled, every xml component will search for a .bs or .brs file with the same name
|
|
237
|
+
* in the same folder, and add it as a script import if found. Disabled by default"
|
|
238
|
+
*/
|
|
239
|
+
autoImportComponentScript?: boolean;
|
|
201
240
|
/**
|
|
202
241
|
* Override the destination directory for the bslib.brs file. Use this if
|
|
203
242
|
* you want to customize where the bslib.brs file is located in the staging
|
|
@@ -205,7 +244,19 @@ export interface BsConfig {
|
|
|
205
244
|
* scripts inside `source` that depend on bslib.brs. Defaults to `source`.
|
|
206
245
|
*/
|
|
207
246
|
bslibDestinationDir?: string;
|
|
247
|
+
/**
|
|
248
|
+
* Emit type definition files (`d.bs`)
|
|
249
|
+
* @default false
|
|
250
|
+
*/
|
|
251
|
+
emitDefinitions?: boolean;
|
|
252
|
+
/**
|
|
253
|
+
* Emit full paths to files when printing diagnostics to the console. Defaults to false
|
|
254
|
+
*/
|
|
255
|
+
emitFullPaths?: boolean;
|
|
208
256
|
legacyCallfuncHandling?: boolean;
|
|
257
|
+
manifest?: {
|
|
258
|
+
bs_const?: Record<string, boolean | null>;
|
|
259
|
+
};
|
|
209
260
|
/**
|
|
210
261
|
* The minimum Roku firmware version required to run this project.
|
|
211
262
|
* When set, BrightScript (.brs) files are always validated against the version restriction.
|
|
@@ -217,14 +268,77 @@ export interface BsConfig {
|
|
|
217
268
|
*/
|
|
218
269
|
minFirmwareVersion?: string;
|
|
219
270
|
/**
|
|
220
|
-
*
|
|
221
|
-
* are
|
|
222
|
-
*
|
|
223
|
-
*
|
|
271
|
+
* Excludes empty files from being included in the output. Some Brighterscript files
|
|
272
|
+
* are left empty or with only comments after transpilation to Brightscript.
|
|
273
|
+
* The default behavior is to write these to disk after transpilation.
|
|
274
|
+
* Setting this flag to `true` will prevent empty files being written and will
|
|
275
|
+
* remove associated script tags from XML
|
|
276
|
+
* @default false
|
|
277
|
+
*/
|
|
278
|
+
pruneEmptyCodeFiles?: boolean;
|
|
279
|
+
/**
|
|
280
|
+
* If true, file paths in sourcemap `sources[]` will be written as relative paths instead of absolute.
|
|
281
|
+
* Only has an effect when `sourceMap` is true.
|
|
282
|
+
*
|
|
283
|
+
* When false (default): `sources[]` contains absolute paths. If `sourceRoot` is set, the `rootDir`
|
|
284
|
+
* portion is replaced with `sourceRoot` in-place; the map's `sourceRoot` field is never written.
|
|
285
|
+
*
|
|
286
|
+
* When true: `sources[]` entries are relative to the map file's directory, making sourcemaps
|
|
287
|
+
* portable across machines. If `sourceRoot` is also set, the map's `sourceRoot` field is written
|
|
288
|
+
* and `sources[]` entries are instead relative to `sourceRoot` (per the sourcemap spec — consumers
|
|
289
|
+
* reconstruct the full path as `path.resolve(sourceRoot, sources[0])`).
|
|
290
|
+
* @default false
|
|
291
|
+
*/
|
|
292
|
+
relativeSourceMaps?: boolean;
|
|
293
|
+
/**
|
|
294
|
+
* If true, removes the explicit type to function's parameters and return (i.e. the `as type` syntax); otherwise keep this information.
|
|
295
|
+
* @default false
|
|
296
|
+
*/
|
|
297
|
+
removeParameterTypes?: boolean;
|
|
298
|
+
/**
|
|
299
|
+
* Should the `sourceRoot` property be resolve to an absolute path (relative to the bsconfig it's defined in)
|
|
300
|
+
* @default false
|
|
301
|
+
*/
|
|
302
|
+
resolveSourceRoot?: boolean;
|
|
303
|
+
/**
|
|
304
|
+
* Enables generating sourcemap files, which allow debugging tools to show the original source code while running the emitted files.
|
|
224
305
|
* @default true
|
|
225
306
|
*/
|
|
226
|
-
|
|
307
|
+
sourceMap?: boolean;
|
|
308
|
+
/**
|
|
309
|
+
* Overrides where source files appear to live, in both sourcemaps and the `SOURCE_FILE_PATH` /
|
|
310
|
+
* `SOURCE_LOCATION` runtime literals. Only applies to files within `rootDir`.
|
|
311
|
+
*
|
|
312
|
+
* When `relativeSourceMaps` is false (default): the `rootDir` portion of each source path is
|
|
313
|
+
* replaced with `sourceRoot` directly in `sources[]`. The map's `sourceRoot` field is not written.
|
|
314
|
+
*
|
|
315
|
+
* When `relativeSourceMaps` is true: the map's `sourceRoot` field is set to this value, and
|
|
316
|
+
* `sources[]` entries are relative to `sourceRoot` (per the sourcemap spec).
|
|
317
|
+
*
|
|
318
|
+
* In both modes, `SOURCE_FILE_PATH` and `SOURCE_LOCATION` reflect the `sourceRoot`-substituted path.
|
|
319
|
+
*/
|
|
320
|
+
sourceRoot?: string;
|
|
321
|
+
/**
|
|
322
|
+
* When true, enables all strict mode options (strictCallFunc, strictNodeMembers, and any future options added that are considered "strict"). This is a convenient way to enable strict mode without having to set each option individually.
|
|
323
|
+
* @default false
|
|
324
|
+
*/
|
|
325
|
+
strict?: boolean;
|
|
326
|
+
/**
|
|
327
|
+
* Enables stricter type-checking for callfunc() invocations. When true, callfunc() invocations will not be allowed on generic Node types.
|
|
328
|
+
* @default false
|
|
329
|
+
*/
|
|
330
|
+
strictCallFunc?: boolean;
|
|
331
|
+
/**
|
|
332
|
+
* Enables stricter type-checking for Node members. When true, unknown members on Node types will be treated as errors instead of dynamic values.
|
|
333
|
+
* @default false
|
|
334
|
+
*/
|
|
335
|
+
strictNodeMembers?: boolean;
|
|
227
336
|
}
|
|
337
|
+
/**
|
|
338
|
+
* The list of `BsConfig` keys that were moved into `compilerOptions`. Kept in one place so the
|
|
339
|
+
* legacy-option shimming/deprecation logic in `util.ts` and the JSON schema stay in sync.
|
|
340
|
+
*/
|
|
341
|
+
export declare const deprecatedCompilerOptionKeys: ReadonlyArray<keyof BsConfigCompilerOptions & keyof BsConfig>;
|
|
228
342
|
/**
|
|
229
343
|
* Discriminated union describing how diagnostics are rendered to the console.
|
|
230
344
|
* - String shorthand: a preset name ('detailed' | 'github-actions') or a template string
|
|
@@ -250,6 +364,6 @@ export declare type NormalizedDiagnosticReporter = {
|
|
|
250
364
|
type: 'custom';
|
|
251
365
|
format: string;
|
|
252
366
|
};
|
|
253
|
-
declare type OptionalBsConfigFields = '_ancestors' | 'sourceRoot' | 'project' | 'manifest' | 'noProject' | 'extends' | 'require' | 'outDir' | 'diagnosticLevel' | 'rootDir' | 'stagingDir' | 'stagingFolderPath' | 'minFirmwareVersion' | 'diagnosticReporters';
|
|
367
|
+
declare type OptionalBsConfigFields = '_ancestors' | 'sourceRoot' | 'project' | 'manifest' | 'noProject' | 'extends' | 'require' | 'outDir' | 'createPackage' | 'deploy' | 'copyToStaging' | 'diagnosticLevel' | 'rootDir' | 'stagingDir' | 'stagingFolderPath' | 'minFirmwareVersion' | 'diagnosticReporters' | 'compilerOptions';
|
|
254
368
|
export declare type FinalizedBsConfig = Omit<Required<BsConfig>, OptionalBsConfigFields> & Pick<BsConfig, OptionalBsConfigFields>;
|
|
255
369
|
export {};
|
package/dist/BsConfig.js
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deprecatedCompilerOptionKeys = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* The list of `BsConfig` keys that were moved into `compilerOptions`. Kept in one place so the
|
|
6
|
+
* legacy-option shimming/deprecation logic in `util.ts` and the JSON schema stay in sync.
|
|
7
|
+
*/
|
|
8
|
+
exports.deprecatedCompilerOptionKeys = [
|
|
9
|
+
'allowBrighterScriptInBrightScript',
|
|
10
|
+
'autoImportComponentScript',
|
|
11
|
+
'bslibDestinationDir',
|
|
12
|
+
'emitDefinitions',
|
|
13
|
+
'emitFullPaths',
|
|
14
|
+
'legacyCallfuncHandling',
|
|
15
|
+
'manifest',
|
|
16
|
+
'minFirmwareVersion',
|
|
17
|
+
'pruneEmptyCodeFiles',
|
|
18
|
+
'relativeSourceMaps',
|
|
19
|
+
'removeParameterTypes',
|
|
20
|
+
'resolveSourceRoot',
|
|
21
|
+
'sourceMap',
|
|
22
|
+
'sourceRoot',
|
|
23
|
+
'strict',
|
|
24
|
+
'strictCallFunc',
|
|
25
|
+
'strictNodeMembers'
|
|
26
|
+
];
|
|
3
27
|
//# sourceMappingURL=BsConfig.js.map
|
package/dist/BsConfig.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BsConfig.js","sourceRoot":"","sources":["../src/BsConfig.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"BsConfig.js","sourceRoot":"","sources":["../src/BsConfig.ts"],"names":[],"mappings":";;;AAiYA;;;GAGG;AACU,QAAA,4BAA4B,GAAkE;IACvG,mCAAmC;IACnC,2BAA2B;IAC3B,qBAAqB;IACrB,iBAAiB;IACjB,eAAe;IACf,wBAAwB;IACxB,UAAU;IACV,oBAAoB;IACpB,qBAAqB;IACrB,oBAAoB;IACpB,sBAAsB;IACtB,mBAAmB;IACnB,WAAW;IACX,YAAY;IACZ,QAAQ;IACR,gBAAgB;IAChB,mBAAmB;CACtB,CAAC"}
|
|
@@ -113,8 +113,11 @@ class BusyStatusTracker {
|
|
|
113
113
|
}
|
|
114
114
|
once(eventName) {
|
|
115
115
|
return new Promise((resolve) => {
|
|
116
|
+
//the widened `eventName` can't match the literal-string `on()` overload
|
|
117
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
116
118
|
const off = this.on(eventName, (data) => {
|
|
117
119
|
off();
|
|
120
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
118
121
|
resolve(data);
|
|
119
122
|
});
|
|
120
123
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BusyStatusTracker.js","sourceRoot":"","sources":["../src/BusyStatusTracker.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAC7C,yCAAsC;AAStC;;;GAGG;AACH,MAAa,iBAAiB;IAA9B;QACI;;WAEG;QACI,eAAU,GAAsB,EAAE,CAAC;QA6GlC,YAAO,GAAG,IAAI,4BAAY,EAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"BusyStatusTracker.js","sourceRoot":"","sources":["../src/BusyStatusTracker.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAC7C,yCAAsC;AAStC;;;GAGG;AACH,MAAa,iBAAiB;IAA9B;QACI;;WAEG;QACI,eAAU,GAAsB,EAAE,CAAC;QA6GlC,YAAO,GAAG,IAAI,4BAAY,EAAsB,CAAC;IA0C7D,CAAC;IArJG;;;;OAIG;IACI,cAAc,CAAC,KAAQ,EAAE,KAAa;QACzC,MAAM,QAAQ,GAAG,IAAI,mBAAQ,EAAE,CAAC;QAEhC,MAAM,OAAO,GAAG;YACZ,KAAK,EAAE,KAAK;YACZ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,EAAE,CAAC;IACtC,CAAC;IAED;;;OAGG;IACH,IAAW,MAAM;QACb,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC;IAC5E,CAAC;CACJ;AA3JD,8CA2JC;AAID,IAAY,UAGX;AAHD,WAAY,UAAU;IAClB,2BAAa,CAAA;IACb,2BAAa,CAAA;AACjB,CAAC,EAHW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAGrB"}
|
|
@@ -221,6 +221,11 @@ class CrossScopeValidator {
|
|
|
221
221
|
getRequiredMap(scope) {
|
|
222
222
|
const map = new Map();
|
|
223
223
|
scope.enumerateBrsFiles((file) => {
|
|
224
|
+
//typedef files (.d.bs) are ambient declarations only - never validated for diagnostics,
|
|
225
|
+
//so don't flag their own unresolved type references as missing symbols
|
|
226
|
+
if (file.isTypedef) {
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
224
229
|
for (const symbol of file.requiredSymbols) {
|
|
225
230
|
const symbolKeysArray = this.symbolMapKeys(symbol);
|
|
226
231
|
for (const symbolKeys of symbolKeysArray) {
|