@oxc-project/types 0.97.0 → 0.99.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 +14 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxc-project/types",
3
- "version": "0.97.0",
3
+ "version": "0.99.0",
4
4
  "description": "Types for Oxc AST nodes",
5
5
  "type": "module",
6
6
  "keywords": [
package/types.d.ts CHANGED
@@ -427,6 +427,7 @@ export type Declaration =
427
427
  | TSInterfaceDeclaration
428
428
  | TSEnumDeclaration
429
429
  | TSModuleDeclaration
430
+ | TSGlobalDeclaration
430
431
  | TSImportEqualsDeclaration;
431
432
 
432
433
  export interface VariableDeclaration extends Span {
@@ -1474,11 +1475,21 @@ export interface TSModuleDeclaration extends Span {
1474
1475
  body: TSModuleBlock | null;
1475
1476
  kind: TSModuleDeclarationKind;
1476
1477
  declare: boolean;
1477
- global: boolean;
1478
+ global: false;
1478
1479
  parent?: Node;
1479
1480
  }
1480
1481
 
1481
- export type TSModuleDeclarationKind = 'global' | 'module' | 'namespace';
1482
+ export type TSModuleDeclarationKind = 'module' | 'namespace';
1483
+
1484
+ export interface TSGlobalDeclaration extends Span {
1485
+ type: 'TSModuleDeclaration';
1486
+ id: IdentifierName;
1487
+ body: TSModuleBlock;
1488
+ kind: 'global';
1489
+ declare: boolean;
1490
+ global: true;
1491
+ parent?: Node;
1492
+ }
1482
1493
 
1483
1494
  export interface TSModuleBlock extends Span {
1484
1495
  type: 'TSModuleBlock';
@@ -1866,6 +1877,7 @@ export type Node =
1866
1877
  | TSInterfaceHeritage
1867
1878
  | TSTypePredicate
1868
1879
  | TSModuleDeclaration
1880
+ | TSGlobalDeclaration
1869
1881
  | TSModuleBlock
1870
1882
  | TSTypeLiteral
1871
1883
  | TSInferType