brighterscript 1.0.0-alpha.26 → 1.0.0-alpha.27
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/CHANGELOG.md +21 -5
- package/dist/AstValidationSegmenter.d.ts +1 -1
- package/dist/AstValidationSegmenter.js +2 -3
- package/dist/AstValidationSegmenter.js.map +1 -1
- package/dist/DiagnosticMessages.d.ts +1 -3
- package/dist/DiagnosticMessages.js +5 -8
- package/dist/DiagnosticMessages.js.map +1 -1
- package/dist/Program.js +24 -25
- package/dist/Program.js.map +1 -1
- package/dist/Scope.d.ts +2 -8
- package/dist/Scope.js +20 -22
- package/dist/Scope.js.map +1 -1
- package/dist/SymbolTable.d.ts +1 -8
- package/dist/SymbolTable.js +1 -10
- package/dist/SymbolTable.js.map +1 -1
- package/dist/SymbolTableFlag.d.ts +8 -0
- package/dist/SymbolTableFlag.js +13 -0
- package/dist/SymbolTableFlag.js.map +1 -0
- package/dist/XmlScope.d.ts +1 -1
- package/dist/XmlScope.js +6 -7
- package/dist/XmlScope.js.map +1 -1
- package/dist/astUtils/CachedLookups.d.ts +1 -2
- package/dist/astUtils/CachedLookups.js +0 -11
- package/dist/astUtils/CachedLookups.js.map +1 -1
- package/dist/astUtils/creators.js +45 -6
- package/dist/astUtils/creators.js.map +1 -1
- package/dist/astUtils/reflection.d.ts +2 -0
- package/dist/astUtils/reflection.js +11 -3
- package/dist/astUtils/reflection.js.map +1 -1
- package/dist/astUtils/reflection.spec.js +1 -1
- package/dist/astUtils/reflection.spec.js.map +1 -1
- package/dist/bscPlugin/completions/CompletionsProcessor.js +20 -20
- package/dist/bscPlugin/completions/CompletionsProcessor.js.map +1 -1
- package/dist/bscPlugin/hover/HoverProcessor.d.ts +1 -0
- package/dist/bscPlugin/hover/HoverProcessor.js +26 -6
- package/dist/bscPlugin/hover/HoverProcessor.js.map +1 -1
- package/dist/bscPlugin/hover/HoverProcessor.spec.js +74 -2
- package/dist/bscPlugin/hover/HoverProcessor.spec.js.map +1 -1
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.js +2 -3
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.js.map +1 -1
- package/dist/bscPlugin/validation/BrsFileValidator.js +25 -26
- package/dist/bscPlugin/validation/BrsFileValidator.js.map +1 -1
- package/dist/bscPlugin/validation/ScopeValidator.d.ts +6 -0
- package/dist/bscPlugin/validation/ScopeValidator.js +70 -20
- package/dist/bscPlugin/validation/ScopeValidator.js.map +1 -1
- package/dist/bscPlugin/validation/ScopeValidator.spec.js +92 -10
- package/dist/bscPlugin/validation/ScopeValidator.spec.js.map +1 -1
- package/dist/diagnosticUtils.d.ts +1 -1
- package/dist/files/BrsFile.Class.spec.js +4 -3
- package/dist/files/BrsFile.Class.spec.js.map +1 -1
- package/dist/files/BrsFile.d.ts +3 -4
- package/dist/files/BrsFile.js +19 -112
- package/dist/files/BrsFile.js.map +1 -1
- package/dist/files/BrsFile.spec.js +56 -156
- package/dist/files/BrsFile.spec.js.map +1 -1
- package/dist/files/XmlFile.d.ts +2 -3
- package/dist/files/XmlFile.js +0 -2
- package/dist/files/XmlFile.js.map +1 -1
- package/dist/interfaces.d.ts +77 -83
- package/dist/interfaces.js +9 -9
- package/dist/interfaces.js.map +1 -1
- package/dist/parser/Expression.d.ts +85 -91
- package/dist/parser/Expression.js +50 -28
- package/dist/parser/Expression.js.map +1 -1
- package/dist/parser/Parser.Class.spec.js +15 -16
- package/dist/parser/Parser.Class.spec.js.map +1 -1
- package/dist/parser/Parser.d.ts +1 -2
- package/dist/parser/Parser.js +68 -62
- package/dist/parser/Parser.js.map +1 -1
- package/dist/parser/Parser.spec.js +27 -28
- package/dist/parser/Parser.spec.js.map +1 -1
- package/dist/parser/SGParser.js +49 -35
- package/dist/parser/SGParser.js.map +1 -1
- package/dist/parser/SGTypes.d.ts +36 -24
- package/dist/parser/SGTypes.js +26 -55
- package/dist/parser/SGTypes.js.map +1 -1
- package/dist/parser/Statement.d.ts +138 -139
- package/dist/parser/Statement.js +50 -37
- package/dist/parser/Statement.js.map +1 -1
- package/dist/parser/tests/expression/TypeExpression.spec.js +8 -9
- package/dist/parser/tests/expression/TypeExpression.spec.js.map +1 -1
- package/dist/parser/tests/statement/TryCatch.spec.js +9 -2
- package/dist/parser/tests/statement/TryCatch.spec.js.map +1 -1
- package/dist/roku-types/data.json +70 -52
- package/dist/roku-types/index.d.ts +43 -21
- package/dist/types/ArrayType.js +1 -2
- package/dist/types/ArrayType.js.map +1 -1
- package/dist/types/ArrayType.spec.js +7 -8
- package/dist/types/ArrayType.spec.js.map +1 -1
- package/dist/types/AssociativeArrayType.js +2 -3
- package/dist/types/AssociativeArrayType.js.map +1 -1
- package/dist/types/BscType.d.ts +1 -1
- package/dist/types/BscType.js +2 -3
- package/dist/types/BscType.js.map +1 -1
- package/dist/types/BuiltInInterfaceAdder.js +7 -8
- package/dist/types/BuiltInInterfaceAdder.js.map +1 -1
- package/dist/types/BuiltInInterfaceAdder.spec.js +31 -32
- package/dist/types/BuiltInInterfaceAdder.spec.js.map +1 -1
- package/dist/types/ClassType.spec.js +10 -11
- package/dist/types/ClassType.spec.js.map +1 -1
- package/dist/types/ComponentType.d.ts +2 -1
- package/dist/types/ComponentType.js.map +1 -1
- package/dist/types/EnumType.js +2 -3
- package/dist/types/EnumType.js.map +1 -1
- package/dist/types/InheritableType.js +3 -4
- package/dist/types/InheritableType.js.map +1 -1
- package/dist/types/InterfaceType.js +2 -3
- package/dist/types/InterfaceType.js.map +1 -1
- package/dist/types/InterfaceType.spec.js +3 -4
- package/dist/types/InterfaceType.spec.js.map +1 -1
- package/dist/types/ObjectType.js +1 -2
- package/dist/types/ObjectType.js.map +1 -1
- package/dist/types/ReferenceType.d.ts +1 -1
- package/dist/types/ReferenceType.spec.js +21 -22
- package/dist/types/ReferenceType.spec.js.map +1 -1
- package/dist/types/UnionType.js +3 -3
- package/dist/types/UnionType.js.map +1 -1
- package/dist/types/UnionType.spec.js +37 -38
- package/dist/types/UnionType.spec.js.map +1 -1
- package/dist/types/helper.spec.js +4 -5
- package/dist/types/helper.spec.js.map +1 -1
- package/dist/util.d.ts +3 -3
- package/dist/util.js +20 -19
- package/dist/util.js.map +1 -1
- package/dist/validators/ClassValidator.d.ts +0 -9
- package/dist/validators/ClassValidator.js +3 -46
- package/dist/validators/ClassValidator.js.map +1 -1
- package/package.json +1 -1
package/dist/interfaces.d.ts
CHANGED
|
@@ -3,13 +3,12 @@ import type { Range, Diagnostic, CodeAction, SemanticTokenTypes, SemanticTokenMo
|
|
|
3
3
|
import type { Scope } from './Scope';
|
|
4
4
|
import type { BrsFile } from './files/BrsFile';
|
|
5
5
|
import type { XmlFile } from './files/XmlFile';
|
|
6
|
-
import type { FunctionScope } from './FunctionScope';
|
|
7
6
|
import type { TypedFunctionType } from './types/TypedFunctionType';
|
|
8
7
|
import type { ParseMode } from './parser/Parser';
|
|
9
8
|
import type { Program } from './Program';
|
|
10
9
|
import type { ProgramBuilder } from './ProgramBuilder';
|
|
11
10
|
import type { ClassStatement, ConstStatement, EnumStatement, FunctionStatement, NamespaceStatement } from './parser/Statement';
|
|
12
|
-
import type { AstNode, Expression, Statement } from './parser/AstNode';
|
|
11
|
+
import type { AstNode, AstNodeKind, Expression, Statement } from './parser/AstNode';
|
|
13
12
|
import type { TranspileState } from './parser/TranspileState';
|
|
14
13
|
import type { SourceNode } from 'source-map';
|
|
15
14
|
import type { BscType } from './types/BscType';
|
|
@@ -18,8 +17,8 @@ import type { Identifier, Token } from './lexer/Token';
|
|
|
18
17
|
import type { BscFile } from './files/BscFile';
|
|
19
18
|
import type { FileFactory } from './files/Factory';
|
|
20
19
|
import type { LazyFileData } from './files/LazyFileData';
|
|
21
|
-
import type { SymbolTable
|
|
22
|
-
import type {
|
|
20
|
+
import type { SymbolTable } from './SymbolTable';
|
|
21
|
+
import type { SymbolTypeFlag } from './SymbolTableFlag';
|
|
23
22
|
export interface BsDiagnostic extends Diagnostic {
|
|
24
23
|
file: BscFile;
|
|
25
24
|
/**
|
|
@@ -73,28 +72,6 @@ export interface Callable {
|
|
|
73
72
|
*/
|
|
74
73
|
functionStatement: FunctionStatement;
|
|
75
74
|
}
|
|
76
|
-
export interface FunctionCall {
|
|
77
|
-
/**
|
|
78
|
-
* The full range of this function call (from the start of the function name to its closing paren)
|
|
79
|
-
*/
|
|
80
|
-
range: Range;
|
|
81
|
-
expression: CallExpression;
|
|
82
|
-
functionScope: FunctionScope;
|
|
83
|
-
file: BscFile;
|
|
84
|
-
name: string;
|
|
85
|
-
args: CallableArg[];
|
|
86
|
-
nameRange: Range;
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* An argument for an expression call.
|
|
90
|
-
*/
|
|
91
|
-
export interface CallableArg {
|
|
92
|
-
text: string;
|
|
93
|
-
type: BscType;
|
|
94
|
-
typeToken: Token;
|
|
95
|
-
range: Range;
|
|
96
|
-
expression: Expression;
|
|
97
|
-
}
|
|
98
75
|
export interface CallableParam {
|
|
99
76
|
name: string;
|
|
100
77
|
type: BscType;
|
|
@@ -182,71 +159,71 @@ export interface CompilerPlugin {
|
|
|
182
159
|
/**
|
|
183
160
|
* Called before a new program is created
|
|
184
161
|
*/
|
|
185
|
-
beforeProgramCreate
|
|
162
|
+
beforeProgramCreate?(event: BeforeProgramCreateEvent): any;
|
|
186
163
|
/**
|
|
187
164
|
* Called after a new program is created
|
|
188
165
|
*/
|
|
189
|
-
afterProgramCreate
|
|
166
|
+
afterProgramCreate?(event: AfterProgramCreateEvent): any;
|
|
190
167
|
/**
|
|
191
168
|
* Called before the program gets prepared for building
|
|
192
169
|
*/
|
|
193
|
-
beforePrepareProgram
|
|
170
|
+
beforePrepareProgram?(event: BeforePrepareProgramEvent): any;
|
|
194
171
|
/**
|
|
195
172
|
* Called when the program gets prepared for building
|
|
196
173
|
*/
|
|
197
|
-
prepareProgram
|
|
174
|
+
prepareProgram?(event: PrepareProgramEvent): any;
|
|
198
175
|
/**
|
|
199
176
|
* Called after the program gets prepared for building
|
|
200
177
|
*/
|
|
201
|
-
afterPrepareProgram
|
|
178
|
+
afterPrepareProgram?(event: AfterPrepareProgramEvent): any;
|
|
202
179
|
/**
|
|
203
180
|
* Called before the entire program is validated
|
|
204
181
|
*/
|
|
205
|
-
beforeProgramValidate
|
|
182
|
+
beforeProgramValidate?(event: BeforeProgramValidateEvent): any;
|
|
206
183
|
/**
|
|
207
184
|
* Called before the entire program is validated
|
|
208
185
|
*/
|
|
209
|
-
onProgramValidate
|
|
186
|
+
onProgramValidate?(event: OnProgramValidateEvent): any;
|
|
210
187
|
/**
|
|
211
188
|
* Called after the program has been validated
|
|
212
189
|
*/
|
|
213
|
-
afterProgramValidate
|
|
190
|
+
afterProgramValidate?(event: AfterProgramValidateEvent): any;
|
|
214
191
|
/**
|
|
215
192
|
* Called right before the program is disposed/destroyed
|
|
216
193
|
*/
|
|
217
|
-
beforeProgramDispose
|
|
194
|
+
beforeProgramDispose?(event: BeforeProgramDisposeEvent): any;
|
|
218
195
|
/**
|
|
219
196
|
* Emitted before the program starts collecting completions
|
|
220
197
|
*/
|
|
221
|
-
beforeProvideCompletions
|
|
198
|
+
beforeProvideCompletions?(event: BeforeProvideCompletionsEvent): any;
|
|
222
199
|
/**
|
|
223
200
|
* Use this event to contribute completions
|
|
224
201
|
*/
|
|
225
|
-
provideCompletions
|
|
202
|
+
provideCompletions?(event: ProvideCompletionsEvent): any;
|
|
226
203
|
/**
|
|
227
204
|
* Emitted after the program has finished collecting completions, but before they are sent to the client
|
|
228
205
|
*/
|
|
229
|
-
afterProvideCompletions
|
|
206
|
+
afterProvideCompletions?(event: AfterProvideCompletionsEvent): any;
|
|
230
207
|
/**
|
|
231
208
|
* Called before the `provideHover` hook. Use this if you need to prepare any of the in-memory objects before the `provideHover` gets called
|
|
232
209
|
*/
|
|
233
|
-
beforeProvideHover
|
|
210
|
+
beforeProvideHover?(event: BeforeProvideHoverEvent): any;
|
|
234
211
|
/**
|
|
235
212
|
* Called when bsc looks for hover information. Use this if your plugin wants to contribute hover information.
|
|
236
213
|
*/
|
|
237
|
-
provideHover
|
|
214
|
+
provideHover?(event: ProvideHoverEvent): any;
|
|
238
215
|
/**
|
|
239
216
|
* Called after the `provideHover` hook. Use this if you want to intercept or sanitize the hover data (even from other plugins) before it gets sent to the client.
|
|
240
217
|
*/
|
|
241
|
-
afterProvideHover
|
|
218
|
+
afterProvideHover?(event: AfterProvideHoverEvent): any;
|
|
242
219
|
/**
|
|
243
220
|
* Called after a scope was created
|
|
244
221
|
*/
|
|
245
|
-
afterScopeCreate
|
|
246
|
-
beforeScopeDispose
|
|
247
|
-
onScopeDispose
|
|
248
|
-
afterScopeDispose
|
|
249
|
-
beforeScopeValidate
|
|
222
|
+
afterScopeCreate?(event: AfterScopeCreateEvent): any;
|
|
223
|
+
beforeScopeDispose?(event: BeforeScopeDisposeEvent): any;
|
|
224
|
+
onScopeDispose?(event: OnScopeDisposeEvent): any;
|
|
225
|
+
afterScopeDispose?(event: AfterScopeDisposeEvent): any;
|
|
226
|
+
beforeScopeValidate?(event: BeforeScopeValidateEvent): any;
|
|
250
227
|
/**
|
|
251
228
|
* Called before the `provideDefinition` hook
|
|
252
229
|
*/
|
|
@@ -261,120 +238,119 @@ export interface CompilerPlugin {
|
|
|
261
238
|
* @param event
|
|
262
239
|
*/
|
|
263
240
|
afterProvideDefinition?(event: AfterProvideDefinitionEvent): any;
|
|
264
|
-
onScopeValidate
|
|
265
|
-
afterScopeValidate
|
|
266
|
-
onGetCodeActions
|
|
267
|
-
onGetSemanticTokens
|
|
241
|
+
onScopeValidate?(event: OnScopeValidateEvent): any;
|
|
242
|
+
afterScopeValidate?(event: BeforeScopeValidateEvent): any;
|
|
243
|
+
onGetCodeActions?(event: OnGetCodeActionsEvent): any;
|
|
244
|
+
onGetSemanticTokens?(event: OnGetSemanticTokensEvent): any;
|
|
268
245
|
/**
|
|
269
246
|
* Called before plugins are asked to provide files to the program. (excludes virtual files produced by `provideFile` events).
|
|
270
247
|
* Call the `setFileData()` method to override the file contents.
|
|
271
248
|
*/
|
|
272
|
-
beforeProvideFile
|
|
249
|
+
beforeProvideFile?(event: BeforeProvideFileEvent): any;
|
|
273
250
|
/**
|
|
274
251
|
* Give plugins the opportunity to handle processing a file. (excludes virtual files produced by `provideFile` events)
|
|
275
252
|
*/
|
|
276
|
-
provideFile
|
|
253
|
+
provideFile?(event: ProvideFileEvent): any;
|
|
277
254
|
/**
|
|
278
255
|
* Called after a file was added to the program. (excludes virtual files produced by `provideFile` events)
|
|
279
256
|
*/
|
|
280
|
-
afterProvideFile
|
|
257
|
+
afterProvideFile?(event: AfterProvideFileEvent): any;
|
|
281
258
|
/**
|
|
282
259
|
* Called before a file is added to the program.
|
|
283
260
|
* Includes physical files as well as any virtual files produced by `provideFile` events
|
|
284
261
|
*/
|
|
285
|
-
beforeFileAdd
|
|
262
|
+
beforeFileAdd?(event: BeforeFileAddEvent): any;
|
|
286
263
|
/**
|
|
287
264
|
* Called after a file has been added to the program.
|
|
288
265
|
* Includes physical files as well as any virtual files produced by `provideFile` events
|
|
289
266
|
*/
|
|
290
|
-
afterFileAdd
|
|
267
|
+
afterFileAdd?(event: AfterFileAddEvent): any;
|
|
291
268
|
/**
|
|
292
269
|
* Called before a file is removed from the program. This includes physical and virtual files
|
|
293
270
|
*/
|
|
294
|
-
beforeFileRemove
|
|
271
|
+
beforeFileRemove?(event: BeforeFileRemoveEvent): any;
|
|
295
272
|
/**
|
|
296
273
|
* Called after a file has been removed from the program. This includes physical and virtual files
|
|
297
274
|
*/
|
|
298
|
-
afterFileRemove
|
|
275
|
+
afterFileRemove?(event: AfterFileRemoveEvent): any;
|
|
299
276
|
/**
|
|
300
277
|
* Called before each file is validated
|
|
301
278
|
*/
|
|
302
|
-
beforeFileValidate
|
|
279
|
+
beforeFileValidate?(event: BeforeFileValidateEvent): any;
|
|
303
280
|
/**
|
|
304
281
|
* Called during the file validation process. If your plugin contributes file validations, this is a good place to contribute them.
|
|
305
282
|
*/
|
|
306
|
-
onFileValidate
|
|
283
|
+
onFileValidate?(event: OnFileValidateEvent): any;
|
|
307
284
|
/**
|
|
308
285
|
* Called after each file is validated
|
|
309
286
|
*/
|
|
310
|
-
afterFileValidate
|
|
287
|
+
afterFileValidate?(event: AfterFileValidateEvent): any;
|
|
311
288
|
/**
|
|
312
289
|
* Called right before the program builds (i.e. generates the code and puts it in the stagingDir
|
|
313
290
|
*/
|
|
314
|
-
beforeBuildProgram
|
|
291
|
+
beforeBuildProgram?(event: BeforeBuildProgramEvent): any;
|
|
315
292
|
/**
|
|
316
293
|
* Called right after the program builds (i.e. generates the code and puts it in the stagingDir
|
|
317
294
|
*/
|
|
318
|
-
afterBuildProgram
|
|
295
|
+
afterBuildProgram?(event: AfterBuildProgramEvent): any;
|
|
319
296
|
/**
|
|
320
297
|
* Before preparing the file for building
|
|
321
298
|
*/
|
|
322
|
-
beforePrepareFile
|
|
299
|
+
beforePrepareFile?(event: BeforePrepareFileEvent): any;
|
|
323
300
|
/**
|
|
324
301
|
* Prepare the file for building
|
|
325
302
|
*/
|
|
326
|
-
prepareFile
|
|
303
|
+
prepareFile?(event: PrepareFileEvent): any;
|
|
327
304
|
/**
|
|
328
305
|
* After preparing the file for building
|
|
329
306
|
*/
|
|
330
|
-
afterPrepareFile
|
|
307
|
+
afterPrepareFile?(event: AfterPrepareFileEvent): any;
|
|
331
308
|
/**
|
|
332
309
|
* Before the program turns all file objects into their final buffers
|
|
333
310
|
*/
|
|
334
|
-
beforeSerializeProgram
|
|
311
|
+
beforeSerializeProgram?(event: BeforeSerializeProgramEvent): any;
|
|
335
312
|
/**
|
|
336
313
|
* Emitted right at the start of the program turning all file objects into their final buffers
|
|
337
314
|
*/
|
|
338
|
-
onSerializeProgram
|
|
315
|
+
onSerializeProgram?(event: OnSerializeProgramEvent): any;
|
|
339
316
|
/**
|
|
340
317
|
* After the program turns all file objects into their final buffers
|
|
341
318
|
*/
|
|
342
|
-
afterSerializeProgram
|
|
319
|
+
afterSerializeProgram?(event: AfterSerializeProgramEvent): any;
|
|
343
320
|
/**
|
|
344
321
|
* Before turning the file into its final contents
|
|
345
322
|
*/
|
|
346
|
-
beforeSerializeFile
|
|
323
|
+
beforeSerializeFile?(event: BeforeSerializeFileEvent): any;
|
|
347
324
|
/**
|
|
348
325
|
* Turn the file into its final contents (i.e. transpile a bs file, compress a jpeg, etc)
|
|
349
326
|
*/
|
|
350
|
-
serializeFile
|
|
327
|
+
serializeFile?(event: SerializeFileEvent): any;
|
|
351
328
|
/**
|
|
352
329
|
* After turning the file into its final contents
|
|
353
330
|
*/
|
|
354
|
-
afterSerializeFile
|
|
331
|
+
afterSerializeFile?(event: AfterSerializeFileEvent): any;
|
|
355
332
|
/**
|
|
356
333
|
* Called before any files are written
|
|
357
334
|
*/
|
|
358
|
-
beforeWriteProgram
|
|
335
|
+
beforeWriteProgram?(event: BeforeWriteProgramEvent): any;
|
|
359
336
|
/**
|
|
360
337
|
* Called after all files are written
|
|
361
338
|
*/
|
|
362
|
-
afterWriteProgram
|
|
339
|
+
afterWriteProgram?(event: AfterWriteProgramEvent): any;
|
|
363
340
|
/**
|
|
364
341
|
* Before a file is written to disk. These are raw files that contain the final output. One `File` may produce several of these
|
|
365
342
|
*/
|
|
366
|
-
beforeWriteFile
|
|
343
|
+
beforeWriteFile?(event: BeforeWriteFileEvent): any;
|
|
367
344
|
/**
|
|
368
345
|
* Called when a file should be persisted (usually writing to storage). These are raw files that contain the final output. One `File` may produce several of these.
|
|
369
346
|
* When a plugin has handled a file, it should be pushed to the `handledFiles` set so future plugins don't write the file multiple times
|
|
370
347
|
*/
|
|
371
|
-
writeFile
|
|
348
|
+
writeFile?(event: WriteFileEvent): any;
|
|
372
349
|
/**
|
|
373
350
|
* Before a file is written to disk. These are raw files that contain the final output. One `File` may produce several of these
|
|
374
351
|
*/
|
|
375
|
-
afterWriteFile
|
|
352
|
+
afterWriteFile?(event: AfterWriteFileEvent): any;
|
|
376
353
|
}
|
|
377
|
-
export declare type PluginHandler<T, R = void> = (event: T) => R;
|
|
378
354
|
export interface OnGetCodeActionsEvent<TFile extends BscFile = BscFile> {
|
|
379
355
|
program: Program;
|
|
380
356
|
file: TFile;
|
|
@@ -726,13 +702,21 @@ export interface GetTypeOptions {
|
|
|
726
702
|
ignoreCacheForRetrieval?: boolean;
|
|
727
703
|
}
|
|
728
704
|
export declare class TypeChainEntry {
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
705
|
+
constructor(options: {
|
|
706
|
+
name: string;
|
|
707
|
+
type: BscType;
|
|
708
|
+
data: ExtraSymbolData;
|
|
709
|
+
range: Range;
|
|
710
|
+
separatorToken?: Token;
|
|
711
|
+
kind?: AstNodeKind;
|
|
712
|
+
});
|
|
735
713
|
get isResolved(): boolean;
|
|
714
|
+
readonly name: string;
|
|
715
|
+
readonly type: BscType;
|
|
716
|
+
readonly data: ExtraSymbolData;
|
|
717
|
+
readonly range: Range;
|
|
718
|
+
readonly separatorToken: Token;
|
|
719
|
+
kind: AstNodeKind;
|
|
736
720
|
}
|
|
737
721
|
export interface TypeChainProcessResult {
|
|
738
722
|
itemName: string;
|
|
@@ -773,3 +757,13 @@ export interface NamespaceContainer {
|
|
|
773
757
|
namespaces?: Map<string, NamespaceContainer>;
|
|
774
758
|
symbolTable: SymbolTable;
|
|
775
759
|
}
|
|
760
|
+
/**
|
|
761
|
+
* Use Writable<T> to remove readonly flag from properties in T
|
|
762
|
+
* Be careful!
|
|
763
|
+
*/
|
|
764
|
+
export declare type Writeable<T> = {
|
|
765
|
+
-readonly [P in keyof T]: T[P];
|
|
766
|
+
};
|
|
767
|
+
export declare type DeepWriteable<T> = {
|
|
768
|
+
-readonly [P in keyof T]: DeepWriteable<T[P]>;
|
|
769
|
+
};
|
package/dist/interfaces.js
CHANGED
|
@@ -11,15 +11,15 @@ var DiagnosticOrigin;
|
|
|
11
11
|
DiagnosticOrigin["ASTSegment"] = "AstSegment";
|
|
12
12
|
})(DiagnosticOrigin = exports.DiagnosticOrigin || (exports.DiagnosticOrigin = {}));
|
|
13
13
|
class TypeChainEntry {
|
|
14
|
-
constructor(
|
|
15
|
-
|
|
16
|
-
this.
|
|
17
|
-
this
|
|
18
|
-
this.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
constructor(options) {
|
|
15
|
+
var _a;
|
|
16
|
+
this.name = options.name;
|
|
17
|
+
// make a copy of this data
|
|
18
|
+
this.data = Object.assign({}, options.data);
|
|
19
|
+
this.type = options.type;
|
|
20
|
+
this.range = options.range;
|
|
21
|
+
this.separatorToken = (_a = options.separatorToken) !== null && _a !== void 0 ? _a : (0, creators_1.createToken)(TokenKind_1.TokenKind.Dot);
|
|
22
|
+
this.kind = options.kind;
|
|
23
23
|
}
|
|
24
24
|
get isResolved() {
|
|
25
25
|
var _a;
|
package/dist/interfaces.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";;;AAoBA,kDAAkD;AAClD,iDAA8C;AAU9C,IAAY,gBAKX;AALD,WAAY,gBAAgB;IACxB,uCAAmB,CAAA;IACnB,mCAAe,CAAA;IACf,iCAAa,CAAA;IACb,6CAAyB,CAAA;AAC7B,CAAC,EALW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAK3B;AAwvBD,MAAa,cAAc;IACvB,YAAY,OAOX;;QACG,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,2BAA2B;QAC3B,IAAI,CAAC,IAAI,qBAAQ,OAAO,CAAC,IAAI,CAAE,CAAC;QAChC,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC3B,IAAI,CAAC,cAAc,GAAG,MAAA,OAAO,CAAC,cAAc,mCAAI,IAAA,sBAAW,EAAC,qBAAS,CAAC,GAAG,CAAC,CAAC;QAC3E,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAC7B,CAAC;IACD,IAAI,UAAU;;QACV,OAAO,MAAA,IAAI,CAAC,IAAI,0CAAE,YAAY,EAAE,CAAC;IACrC,CAAC;CAQJ;AA3BD,wCA2BC"}
|