@oxc-project/types 0.56.5 → 0.58.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 +210 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxc-project/types",
3
- "version": "0.56.5",
3
+ "version": "0.58.0",
4
4
  "description": "Types for Oxc AST nodes",
5
5
  "keywords": [
6
6
  "AST",
package/types.d.ts CHANGED
@@ -848,7 +848,7 @@ export type JSXElementName = JSXIdentifier | JSXNamespacedName | JSXMemberExpres
848
848
  export interface JSXNamespacedName extends Span {
849
849
  type: 'JSXNamespacedName';
850
850
  namespace: JSXIdentifier;
851
- property: JSXIdentifier;
851
+ name: JSXIdentifier;
852
852
  }
853
853
 
854
854
  export interface JSXMemberExpression extends Span {
@@ -902,6 +902,7 @@ export interface JSXSpreadChild extends Span {
902
902
  export interface JSXText extends Span {
903
903
  type: 'JSXText';
904
904
  value: string;
905
+ raw: string | null;
905
906
  }
906
907
 
907
908
  export interface TSThisParameter extends Span {
@@ -1281,11 +1282,11 @@ export type TSTypeQueryExprName = TSImportType | TSTypeName;
1281
1282
 
1282
1283
  export interface TSImportType extends Span {
1283
1284
  type: 'TSImportType';
1284
- isTypeOf: boolean;
1285
- parameter: TSType;
1285
+ argument: TSType;
1286
+ options: TSImportAttributes | null;
1286
1287
  qualifier: TSTypeName | null;
1287
- attributes: TSImportAttributes | null;
1288
- typeParameters: TSTypeParameterInstantiation | null;
1288
+ typeArguments: TSTypeParameterInstantiation | null;
1289
+ isTypeOf: boolean;
1289
1290
  }
1290
1291
 
1291
1292
  export interface TSImportAttributes extends Span {
@@ -1625,3 +1626,207 @@ export interface NamedReference extends Span {
1625
1626
  type: 'NamedReference';
1626
1627
  name: string;
1627
1628
  }
1629
+
1630
+ export type Node =
1631
+ | Program
1632
+ | IdentifierName
1633
+ | IdentifierReference
1634
+ | BindingIdentifier
1635
+ | LabelIdentifier
1636
+ | ThisExpression
1637
+ | ArrayExpression
1638
+ | ObjectExpression
1639
+ | ObjectProperty
1640
+ | TemplateLiteral
1641
+ | TaggedTemplateExpression
1642
+ | TemplateElement
1643
+ | ComputedMemberExpression
1644
+ | StaticMemberExpression
1645
+ | PrivateFieldExpression
1646
+ | CallExpression
1647
+ | NewExpression
1648
+ | MetaProperty
1649
+ | SpreadElement
1650
+ | UpdateExpression
1651
+ | UnaryExpression
1652
+ | BinaryExpression
1653
+ | PrivateInExpression
1654
+ | LogicalExpression
1655
+ | ConditionalExpression
1656
+ | AssignmentExpression
1657
+ | ArrayAssignmentTarget
1658
+ | ObjectAssignmentTarget
1659
+ | AssignmentTargetRest
1660
+ | AssignmentTargetWithDefault
1661
+ | AssignmentTargetPropertyIdentifier
1662
+ | AssignmentTargetPropertyProperty
1663
+ | SequenceExpression
1664
+ | Super
1665
+ | AwaitExpression
1666
+ | ChainExpression
1667
+ | ParenthesizedExpression
1668
+ | Directive
1669
+ | Hashbang
1670
+ | BlockStatement
1671
+ | VariableDeclaration
1672
+ | VariableDeclarator
1673
+ | EmptyStatement
1674
+ | ExpressionStatement
1675
+ | IfStatement
1676
+ | DoWhileStatement
1677
+ | WhileStatement
1678
+ | ForStatement
1679
+ | ForInStatement
1680
+ | ForOfStatement
1681
+ | ContinueStatement
1682
+ | BreakStatement
1683
+ | ReturnStatement
1684
+ | WithStatement
1685
+ | SwitchStatement
1686
+ | SwitchCase
1687
+ | LabeledStatement
1688
+ | ThrowStatement
1689
+ | TryStatement
1690
+ | CatchClause
1691
+ | DebuggerStatement
1692
+ | AssignmentPattern
1693
+ | ObjectPattern
1694
+ | BindingProperty
1695
+ | ArrayPattern
1696
+ | BindingRestElement
1697
+ | Function
1698
+ | FunctionBody
1699
+ | ArrowFunctionExpression
1700
+ | YieldExpression
1701
+ | Class
1702
+ | ClassBody
1703
+ | MethodDefinition
1704
+ | PropertyDefinition
1705
+ | PrivateIdentifier
1706
+ | StaticBlock
1707
+ | AccessorProperty
1708
+ | ImportExpression
1709
+ | ImportDeclaration
1710
+ | ImportSpecifier
1711
+ | ImportDefaultSpecifier
1712
+ | ImportNamespaceSpecifier
1713
+ | ImportAttribute
1714
+ | ExportNamedDeclaration
1715
+ | ExportDefaultDeclaration
1716
+ | ExportAllDeclaration
1717
+ | ExportSpecifier
1718
+ | V8IntrinsicExpression
1719
+ | BooleanLiteral
1720
+ | NullLiteral
1721
+ | NumericLiteral
1722
+ | StringLiteral
1723
+ | BigIntLiteral
1724
+ | RegExpLiteral
1725
+ | JSXElement
1726
+ | JSXOpeningElement
1727
+ | JSXClosingElement
1728
+ | JSXFragment
1729
+ | JSXOpeningFragment
1730
+ | JSXClosingFragment
1731
+ | JSXNamespacedName
1732
+ | JSXMemberExpression
1733
+ | JSXExpressionContainer
1734
+ | JSXEmptyExpression
1735
+ | JSXAttribute
1736
+ | JSXSpreadAttribute
1737
+ | JSXIdentifier
1738
+ | JSXSpreadChild
1739
+ | JSXText
1740
+ | TSThisParameter
1741
+ | TSEnumDeclaration
1742
+ | TSEnumMember
1743
+ | TSTypeAnnotation
1744
+ | TSLiteralType
1745
+ | TSConditionalType
1746
+ | TSUnionType
1747
+ | TSIntersectionType
1748
+ | TSParenthesizedType
1749
+ | TSTypeOperator
1750
+ | TSArrayType
1751
+ | TSIndexedAccessType
1752
+ | TSTupleType
1753
+ | TSNamedTupleMember
1754
+ | TSOptionalType
1755
+ | TSRestType
1756
+ | TSAnyKeyword
1757
+ | TSStringKeyword
1758
+ | TSBooleanKeyword
1759
+ | TSNumberKeyword
1760
+ | TSNeverKeyword
1761
+ | TSIntrinsicKeyword
1762
+ | TSUnknownKeyword
1763
+ | TSNullKeyword
1764
+ | TSUndefinedKeyword
1765
+ | TSVoidKeyword
1766
+ | TSSymbolKeyword
1767
+ | TSThisType
1768
+ | TSObjectKeyword
1769
+ | TSBigIntKeyword
1770
+ | TSTypeReference
1771
+ | TSQualifiedName
1772
+ | TSTypeParameterInstantiation
1773
+ | TSTypeParameter
1774
+ | TSTypeParameterDeclaration
1775
+ | TSTypeAliasDeclaration
1776
+ | TSClassImplements
1777
+ | TSInterfaceDeclaration
1778
+ | TSInterfaceBody
1779
+ | TSPropertySignature
1780
+ | TSIndexSignature
1781
+ | TSCallSignatureDeclaration
1782
+ | TSMethodSignature
1783
+ | TSConstructSignatureDeclaration
1784
+ | TSIndexSignatureName
1785
+ | TSInterfaceHeritage
1786
+ | TSTypePredicate
1787
+ | TSModuleDeclaration
1788
+ | TSModuleBlock
1789
+ | TSTypeLiteral
1790
+ | TSInferType
1791
+ | TSTypeQuery
1792
+ | TSImportType
1793
+ | TSImportAttributes
1794
+ | TSImportAttribute
1795
+ | TSFunctionType
1796
+ | TSConstructorType
1797
+ | TSMappedType
1798
+ | TSTemplateLiteralType
1799
+ | TSAsExpression
1800
+ | TSSatisfiesExpression
1801
+ | TSTypeAssertion
1802
+ | TSImportEqualsDeclaration
1803
+ | TSExternalModuleReference
1804
+ | TSNonNullExpression
1805
+ | Decorator
1806
+ | TSExportAssignment
1807
+ | TSNamespaceExportDeclaration
1808
+ | TSInstantiationExpression
1809
+ | JSDocNullableType
1810
+ | JSDocNonNullableType
1811
+ | JSDocUnknownType
1812
+ | Pattern
1813
+ | Disjunction
1814
+ | Alternative
1815
+ | BoundaryAssertion
1816
+ | LookAroundAssertion
1817
+ | Quantifier
1818
+ | Character
1819
+ | CharacterClassEscape
1820
+ | UnicodePropertyEscape
1821
+ | Dot
1822
+ | CharacterClass
1823
+ | CharacterClassRange
1824
+ | ClassStringDisjunction
1825
+ | ClassString
1826
+ | CapturingGroup
1827
+ | IgnoreGroup
1828
+ | Modifiers
1829
+ | Modifier
1830
+ | IndexedReference
1831
+ | NamedReference
1832
+ | FormalParameterRest;