@oxc-project/types 0.36.0 → 0.38.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 +21 -15
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxc-project/types",
3
- "version": "0.36.0",
3
+ "version": "0.38.0",
4
4
  "description": "Types for Oxc AST nodes",
5
5
  "keywords": [
6
6
  "AST",
package/types.d.ts CHANGED
@@ -19,6 +19,12 @@ export interface NumericLiteral extends Span {
19
19
  raw: string;
20
20
  }
21
21
 
22
+ export interface StringLiteral extends Span {
23
+ type: 'Literal';
24
+ value: string;
25
+ raw?: undefined;
26
+ }
27
+
22
28
  export interface BigIntLiteral extends Span {
23
29
  type: 'Literal';
24
30
  raw: string;
@@ -40,11 +46,6 @@ export interface RegExp {
40
46
 
41
47
  export type RegExpPattern = string | string | Pattern;
42
48
 
43
- export interface StringLiteral extends Span {
44
- type: 'StringLiteral';
45
- value: string;
46
- }
47
-
48
49
  export interface Program extends Span {
49
50
  type: 'Program';
50
51
  sourceType: SourceType;
@@ -451,7 +452,12 @@ export interface ChainExpression extends Span {
451
452
  expression: ChainElement;
452
453
  }
453
454
 
454
- export type ChainElement = CallExpression | ComputedMemberExpression | StaticMemberExpression | PrivateFieldExpression;
455
+ export type ChainElement =
456
+ | CallExpression
457
+ | TSNonNullExpression
458
+ | ComputedMemberExpression
459
+ | StaticMemberExpression
460
+ | PrivateFieldExpression;
455
461
 
456
462
  export interface ParenthesizedExpression extends Span {
457
463
  type: 'ParenthesizedExpression';
@@ -1713,16 +1719,16 @@ export type AssignmentOperator =
1713
1719
  | '*='
1714
1720
  | '/='
1715
1721
  | '%='
1722
+ | '**='
1716
1723
  | '<<='
1717
1724
  | '>>='
1718
1725
  | '>>>='
1719
1726
  | '|='
1720
1727
  | '^='
1721
1728
  | '&='
1722
- | '&&='
1723
1729
  | '||='
1724
- | '??='
1725
- | '**=';
1730
+ | '&&='
1731
+ | '??=';
1726
1732
 
1727
1733
  export type BinaryOperator =
1728
1734
  | '=='
@@ -1733,24 +1739,24 @@ export type BinaryOperator =
1733
1739
  | '<='
1734
1740
  | '>'
1735
1741
  | '>='
1736
- | '<<'
1737
- | '>>'
1738
- | '>>>'
1739
1742
  | '+'
1740
1743
  | '-'
1741
1744
  | '*'
1742
1745
  | '/'
1743
1746
  | '%'
1747
+ | '**'
1748
+ | '<<'
1749
+ | '>>'
1750
+ | '>>>'
1744
1751
  | '|'
1745
1752
  | '^'
1746
1753
  | '&'
1747
1754
  | 'in'
1748
- | 'instanceof'
1749
- | '**';
1755
+ | 'instanceof';
1750
1756
 
1751
1757
  export type LogicalOperator = '||' | '&&' | '??';
1752
1758
 
1753
- export type UnaryOperator = '-' | '+' | '!' | '~' | 'typeof' | 'void' | 'delete';
1759
+ export type UnaryOperator = '+' | '-' | '!' | '~' | 'typeof' | 'void' | 'delete';
1754
1760
 
1755
1761
  export type UpdateOperator = '++' | '--';
1756
1762