@oxc-project/types 0.65.0 → 0.67.0

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/types.d.ts +17 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxc-project/types",
3
- "version": "0.65.0",
3
+ "version": "0.67.0",
4
4
  "description": "Types for Oxc AST nodes",
5
5
  "keywords": [
6
6
  "AST",
package/types.d.ts CHANGED
@@ -544,6 +544,8 @@ export interface ObjectPattern extends Span {
544
544
  type: 'ObjectPattern';
545
545
  properties: Array<BindingProperty | BindingRestElement>;
546
546
  decorators?: [];
547
+ optional?: false;
548
+ typeAnnotation?: null;
547
549
  }
548
550
 
549
551
  export interface BindingProperty extends Span {
@@ -587,7 +589,7 @@ export interface Function extends Span {
587
589
  returnType?: TSTypeAnnotation | null;
588
590
  }
589
591
 
590
- export type ParamPattern = FormalParameter | FormalParameterRest;
592
+ export type ParamPattern = FormalParameter | TSParameterProperty | FormalParameterRest;
591
593
 
592
594
  export type FunctionType =
593
595
  | 'FunctionDeclaration'
@@ -608,6 +610,16 @@ export type FormalParameter =
608
610
  })
609
611
  & BindingPattern;
610
612
 
613
+ export interface TSParameterProperty extends Span {
614
+ type: 'TSParameterProperty';
615
+ accessibility: TSAccessibility | null;
616
+ decorators: Array<Decorator>;
617
+ override: boolean;
618
+ parameter: FormalParameter;
619
+ readonly: boolean;
620
+ static: boolean;
621
+ }
622
+
611
623
  export interface FunctionBody extends Span {
612
624
  type: 'BlockStatement';
613
625
  body: Array<Directive | Statement>;
@@ -1164,7 +1176,7 @@ export interface TSTypeReference extends Span {
1164
1176
  typeArguments: TSTypeParameterInstantiation | null;
1165
1177
  }
1166
1178
 
1167
- export type TSTypeName = IdentifierReference | TSQualifiedName;
1179
+ export type TSTypeName = IdentifierReference | ThisExpression | TSQualifiedName;
1168
1180
 
1169
1181
  export interface TSQualifiedName extends Span {
1170
1182
  type: 'TSQualifiedName';
@@ -1204,7 +1216,7 @@ export type TSAccessibility = 'private' | 'protected' | 'public';
1204
1216
 
1205
1217
  export interface TSClassImplements extends Span {
1206
1218
  type: 'TSClassImplements';
1207
- expression: TSTypeName;
1219
+ expression: IdentifierReference | ThisExpression | MemberExpression;
1208
1220
  typeArguments: TSTypeParameterInstantiation | null;
1209
1221
  }
1210
1222
 
@@ -1304,8 +1316,8 @@ export type TSTypePredicateName = IdentifierName | TSThisType;
1304
1316
 
1305
1317
  export interface TSModuleDeclaration extends Span {
1306
1318
  type: 'TSModuleDeclaration';
1307
- id: TSModuleDeclarationName;
1308
- body: TSModuleDeclarationBody | null;
1319
+ id: BindingIdentifier | StringLiteral | TSQualifiedName;
1320
+ body: TSModuleBlock | null;
1309
1321
  kind: TSModuleDeclarationKind;
1310
1322
  declare: boolean;
1311
1323
  global: boolean;
@@ -1313,10 +1325,6 @@ export interface TSModuleDeclaration extends Span {
1313
1325
 
1314
1326
  export type TSModuleDeclarationKind = 'global' | 'module' | 'namespace';
1315
1327
 
1316
- export type TSModuleDeclarationName = BindingIdentifier | StringLiteral;
1317
-
1318
- export type TSModuleDeclarationBody = TSModuleDeclaration | TSModuleBlock;
1319
-
1320
1328
  export interface TSModuleBlock extends Span {
1321
1329
  type: 'TSModuleBlock';
1322
1330
  body: Array<Directive | Statement>;