@tsrx/core 0.1.54 → 0.1.55
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/package.json +1 -1
- package/types/index.d.ts +31 -0
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -303,6 +303,8 @@ declare module 'estree' {
|
|
|
303
303
|
typeParameters?: TSTypeParameterDeclaration;
|
|
304
304
|
accessibility?: Accessibility;
|
|
305
305
|
optional?: boolean;
|
|
306
|
+
abstract?: boolean;
|
|
307
|
+
override?: boolean;
|
|
306
308
|
}
|
|
307
309
|
|
|
308
310
|
interface PropertyDefinition {
|
|
@@ -310,18 +312,26 @@ declare module 'estree' {
|
|
|
310
312
|
readonly?: boolean;
|
|
311
313
|
optional?: boolean;
|
|
312
314
|
definite?: boolean;
|
|
315
|
+
abstract?: boolean;
|
|
316
|
+
override?: boolean;
|
|
317
|
+
declare?: boolean;
|
|
318
|
+
accessor?: boolean;
|
|
313
319
|
}
|
|
314
320
|
|
|
315
321
|
interface ClassDeclaration {
|
|
316
322
|
typeParameters?: AST.TSTypeParameterDeclaration;
|
|
317
323
|
superTypeParameters?: AST.TSTypeParameterInstantiation;
|
|
318
324
|
implements?: AST.TSClassImplements[];
|
|
325
|
+
abstract?: boolean;
|
|
326
|
+
declare?: boolean;
|
|
319
327
|
}
|
|
320
328
|
|
|
321
329
|
interface ClassExpression {
|
|
322
330
|
typeParameters?: AST.TSTypeParameterDeclaration;
|
|
323
331
|
superTypeParameters?: AST.TSTypeParameterInstantiation;
|
|
324
332
|
implements?: AST.TSClassImplements[];
|
|
333
|
+
abstract?: boolean;
|
|
334
|
+
declare?: boolean;
|
|
325
335
|
}
|
|
326
336
|
|
|
327
337
|
interface Identifier extends AST.TrackedNode {
|
|
@@ -351,8 +361,16 @@ declare module 'estree' {
|
|
|
351
361
|
tracked?: boolean;
|
|
352
362
|
}
|
|
353
363
|
|
|
364
|
+
// A `@decorator` on a class, class member, or parameter. The parser emits
|
|
365
|
+
// these, but estree has no node type for them.
|
|
366
|
+
interface Decorator extends AST.BaseNode {
|
|
367
|
+
type: 'Decorator';
|
|
368
|
+
expression: AST.Expression;
|
|
369
|
+
}
|
|
370
|
+
|
|
354
371
|
// Include TypeScript node types and TSRX-specific nodes in NodeMap
|
|
355
372
|
interface NodeMap {
|
|
373
|
+
Decorator: Decorator;
|
|
356
374
|
JSXSpreadChild: ESTreeJSX.JSXSpreadChild;
|
|
357
375
|
TSRXImportDeclaration: TSRXImportDeclaration;
|
|
358
376
|
TSRXJSXElement: TSRXJSXElement;
|
|
@@ -697,6 +715,19 @@ declare module 'estree' {
|
|
|
697
715
|
declaration?: TSRXDeclaration | null | undefined;
|
|
698
716
|
}
|
|
699
717
|
|
|
718
|
+
/**
|
|
719
|
+
* estree's `ExportDefaultDeclaration` predates the two TypeScript-only
|
|
720
|
+
* declaration forms the parser puts in this slot: `export default interface
|
|
721
|
+
* Foo {}` yields a `TSInterfaceDeclaration`, and the overload signature
|
|
722
|
+
* `export default function foo();` yields a `TSDeclareFunction`.
|
|
723
|
+
*/
|
|
724
|
+
interface TSRXExportDefaultDeclaration extends Omit<AST.ExportDefaultDeclaration, 'declaration'> {
|
|
725
|
+
declaration:
|
|
726
|
+
| AST.ExportDefaultDeclaration['declaration']
|
|
727
|
+
| AST.TSDeclareFunction
|
|
728
|
+
| AST.TSInterfaceDeclaration;
|
|
729
|
+
}
|
|
730
|
+
|
|
700
731
|
interface TSRXProgram extends Omit<Program, 'body'> {
|
|
701
732
|
body: (Program['body'][number] | FunctionExpression)[];
|
|
702
733
|
}
|