@oxc-project/types 0.68.1 → 0.69.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 +8 -193
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxc-project/types",
3
- "version": "0.68.1",
3
+ "version": "0.69.0",
4
4
  "description": "Types for Oxc AST nodes",
5
5
  "keywords": [
6
6
  "AST",
package/types.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  // Auto-generated code, DO NOT EDIT DIRECTLY!
2
- // To edit this generated file you have to edit `tasks/ast_tools/src/generators/typescript.rs`
2
+ // To edit this generated file you have to edit `tasks/ast_tools/src/generators/typescript.rs`.
3
3
 
4
4
  export interface Program extends Span {
5
5
  type: 'Program';
@@ -723,12 +723,12 @@ export type AccessorPropertyType = 'AccessorProperty' | 'TSAbstractAccessorPrope
723
723
  export interface AccessorProperty extends Span {
724
724
  type: AccessorPropertyType;
725
725
  key: PropertyKey;
726
+ typeAnnotation?: TSTypeAnnotation | null;
726
727
  value: Expression | null;
727
728
  computed: boolean;
728
729
  static: boolean;
729
730
  decorators?: Array<Decorator>;
730
731
  definite?: boolean;
731
- typeAnnotation?: TSTypeAnnotation | null;
732
732
  accessibility?: TSAccessibility | null;
733
733
  optional?: false;
734
734
  override?: boolean;
@@ -854,12 +854,7 @@ export interface RegExpLiteral extends Span {
854
854
  type: 'Literal';
855
855
  value: RegExp | null;
856
856
  raw: string | null;
857
- regex: RegExp;
858
- }
859
-
860
- export interface RegExp {
861
- pattern: string;
862
- flags: string;
857
+ regex: { pattern: string; flags: string };
863
858
  }
864
859
 
865
860
  export interface JSXElement extends Span {
@@ -964,9 +959,9 @@ export interface JSXText extends Span {
964
959
  export interface TSThisParameter extends Span {
965
960
  type: 'Identifier';
966
961
  name: 'this';
967
- typeAnnotation: TSTypeAnnotation | null;
968
962
  decorators: [];
969
963
  optional: false;
964
+ typeAnnotation: TSTypeAnnotation | null;
970
965
  }
971
966
 
972
967
  export interface TSEnumDeclaration extends Span {
@@ -1097,8 +1092,8 @@ export interface TSTupleType extends Span {
1097
1092
 
1098
1093
  export interface TSNamedTupleMember extends Span {
1099
1094
  type: 'TSNamedTupleMember';
1100
- elementType: TSTupleElement;
1101
1095
  label: IdentifierName;
1096
+ elementType: TSTupleElement;
1102
1097
  optional: boolean;
1103
1098
  }
1104
1099
 
@@ -1294,9 +1289,9 @@ export interface TSConstructSignatureDeclaration extends Span {
1294
1289
  export interface TSIndexSignatureName extends Span {
1295
1290
  type: 'Identifier';
1296
1291
  name: string;
1297
- typeAnnotation: TSTypeAnnotation;
1298
1292
  decorators: [];
1299
1293
  optional: false;
1294
+ typeAnnotation: TSTypeAnnotation;
1300
1295
  }
1301
1296
 
1302
1297
  export interface TSInterfaceHeritage extends Span {
@@ -1375,7 +1370,7 @@ export interface TSMappedType extends Span {
1375
1370
  type: 'TSMappedType';
1376
1371
  nameType: TSType | null;
1377
1372
  typeAnnotation: TSType | null;
1378
- optional: TSMappedTypeModifierOperator | null;
1373
+ optional: TSMappedTypeModifierOperator | false;
1379
1374
  readonly: TSMappedTypeModifierOperator | null;
1380
1375
  key: TSTypeParameter['name'];
1381
1376
  constraint: TSTypeParameter['constraint'];
@@ -1403,8 +1398,8 @@ export interface TSSatisfiesExpression extends Span {
1403
1398
 
1404
1399
  export interface TSTypeAssertion extends Span {
1405
1400
  type: 'TSTypeAssertion';
1406
- expression: Expression;
1407
1401
  typeAnnotation: TSType;
1402
+ expression: Expression;
1408
1403
  }
1409
1404
 
1410
1405
  export interface TSImportEqualsDeclaration extends Span {
@@ -1520,166 +1515,6 @@ export interface Span {
1520
1515
 
1521
1516
  export type ModuleKind = 'script' | 'module';
1522
1517
 
1523
- export interface Pattern extends Span {
1524
- type: 'Pattern';
1525
- body: Disjunction;
1526
- }
1527
-
1528
- export interface Disjunction extends Span {
1529
- type: 'Disjunction';
1530
- body: Array<Alternative>;
1531
- }
1532
-
1533
- export interface Alternative extends Span {
1534
- type: 'Alternative';
1535
- body: Array<Term>;
1536
- }
1537
-
1538
- export type Term =
1539
- | BoundaryAssertion
1540
- | LookAroundAssertion
1541
- | Quantifier
1542
- | Character
1543
- | Dot
1544
- | CharacterClassEscape
1545
- | UnicodePropertyEscape
1546
- | CharacterClass
1547
- | CapturingGroup
1548
- | IgnoreGroup
1549
- | IndexedReference
1550
- | NamedReference;
1551
-
1552
- export interface BoundaryAssertion extends Span {
1553
- type: 'BoundaryAssertion';
1554
- kind: BoundaryAssertionKind;
1555
- }
1556
-
1557
- export type BoundaryAssertionKind = 'start' | 'end' | 'boundary' | 'negativeBoundary';
1558
-
1559
- export interface LookAroundAssertion extends Span {
1560
- type: 'LookAroundAssertion';
1561
- kind: LookAroundAssertionKind;
1562
- body: Disjunction;
1563
- }
1564
-
1565
- export type LookAroundAssertionKind = 'lookahead' | 'negativeLookahead' | 'lookbehind' | 'negativeLookbehind';
1566
-
1567
- export interface Quantifier extends Span {
1568
- type: 'Quantifier';
1569
- min: number;
1570
- max: number | null;
1571
- greedy: boolean;
1572
- body: Term;
1573
- }
1574
-
1575
- export interface Character extends Span {
1576
- type: 'Character';
1577
- kind: CharacterKind;
1578
- value: number;
1579
- }
1580
-
1581
- export type CharacterKind =
1582
- | 'controlLetter'
1583
- | 'hexadecimalEscape'
1584
- | 'identifier'
1585
- | 'null'
1586
- | 'octal1'
1587
- | 'octal2'
1588
- | 'octal3'
1589
- | 'singleEscape'
1590
- | 'symbol'
1591
- | 'unicodeEscape';
1592
-
1593
- export interface CharacterClassEscape extends Span {
1594
- type: 'CharacterClassEscape';
1595
- kind: CharacterClassEscapeKind;
1596
- }
1597
-
1598
- export type CharacterClassEscapeKind = 'd' | 'negativeD' | 's' | 'negativeS' | 'w' | 'negativeW';
1599
-
1600
- export interface UnicodePropertyEscape extends Span {
1601
- type: 'UnicodePropertyEscape';
1602
- negative: boolean;
1603
- strings: boolean;
1604
- name: string;
1605
- value: string | null;
1606
- }
1607
-
1608
- export interface Dot extends Span {
1609
- type: 'Dot';
1610
- }
1611
-
1612
- export interface CharacterClass extends Span {
1613
- type: 'CharacterClass';
1614
- negative: boolean;
1615
- strings: boolean;
1616
- kind: CharacterClassContentsKind;
1617
- body: Array<CharacterClassContents>;
1618
- }
1619
-
1620
- export type CharacterClassContentsKind = 'union' | 'intersection' | 'subtraction';
1621
-
1622
- export type CharacterClassContents =
1623
- | CharacterClassRange
1624
- | CharacterClassEscape
1625
- | UnicodePropertyEscape
1626
- | Character
1627
- | CharacterClass
1628
- | ClassStringDisjunction;
1629
-
1630
- export interface CharacterClassRange extends Span {
1631
- type: 'CharacterClassRange';
1632
- min: Character;
1633
- max: Character;
1634
- }
1635
-
1636
- export interface ClassStringDisjunction extends Span {
1637
- type: 'ClassStringDisjunction';
1638
- strings: boolean;
1639
- body: Array<ClassString>;
1640
- }
1641
-
1642
- export interface ClassString extends Span {
1643
- type: 'ClassString';
1644
- strings: boolean;
1645
- body: Array<Character>;
1646
- }
1647
-
1648
- export interface CapturingGroup extends Span {
1649
- type: 'CapturingGroup';
1650
- name: string | null;
1651
- body: Disjunction;
1652
- }
1653
-
1654
- export interface IgnoreGroup extends Span {
1655
- type: 'IgnoreGroup';
1656
- modifiers: Modifiers | null;
1657
- body: Disjunction;
1658
- }
1659
-
1660
- export interface Modifiers extends Span {
1661
- type: 'Modifiers';
1662
- enabling: Modifier | null;
1663
- disabling: Modifier | null;
1664
- }
1665
-
1666
- export interface Modifier {
1667
- type: 'Modifier';
1668
- ignoreCase: boolean;
1669
- multiline: boolean;
1670
- sticky: boolean;
1671
- }
1672
-
1673
- export interface IndexedReference extends Span {
1674
- type: 'IndexedReference';
1675
- index: number;
1676
- }
1677
-
1678
- export interface NamedReference extends Span {
1679
- type: 'NamedReference';
1680
- name: string;
1681
- }
1682
-
1683
1518
  export type Node =
1684
1519
  | Program
1685
1520
  | IdentifierName
@@ -1861,24 +1696,4 @@ export type Node =
1861
1696
  | JSDocNullableType
1862
1697
  | JSDocNonNullableType
1863
1698
  | JSDocUnknownType
1864
- | Pattern
1865
- | Disjunction
1866
- | Alternative
1867
- | BoundaryAssertion
1868
- | LookAroundAssertion
1869
- | Quantifier
1870
- | Character
1871
- | CharacterClassEscape
1872
- | UnicodePropertyEscape
1873
- | Dot
1874
- | CharacterClass
1875
- | CharacterClassRange
1876
- | ClassStringDisjunction
1877
- | ClassString
1878
- | CapturingGroup
1879
- | IgnoreGroup
1880
- | Modifiers
1881
- | Modifier
1882
- | IndexedReference
1883
- | NamedReference
1884
1699
  | FormalParameterRest;