@oxc-project/types 0.62.0 → 0.64.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.
- package/package.json +1 -1
- package/types.d.ts +47 -15
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -78,6 +78,9 @@ export interface BindingIdentifier extends Span {
|
|
|
78
78
|
export interface LabelIdentifier extends Span {
|
|
79
79
|
type: 'Identifier';
|
|
80
80
|
name: string;
|
|
81
|
+
decorators?: [];
|
|
82
|
+
optional?: false;
|
|
83
|
+
typeAnnotation?: null;
|
|
81
84
|
}
|
|
82
85
|
|
|
83
86
|
export interface ThisExpression extends Span {
|
|
@@ -106,6 +109,7 @@ export interface ObjectProperty extends Span {
|
|
|
106
109
|
key: PropertyKey;
|
|
107
110
|
value: Expression;
|
|
108
111
|
kind: PropertyKind;
|
|
112
|
+
optional?: false;
|
|
109
113
|
}
|
|
110
114
|
|
|
111
115
|
export type PropertyKey = IdentifierName | PrivateIdentifier | Expression;
|
|
@@ -254,16 +258,26 @@ export type AssignmentTargetPattern = ArrayAssignmentTarget | ObjectAssignmentTa
|
|
|
254
258
|
export interface ArrayAssignmentTarget extends Span {
|
|
255
259
|
type: 'ArrayPattern';
|
|
256
260
|
elements: Array<AssignmentTargetMaybeDefault | AssignmentTargetRest | null>;
|
|
261
|
+
decorators?: [];
|
|
262
|
+
optional?: false;
|
|
263
|
+
typeAnnotation?: null;
|
|
257
264
|
}
|
|
258
265
|
|
|
259
266
|
export interface ObjectAssignmentTarget extends Span {
|
|
260
267
|
type: 'ObjectPattern';
|
|
261
268
|
properties: Array<AssignmentTargetProperty | AssignmentTargetRest>;
|
|
269
|
+
decorators?: [];
|
|
270
|
+
optional?: false;
|
|
271
|
+
typeAnnotation?: null;
|
|
262
272
|
}
|
|
263
273
|
|
|
264
274
|
export interface AssignmentTargetRest extends Span {
|
|
265
275
|
type: 'RestElement';
|
|
266
276
|
argument: AssignmentTarget;
|
|
277
|
+
decorators?: [];
|
|
278
|
+
optional?: false;
|
|
279
|
+
typeAnnotation?: null;
|
|
280
|
+
value?: null;
|
|
267
281
|
}
|
|
268
282
|
|
|
269
283
|
export type AssignmentTargetMaybeDefault = AssignmentTargetWithDefault | AssignmentTarget;
|
|
@@ -284,6 +298,7 @@ export interface AssignmentTargetPropertyIdentifier extends Span {
|
|
|
284
298
|
key: IdentifierReference;
|
|
285
299
|
value: IdentifierReference | AssignmentTargetWithDefault;
|
|
286
300
|
kind: 'init';
|
|
301
|
+
optional?: false;
|
|
287
302
|
}
|
|
288
303
|
|
|
289
304
|
export interface AssignmentTargetPropertyProperty extends Span {
|
|
@@ -294,6 +309,7 @@ export interface AssignmentTargetPropertyProperty extends Span {
|
|
|
294
309
|
key: PropertyKey;
|
|
295
310
|
value: AssignmentTargetMaybeDefault;
|
|
296
311
|
kind: 'init';
|
|
312
|
+
optional?: false;
|
|
297
313
|
}
|
|
298
314
|
|
|
299
315
|
export interface SequenceExpression extends Span {
|
|
@@ -522,6 +538,7 @@ export interface AssignmentPattern extends Span {
|
|
|
522
538
|
export interface ObjectPattern extends Span {
|
|
523
539
|
type: 'ObjectPattern';
|
|
524
540
|
properties: Array<BindingProperty | BindingRestElement>;
|
|
541
|
+
decorators?: [];
|
|
525
542
|
}
|
|
526
543
|
|
|
527
544
|
export interface BindingProperty extends Span {
|
|
@@ -532,6 +549,7 @@ export interface BindingProperty extends Span {
|
|
|
532
549
|
key: PropertyKey;
|
|
533
550
|
value: BindingPattern;
|
|
534
551
|
kind: 'init';
|
|
552
|
+
optional?: false;
|
|
535
553
|
}
|
|
536
554
|
|
|
537
555
|
export interface ArrayPattern extends Span {
|
|
@@ -545,6 +563,10 @@ export interface ArrayPattern extends Span {
|
|
|
545
563
|
export interface BindingRestElement extends Span {
|
|
546
564
|
type: 'RestElement';
|
|
547
565
|
argument: BindingPattern;
|
|
566
|
+
decorators?: [];
|
|
567
|
+
optional?: false;
|
|
568
|
+
typeAnnotation?: null;
|
|
569
|
+
value?: null;
|
|
548
570
|
}
|
|
549
571
|
|
|
550
572
|
export interface Function extends Span {
|
|
@@ -691,6 +713,10 @@ export interface AccessorProperty extends Span {
|
|
|
691
713
|
definite?: boolean;
|
|
692
714
|
typeAnnotation?: TSTypeAnnotation | null;
|
|
693
715
|
accessibility?: TSAccessibility | null;
|
|
716
|
+
optional?: false;
|
|
717
|
+
override?: boolean;
|
|
718
|
+
readonly?: false;
|
|
719
|
+
declare?: false;
|
|
694
720
|
}
|
|
695
721
|
|
|
696
722
|
export interface ImportExpression extends Span {
|
|
@@ -748,6 +774,7 @@ export interface ExportNamedDeclaration extends Span {
|
|
|
748
774
|
export interface ExportDefaultDeclaration extends Span {
|
|
749
775
|
type: 'ExportDefaultDeclaration';
|
|
750
776
|
declaration: ExportDefaultDeclarationKind;
|
|
777
|
+
exportKind?: 'value';
|
|
751
778
|
}
|
|
752
779
|
|
|
753
780
|
export interface ExportAllDeclaration extends Span {
|
|
@@ -847,8 +874,8 @@ export interface JSXFragment extends Span {
|
|
|
847
874
|
|
|
848
875
|
export interface JSXOpeningFragment extends Span {
|
|
849
876
|
type: 'JSXOpeningFragment';
|
|
850
|
-
attributes
|
|
851
|
-
selfClosing
|
|
877
|
+
attributes?: [];
|
|
878
|
+
selfClosing?: false;
|
|
852
879
|
}
|
|
853
880
|
|
|
854
881
|
export interface JSXClosingFragment extends Span {
|
|
@@ -928,18 +955,24 @@ export interface TSThisParameter extends Span {
|
|
|
928
955
|
export interface TSEnumDeclaration extends Span {
|
|
929
956
|
type: 'TSEnumDeclaration';
|
|
930
957
|
id: BindingIdentifier;
|
|
931
|
-
|
|
958
|
+
body: TSEnumBody;
|
|
932
959
|
const: boolean;
|
|
933
960
|
declare: boolean;
|
|
934
961
|
}
|
|
935
962
|
|
|
963
|
+
export interface TSEnumBody extends Span {
|
|
964
|
+
type: 'TSEnumBody';
|
|
965
|
+
members: Array<TSEnumMember>;
|
|
966
|
+
}
|
|
967
|
+
|
|
936
968
|
export interface TSEnumMember extends Span {
|
|
937
969
|
type: 'TSEnumMember';
|
|
938
970
|
id: TSEnumMemberName;
|
|
971
|
+
computed: boolean;
|
|
939
972
|
initializer: Expression | null;
|
|
940
973
|
}
|
|
941
974
|
|
|
942
|
-
export type TSEnumMemberName = IdentifierName | StringLiteral;
|
|
975
|
+
export type TSEnumMemberName = IdentifierName | StringLiteral | TemplateLiteral;
|
|
943
976
|
|
|
944
977
|
export interface TSTypeAnnotation extends Span {
|
|
945
978
|
type: 'TSTypeAnnotation';
|
|
@@ -1308,7 +1341,6 @@ export interface TSImportType extends Span {
|
|
|
1308
1341
|
options: ObjectExpression | null;
|
|
1309
1342
|
qualifier: TSTypeName | null;
|
|
1310
1343
|
typeArguments: TSTypeParameterInstantiation | null;
|
|
1311
|
-
isTypeOf: boolean;
|
|
1312
1344
|
}
|
|
1313
1345
|
|
|
1314
1346
|
export interface TSFunctionType extends Span {
|
|
@@ -1328,15 +1360,14 @@ export interface TSConstructorType extends Span {
|
|
|
1328
1360
|
|
|
1329
1361
|
export interface TSMappedType extends Span {
|
|
1330
1362
|
type: 'TSMappedType';
|
|
1331
|
-
typeParameter: TSTypeParameter;
|
|
1332
1363
|
nameType: TSType | null;
|
|
1333
1364
|
typeAnnotation: TSType | null;
|
|
1334
|
-
optional:
|
|
1335
|
-
readonly:
|
|
1365
|
+
optional: true | '+' | '-' | null;
|
|
1366
|
+
readonly: true | '+' | '-' | null;
|
|
1367
|
+
key: TSTypeParameter['name'];
|
|
1368
|
+
constraint: TSTypeParameter['constraint'];
|
|
1336
1369
|
}
|
|
1337
1370
|
|
|
1338
|
-
export type TSMappedTypeModifierOperator = 'true' | '+' | '-' | 'none';
|
|
1339
|
-
|
|
1340
1371
|
export interface TSTemplateLiteralType extends Span {
|
|
1341
1372
|
type: 'TSTemplateLiteralType';
|
|
1342
1373
|
quasis: Array<TemplateElement>;
|
|
@@ -1398,25 +1429,25 @@ export interface TSNamespaceExportDeclaration extends Span {
|
|
|
1398
1429
|
export interface TSInstantiationExpression extends Span {
|
|
1399
1430
|
type: 'TSInstantiationExpression';
|
|
1400
1431
|
expression: Expression;
|
|
1401
|
-
|
|
1432
|
+
typeArguments: TSTypeParameterInstantiation;
|
|
1402
1433
|
}
|
|
1403
1434
|
|
|
1404
1435
|
export type ImportOrExportKind = 'value' | 'type';
|
|
1405
1436
|
|
|
1406
1437
|
export interface JSDocNullableType extends Span {
|
|
1407
|
-
type: '
|
|
1438
|
+
type: 'TSJSDocNullableType';
|
|
1408
1439
|
typeAnnotation: TSType;
|
|
1409
1440
|
postfix: boolean;
|
|
1410
1441
|
}
|
|
1411
1442
|
|
|
1412
1443
|
export interface JSDocNonNullableType extends Span {
|
|
1413
|
-
type: '
|
|
1444
|
+
type: 'TSJSDocNonNullableType';
|
|
1414
1445
|
typeAnnotation: TSType;
|
|
1415
1446
|
postfix: boolean;
|
|
1416
1447
|
}
|
|
1417
1448
|
|
|
1418
1449
|
export interface JSDocUnknownType extends Span {
|
|
1419
|
-
type: '
|
|
1450
|
+
type: 'TSJSDocUnknownType';
|
|
1420
1451
|
}
|
|
1421
1452
|
|
|
1422
1453
|
export type AssignmentOperator =
|
|
@@ -1472,7 +1503,7 @@ export interface Span {
|
|
|
1472
1503
|
end: number;
|
|
1473
1504
|
}
|
|
1474
1505
|
|
|
1475
|
-
export type ModuleKind = 'script' | 'module'
|
|
1506
|
+
export type ModuleKind = 'script' | 'module';
|
|
1476
1507
|
|
|
1477
1508
|
export interface Pattern extends Span {
|
|
1478
1509
|
type: 'Pattern';
|
|
@@ -1746,6 +1777,7 @@ export type Node =
|
|
|
1746
1777
|
| JSXText
|
|
1747
1778
|
| TSThisParameter
|
|
1748
1779
|
| TSEnumDeclaration
|
|
1780
|
+
| TSEnumBody
|
|
1749
1781
|
| TSEnumMember
|
|
1750
1782
|
| TSTypeAnnotation
|
|
1751
1783
|
| TSLiteralType
|