hermes-estree 0.19.0 → 0.19.2

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.
@@ -65,6 +65,7 @@ import type {
65
65
  DeclareInterface,
66
66
  DeclareModule,
67
67
  DeclareModuleExports,
68
+ DeclareNamespace,
68
69
  DeclareOpaqueType,
69
70
  DeclareTypeAlias,
70
71
  DeclareVariable,
@@ -526,13 +527,16 @@ interface DeclareModule_With_id extends DeclareModule {
526
527
  interface DeclareModule_With_body extends DeclareModule {
527
528
  +body: $NonMaybeType<DeclareModule['body']>;
528
529
  }
529
- interface DeclareModule_With_kind extends DeclareModule {
530
- +kind: $NonMaybeType<DeclareModule['kind']>;
531
- }
532
530
  interface DeclareModuleExports_With_typeAnnotation
533
531
  extends DeclareModuleExports {
534
532
  +typeAnnotation: $NonMaybeType<DeclareModuleExports['typeAnnotation']>;
535
533
  }
534
+ interface DeclareNamespace_With_id extends DeclareNamespace {
535
+ +id: $NonMaybeType<DeclareNamespace['id']>;
536
+ }
537
+ interface DeclareNamespace_With_body extends DeclareNamespace {
538
+ +body: $NonMaybeType<DeclareNamespace['body']>;
539
+ }
536
540
  interface DeclareOpaqueType_With_id extends DeclareOpaqueType {
537
541
  +id: $NonMaybeType<DeclareOpaqueType['id']>;
538
542
  }
@@ -1785,11 +1789,13 @@ export type ESQueryNodeSelectorsWithoutFallback = {
1785
1789
  +DeclareModule?: (node: DeclareModule) => void,
1786
1790
  +'DeclareModule[id]'?: (node: DeclareModule_With_id) => void,
1787
1791
  +'DeclareModule[body]'?: (node: DeclareModule_With_body) => void,
1788
- +'DeclareModule[kind]'?: (node: DeclareModule_With_kind) => void,
1789
1792
  +DeclareModuleExports?: (node: DeclareModuleExports) => void,
1790
1793
  +'DeclareModuleExports[typeAnnotation]'?: (
1791
1794
  node: DeclareModuleExports_With_typeAnnotation,
1792
1795
  ) => void,
1796
+ +DeclareNamespace?: (node: DeclareNamespace) => void,
1797
+ +'DeclareNamespace[id]'?: (node: DeclareNamespace_With_id) => void,
1798
+ +'DeclareNamespace[body]'?: (node: DeclareNamespace_With_body) => void,
1793
1799
  +DeclareOpaqueType?: (node: DeclareOpaqueType) => void,
1794
1800
  +'DeclareOpaqueType[id]'?: (node: DeclareOpaqueType_With_id) => void,
1795
1801
  +'DeclareOpaqueType[typeParameters]'?: (
@@ -2828,11 +2834,13 @@ export type ESQueryNodeSelectorsWithoutFallback = {
2828
2834
  +'DeclareModule:exit'?: (node: DeclareModule) => void,
2829
2835
  +'DeclareModule[id]:exit'?: (node: DeclareModule_With_id) => void,
2830
2836
  +'DeclareModule[body]:exit'?: (node: DeclareModule_With_body) => void,
2831
- +'DeclareModule[kind]:exit'?: (node: DeclareModule_With_kind) => void,
2832
2837
  +'DeclareModuleExports:exit'?: (node: DeclareModuleExports) => void,
2833
2838
  +'DeclareModuleExports[typeAnnotation]:exit'?: (
2834
2839
  node: DeclareModuleExports_With_typeAnnotation,
2835
2840
  ) => void,
2841
+ +'DeclareNamespace:exit'?: (node: DeclareNamespace) => void,
2842
+ +'DeclareNamespace[id]:exit'?: (node: DeclareNamespace_With_id) => void,
2843
+ +'DeclareNamespace[body]:exit'?: (node: DeclareNamespace_With_body) => void,
2836
2844
  +'DeclareOpaqueType:exit'?: (node: DeclareOpaqueType) => void,
2837
2845
  +'DeclareOpaqueType[id]:exit'?: (node: DeclareOpaqueType_With_id) => void,
2838
2846
  +'DeclareOpaqueType[typeParameters]:exit'?: (
@@ -68,6 +68,7 @@ import type {
68
68
  DeclareInterface,
69
69
  DeclareModule,
70
70
  DeclareModuleExports,
71
+ DeclareNamespace,
71
72
  DeclareOpaqueType,
72
73
  DeclareTypeAlias,
73
74
  DeclareVariable,
@@ -274,6 +275,7 @@ exports.isDeclareInterface = isDeclareInterface;
274
275
  exports.isDeclareKeyword = isDeclareKeyword;
275
276
  exports.isDeclareModule = isDeclareModule;
276
277
  exports.isDeclareModuleExports = isDeclareModuleExports;
278
+ exports.isDeclareNamespace = isDeclareNamespace;
277
279
  exports.isDeclareOpaqueType = isDeclareOpaqueType;
278
280
  exports.isDeclareTypeAlias = isDeclareTypeAlias;
279
281
  exports.isDeclareVariable = isDeclareVariable;
@@ -843,6 +845,14 @@ function isDeclareModuleExports(node
843
845
  return node.type === 'DeclareModuleExports';
844
846
  }
845
847
 
848
+ function isDeclareNamespace(node
849
+ /*: ESNode | Token */
850
+ )
851
+ /*: node is DeclareNamespace */
852
+ {
853
+ return node.type === 'DeclareNamespace';
854
+ }
855
+
846
856
  function isDeclareOpaqueType(node
847
857
  /*: ESNode | Token */
848
858
  )
@@ -69,6 +69,7 @@ import type {
69
69
  DeclareInterface,
70
70
  DeclareModule,
71
71
  DeclareModuleExports,
72
+ DeclareNamespace,
72
73
  DeclareOpaqueType,
73
74
  DeclareTypeAlias,
74
75
  DeclareVariable,
@@ -427,6 +428,11 @@ export function isDeclareModuleExports(node /*: ESNode | Token */) /*: node is D
427
428
  }
428
429
 
429
430
 
431
+ export function isDeclareNamespace(node /*: ESNode | Token */) /*: node is DeclareNamespace */ {
432
+ return node.type === 'DeclareNamespace';
433
+ }
434
+
435
+
430
436
  export function isDeclareOpaqueType(node /*: ESNode | Token */) /*: node is DeclareOpaqueType */ {
431
437
  return node.type === 'DeclareOpaqueType';
432
438
  }
@@ -243,6 +243,7 @@ export type Statement =
243
243
  | DeclareFunction
244
244
  | DeclareInterface
245
245
  | DeclareModule
246
+ | DeclareNamespace
246
247
  | DeclareOpaqueType
247
248
  | DeclareTypeAlias
248
249
  | DoWhileStatement
@@ -1744,7 +1745,12 @@ export interface DeclareModule extends BaseNode {
1744
1745
  +type: 'DeclareModule';
1745
1746
  +id: StringLiteral | Identifier;
1746
1747
  +body: BlockStatement;
1747
- +kind: 'CommonJS' | 'ES';
1748
+ }
1749
+
1750
+ export interface DeclareNamespace extends BaseNode {
1751
+ +type: 'DeclareNamespace';
1752
+ +id: Identifier;
1753
+ +body: BlockStatement;
1748
1754
  }
1749
1755
 
1750
1756
  export interface DeclareInterface extends BaseInterfaceDeclaration {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hermes-estree",
3
- "version": "0.19.0",
3
+ "version": "0.19.2",
4
4
  "description": "Flow types for the Flow-ESTree spec produced by the hermes parser",
5
5
  "main": "dist/index.js",
6
6
  "license": "MIT",