astronomical 2.1.1-rc.1 → 3.0.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.
@@ -1,5 +1,6 @@
1
- import { ESTree } from "meriyah";
2
- export declare const functions: {
1
+ import { ESTree } from 'meriyah';
2
+
3
+ declare const functions: {
3
4
  join: {
4
5
  fn: (result: Result[][]) => Result[];
5
6
  };
@@ -13,33 +14,33 @@ export declare const functions: {
13
14
  fn: (result: Result[][]) => Result[];
14
15
  };
15
16
  };
16
- export type AvailableFunction = keyof typeof functions;
17
- export declare function isAvailableFunction(name: string): name is AvailableFunction;
18
- export type PrimitiveValue = string | number | boolean;
17
+ type AvailableFunction = keyof typeof functions;
18
+ declare function isAvailableFunction(name: string): name is AvailableFunction;
19
+ type PrimitiveValue = string | number | boolean;
19
20
  type Result = ASTNode | PrimitiveValue;
20
- export declare function query(code: string | ASTNode, query: string, returnAST?: boolean): Result[] & {
21
+ declare function query(code: string | ASTNode, query: string, returnAST?: boolean): Result[] & {
21
22
  __AST?: ASTNode;
22
23
  };
23
- export declare function multiQuery<T extends Record<string, string>>(code: string | ASTNode, namedQueries: T, returnAST?: boolean): Record<keyof T, Result[]> & {
24
+ declare function multiQuery<T extends Record<string, string>>(code: string | ASTNode, namedQueries: T, returnAST?: boolean): Record<keyof T, Result[]> & {
24
25
  __AST?: ASTNode;
25
26
  };
26
- export declare function parseSource(source: string, optimize?: boolean): ASTNode;
27
- export type Binding = {
27
+ declare function parseSource(source: string, optimize?: boolean): ASTNode;
28
+ type Binding = {
28
29
  path: NodePath;
29
30
  };
30
- export type Scope = {
31
+ type Scope = {
31
32
  bindings: Record<string, Binding>;
32
33
  parentScopeId?: number;
33
34
  id: number;
34
35
  };
35
- export type ASTNode = ESTree.Node & {
36
+ type ASTNode = ESTree.Node & {
36
37
  extra?: {
37
38
  scopeId?: number;
38
39
  functionScopeId?: number;
39
40
  nodePath?: NodePath;
40
41
  };
41
42
  };
42
- export type NodePath = {
43
+ type NodePath = {
43
44
  node: ASTNode;
44
45
  key?: string;
45
46
  parentPath?: NodePath;
@@ -51,7 +52,7 @@ type Visitor<T> = {
51
52
  enter: (path: NodePath, state: T) => void;
52
53
  exit: (path: NodePath, state: T) => void;
53
54
  };
54
- export default function createTraverser(): {
55
+ declare function createTraverser(): {
55
56
  traverse: <T>(node: ASTNode, visitor: Visitor<T>, scopeId: number | undefined, state: T, path?: NodePath) => void;
56
57
  createNodePath: (node: ASTNode, key: string | undefined | number, parentKey: string | undefined, scopeId: number | undefined, functionScopeId: number | undefined, nodePath?: NodePath) => NodePath;
57
58
  getChildren: (key: string, path: NodePath) => NodePath[];
@@ -59,5 +60,5 @@ export default function createTraverser(): {
59
60
  getPrimitiveChildrenOrNodePaths: (key: string, path: NodePath) => Array<PrimitiveValue | NodePath>;
60
61
  getBinding: (scopeId: number, name: string) => Binding | undefined;
61
62
  };
62
- export {};
63
- //# sourceMappingURL=index.d.ts.map
63
+
64
+ export { type ASTNode, type AvailableFunction, type Binding, type NodePath, type PrimitiveValue, type Scope, createTraverser as default, functions, isAvailableFunction, multiQuery, parseSource, query };
@@ -1,5 +1,6 @@
1
- import { ESTree } from "meriyah";
2
- export declare const functions: {
1
+ import { ESTree } from 'meriyah';
2
+
3
+ declare const functions: {
3
4
  join: {
4
5
  fn: (result: Result[][]) => Result[];
5
6
  };
@@ -13,33 +14,33 @@ export declare const functions: {
13
14
  fn: (result: Result[][]) => Result[];
14
15
  };
15
16
  };
16
- export type AvailableFunction = keyof typeof functions;
17
- export declare function isAvailableFunction(name: string): name is AvailableFunction;
18
- export type PrimitiveValue = string | number | boolean;
17
+ type AvailableFunction = keyof typeof functions;
18
+ declare function isAvailableFunction(name: string): name is AvailableFunction;
19
+ type PrimitiveValue = string | number | boolean;
19
20
  type Result = ASTNode | PrimitiveValue;
20
- export declare function query(code: string | ASTNode, query: string, returnAST?: boolean): Result[] & {
21
+ declare function query(code: string | ASTNode, query: string, returnAST?: boolean): Result[] & {
21
22
  __AST?: ASTNode;
22
23
  };
23
- export declare function multiQuery<T extends Record<string, string>>(code: string | ASTNode, namedQueries: T, returnAST?: boolean): Record<keyof T, Result[]> & {
24
+ declare function multiQuery<T extends Record<string, string>>(code: string | ASTNode, namedQueries: T, returnAST?: boolean): Record<keyof T, Result[]> & {
24
25
  __AST?: ASTNode;
25
26
  };
26
- export declare function parseSource(source: string, optimize?: boolean): ASTNode;
27
- export type Binding = {
27
+ declare function parseSource(source: string, optimize?: boolean): ASTNode;
28
+ type Binding = {
28
29
  path: NodePath;
29
30
  };
30
- export type Scope = {
31
+ type Scope = {
31
32
  bindings: Record<string, Binding>;
32
33
  parentScopeId?: number;
33
34
  id: number;
34
35
  };
35
- export type ASTNode = ESTree.Node & {
36
+ type ASTNode = ESTree.Node & {
36
37
  extra?: {
37
38
  scopeId?: number;
38
39
  functionScopeId?: number;
39
40
  nodePath?: NodePath;
40
41
  };
41
42
  };
42
- export type NodePath = {
43
+ type NodePath = {
43
44
  node: ASTNode;
44
45
  key?: string;
45
46
  parentPath?: NodePath;
@@ -51,7 +52,7 @@ type Visitor<T> = {
51
52
  enter: (path: NodePath, state: T) => void;
52
53
  exit: (path: NodePath, state: T) => void;
53
54
  };
54
- export default function createTraverser(): {
55
+ declare function createTraverser(): {
55
56
  traverse: <T>(node: ASTNode, visitor: Visitor<T>, scopeId: number | undefined, state: T, path?: NodePath) => void;
56
57
  createNodePath: (node: ASTNode, key: string | undefined | number, parentKey: string | undefined, scopeId: number | undefined, functionScopeId: number | undefined, nodePath?: NodePath) => NodePath;
57
58
  getChildren: (key: string, path: NodePath) => NodePath[];
@@ -59,5 +60,5 @@ export default function createTraverser(): {
59
60
  getPrimitiveChildrenOrNodePaths: (key: string, path: NodePath) => Array<PrimitiveValue | NodePath>;
60
61
  getBinding: (scopeId: number, name: string) => Binding | undefined;
61
62
  };
62
- export {};
63
- //# sourceMappingURL=index.d.ts.map
63
+
64
+ export { type ASTNode, type AvailableFunction, type Binding, type NodePath, type PrimitiveValue, type Scope, createTraverser as default, functions, isAvailableFunction, multiQuery, parseSource, query };