@oxc-project/types 0.35.0 → 0.37.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 +39 -77
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -2,29 +2,41 @@
|
|
|
2
2
|
// To edit this generated file you have to edit `tasks/ast_tools/src/generators/typescript.rs`
|
|
3
3
|
|
|
4
4
|
export interface BooleanLiteral extends Span {
|
|
5
|
-
type: '
|
|
5
|
+
type: 'Literal';
|
|
6
6
|
value: boolean;
|
|
7
|
+
raw: string;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
export interface NullLiteral extends Span {
|
|
10
|
-
type: '
|
|
11
|
+
type: 'Literal';
|
|
12
|
+
value: null;
|
|
13
|
+
raw: 'null';
|
|
11
14
|
}
|
|
12
15
|
|
|
13
16
|
export interface NumericLiteral extends Span {
|
|
14
|
-
type: '
|
|
17
|
+
type: 'Literal';
|
|
15
18
|
value: number;
|
|
16
19
|
raw: string;
|
|
17
20
|
}
|
|
18
21
|
|
|
22
|
+
export interface StringLiteral extends Span {
|
|
23
|
+
type: 'Literal';
|
|
24
|
+
value: string;
|
|
25
|
+
raw?: undefined;
|
|
26
|
+
}
|
|
27
|
+
|
|
19
28
|
export interface BigIntLiteral extends Span {
|
|
20
|
-
type: '
|
|
29
|
+
type: 'Literal';
|
|
21
30
|
raw: string;
|
|
31
|
+
value: null;
|
|
32
|
+
bigint: string;
|
|
22
33
|
}
|
|
23
34
|
|
|
24
35
|
export interface RegExpLiteral extends Span {
|
|
25
|
-
type: '
|
|
26
|
-
|
|
27
|
-
|
|
36
|
+
type: 'Literal';
|
|
37
|
+
raw: string;
|
|
38
|
+
value: {} | null;
|
|
39
|
+
regex: { pattern: string; flags: string };
|
|
28
40
|
}
|
|
29
41
|
|
|
30
42
|
export interface RegExp {
|
|
@@ -34,14 +46,6 @@ export interface RegExp {
|
|
|
34
46
|
|
|
35
47
|
export type RegExpPattern = string | string | Pattern;
|
|
36
48
|
|
|
37
|
-
export interface EmptyObject {
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export interface StringLiteral extends Span {
|
|
41
|
-
type: 'StringLiteral';
|
|
42
|
-
value: string;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
49
|
export interface Program extends Span {
|
|
46
50
|
type: 'Program';
|
|
47
51
|
sourceType: SourceType;
|
|
@@ -135,7 +139,6 @@ export interface ObjectProperty extends Span {
|
|
|
135
139
|
kind: PropertyKind;
|
|
136
140
|
key: PropertyKey;
|
|
137
141
|
value: Expression;
|
|
138
|
-
init: Expression | null;
|
|
139
142
|
method: boolean;
|
|
140
143
|
shorthand: boolean;
|
|
141
144
|
computed: boolean;
|
|
@@ -383,12 +386,12 @@ export type AssignmentTargetPattern = ArrayAssignmentTarget | ObjectAssignmentTa
|
|
|
383
386
|
|
|
384
387
|
export interface ArrayAssignmentTarget extends Span {
|
|
385
388
|
type: 'ArrayAssignmentTarget';
|
|
386
|
-
elements: Array<
|
|
389
|
+
elements: Array<AssignmentTargetRest | AssignmentTargetMaybeDefault | null>;
|
|
387
390
|
}
|
|
388
391
|
|
|
389
392
|
export interface ObjectAssignmentTarget extends Span {
|
|
390
393
|
type: 'ObjectAssignmentTarget';
|
|
391
|
-
properties: Array<
|
|
394
|
+
properties: Array<AssignmentTargetRest | AssignmentTargetProperty>;
|
|
392
395
|
}
|
|
393
396
|
|
|
394
397
|
export interface AssignmentTargetRest extends Span {
|
|
@@ -449,7 +452,12 @@ export interface ChainExpression extends Span {
|
|
|
449
452
|
expression: ChainElement;
|
|
450
453
|
}
|
|
451
454
|
|
|
452
|
-
export type ChainElement =
|
|
455
|
+
export type ChainElement =
|
|
456
|
+
| CallExpression
|
|
457
|
+
| TSNonNullExpression
|
|
458
|
+
| ComputedMemberExpression
|
|
459
|
+
| StaticMemberExpression
|
|
460
|
+
| PrivateFieldExpression;
|
|
453
461
|
|
|
454
462
|
export interface ParenthesizedExpression extends Span {
|
|
455
463
|
type: 'ParenthesizedExpression';
|
|
@@ -725,7 +733,7 @@ export interface AssignmentPattern extends Span {
|
|
|
725
733
|
|
|
726
734
|
export interface ObjectPattern extends Span {
|
|
727
735
|
type: 'ObjectPattern';
|
|
728
|
-
properties: Array<
|
|
736
|
+
properties: Array<BindingRestElement | BindingProperty>;
|
|
729
737
|
}
|
|
730
738
|
|
|
731
739
|
export interface BindingProperty extends Span {
|
|
@@ -738,7 +746,7 @@ export interface BindingProperty extends Span {
|
|
|
738
746
|
|
|
739
747
|
export interface ArrayPattern extends Span {
|
|
740
748
|
type: 'ArrayPattern';
|
|
741
|
-
elements: Array<
|
|
749
|
+
elements: Array<BindingRestElement | BindingPattern | null>;
|
|
742
750
|
}
|
|
743
751
|
|
|
744
752
|
export interface BindingRestElement extends Span {
|
|
@@ -1038,53 +1046,7 @@ export interface TSEnumMember extends Span {
|
|
|
1038
1046
|
initializer: Expression | null;
|
|
1039
1047
|
}
|
|
1040
1048
|
|
|
1041
|
-
export type TSEnumMemberName =
|
|
1042
|
-
| IdentifierName
|
|
1043
|
-
| StringLiteral
|
|
1044
|
-
| TemplateLiteral
|
|
1045
|
-
| NumericLiteral
|
|
1046
|
-
| BooleanLiteral
|
|
1047
|
-
| NullLiteral
|
|
1048
|
-
| NumericLiteral
|
|
1049
|
-
| BigIntLiteral
|
|
1050
|
-
| RegExpLiteral
|
|
1051
|
-
| StringLiteral
|
|
1052
|
-
| TemplateLiteral
|
|
1053
|
-
| IdentifierReference
|
|
1054
|
-
| MetaProperty
|
|
1055
|
-
| Super
|
|
1056
|
-
| ArrayExpression
|
|
1057
|
-
| ArrowFunctionExpression
|
|
1058
|
-
| AssignmentExpression
|
|
1059
|
-
| AwaitExpression
|
|
1060
|
-
| BinaryExpression
|
|
1061
|
-
| CallExpression
|
|
1062
|
-
| ChainExpression
|
|
1063
|
-
| Class
|
|
1064
|
-
| ConditionalExpression
|
|
1065
|
-
| Function
|
|
1066
|
-
| ImportExpression
|
|
1067
|
-
| LogicalExpression
|
|
1068
|
-
| NewExpression
|
|
1069
|
-
| ObjectExpression
|
|
1070
|
-
| ParenthesizedExpression
|
|
1071
|
-
| SequenceExpression
|
|
1072
|
-
| TaggedTemplateExpression
|
|
1073
|
-
| ThisExpression
|
|
1074
|
-
| UnaryExpression
|
|
1075
|
-
| UpdateExpression
|
|
1076
|
-
| YieldExpression
|
|
1077
|
-
| PrivateInExpression
|
|
1078
|
-
| JSXElement
|
|
1079
|
-
| JSXFragment
|
|
1080
|
-
| TSAsExpression
|
|
1081
|
-
| TSSatisfiesExpression
|
|
1082
|
-
| TSTypeAssertion
|
|
1083
|
-
| TSNonNullExpression
|
|
1084
|
-
| TSInstantiationExpression
|
|
1085
|
-
| ComputedMemberExpression
|
|
1086
|
-
| StaticMemberExpression
|
|
1087
|
-
| PrivateFieldExpression;
|
|
1049
|
+
export type TSEnumMemberName = IdentifierName | StringLiteral;
|
|
1088
1050
|
|
|
1089
1051
|
export interface TSTypeAnnotation extends Span {
|
|
1090
1052
|
type: 'TSTypeAnnotation';
|
|
@@ -1757,16 +1719,16 @@ export type AssignmentOperator =
|
|
|
1757
1719
|
| '*='
|
|
1758
1720
|
| '/='
|
|
1759
1721
|
| '%='
|
|
1722
|
+
| '**='
|
|
1760
1723
|
| '<<='
|
|
1761
1724
|
| '>>='
|
|
1762
1725
|
| '>>>='
|
|
1763
1726
|
| '|='
|
|
1764
1727
|
| '^='
|
|
1765
1728
|
| '&='
|
|
1766
|
-
| '&&='
|
|
1767
1729
|
| '||='
|
|
1768
|
-
| '
|
|
1769
|
-
| '
|
|
1730
|
+
| '&&='
|
|
1731
|
+
| '??=';
|
|
1770
1732
|
|
|
1771
1733
|
export type BinaryOperator =
|
|
1772
1734
|
| '=='
|
|
@@ -1777,24 +1739,24 @@ export type BinaryOperator =
|
|
|
1777
1739
|
| '<='
|
|
1778
1740
|
| '>'
|
|
1779
1741
|
| '>='
|
|
1780
|
-
| '<<'
|
|
1781
|
-
| '>>'
|
|
1782
|
-
| '>>>'
|
|
1783
1742
|
| '+'
|
|
1784
1743
|
| '-'
|
|
1785
1744
|
| '*'
|
|
1786
1745
|
| '/'
|
|
1787
1746
|
| '%'
|
|
1747
|
+
| '**'
|
|
1748
|
+
| '<<'
|
|
1749
|
+
| '>>'
|
|
1750
|
+
| '>>>'
|
|
1788
1751
|
| '|'
|
|
1789
1752
|
| '^'
|
|
1790
1753
|
| '&'
|
|
1791
1754
|
| 'in'
|
|
1792
|
-
| 'instanceof'
|
|
1793
|
-
| '**';
|
|
1755
|
+
| 'instanceof';
|
|
1794
1756
|
|
|
1795
1757
|
export type LogicalOperator = '||' | '&&' | '??';
|
|
1796
1758
|
|
|
1797
|
-
export type UnaryOperator = '
|
|
1759
|
+
export type UnaryOperator = '+' | '-' | '!' | '~' | 'typeof' | 'void' | 'delete';
|
|
1798
1760
|
|
|
1799
1761
|
export type UpdateOperator = '++' | '--';
|
|
1800
1762
|
|