@oxc-project/types 0.57.0 → 0.58.1

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