@oxc-project/types 0.66.0 → 0.68.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 +10 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxc-project/types",
3
- "version": "0.66.0",
3
+ "version": "0.68.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 {
@@ -1174,7 +1176,7 @@ export interface TSTypeReference extends Span {
1174
1176
  typeArguments: TSTypeParameterInstantiation | null;
1175
1177
  }
1176
1178
 
1177
- export type TSTypeName = IdentifierReference | TSQualifiedName;
1179
+ export type TSTypeName = IdentifierReference | ThisExpression | TSQualifiedName;
1178
1180
 
1179
1181
  export interface TSQualifiedName extends Span {
1180
1182
  type: 'TSQualifiedName';
@@ -1214,7 +1216,7 @@ export type TSAccessibility = 'private' | 'protected' | 'public';
1214
1216
 
1215
1217
  export interface TSClassImplements extends Span {
1216
1218
  type: 'TSClassImplements';
1217
- expression: TSTypeName;
1219
+ expression: IdentifierReference | ThisExpression | MemberExpression;
1218
1220
  typeArguments: TSTypeParameterInstantiation | null;
1219
1221
  }
1220
1222
 
@@ -1314,8 +1316,8 @@ export type TSTypePredicateName = IdentifierName | TSThisType;
1314
1316
 
1315
1317
  export interface TSModuleDeclaration extends Span {
1316
1318
  type: 'TSModuleDeclaration';
1317
- id: TSModuleDeclarationName;
1318
- body: TSModuleDeclarationBody | null;
1319
+ id: BindingIdentifier | StringLiteral | TSQualifiedName;
1320
+ body: TSModuleBlock | null;
1319
1321
  kind: TSModuleDeclarationKind;
1320
1322
  declare: boolean;
1321
1323
  global: boolean;
@@ -1323,10 +1325,6 @@ export interface TSModuleDeclaration extends Span {
1323
1325
 
1324
1326
  export type TSModuleDeclarationKind = 'global' | 'module' | 'namespace';
1325
1327
 
1326
- export type TSModuleDeclarationName = BindingIdentifier | StringLiteral;
1327
-
1328
- export type TSModuleDeclarationBody = TSModuleDeclaration | TSModuleBlock;
1329
-
1330
1328
  export interface TSModuleBlock extends Span {
1331
1329
  type: 'TSModuleBlock';
1332
1330
  body: Array<Directive | Statement>;
@@ -1377,12 +1375,14 @@ export interface TSMappedType extends Span {
1377
1375
  type: 'TSMappedType';
1378
1376
  nameType: TSType | null;
1379
1377
  typeAnnotation: TSType | null;
1380
- optional: true | '+' | '-' | null;
1381
- readonly: true | '+' | '-' | null;
1378
+ optional: TSMappedTypeModifierOperator | null;
1379
+ readonly: TSMappedTypeModifierOperator | null;
1382
1380
  key: TSTypeParameter['name'];
1383
1381
  constraint: TSTypeParameter['constraint'];
1384
1382
  }
1385
1383
 
1384
+ export type TSMappedTypeModifierOperator = true | '+' | '-';
1385
+
1386
1386
  export interface TSTemplateLiteralType extends Span {
1387
1387
  type: 'TSTemplateLiteralType';
1388
1388
  quasis: Array<TemplateElement>;