Leon4gr45 commited on
Commit
25e5703
·
verified ·
1 Parent(s): b593f0b

Upload folder using huggingface_hub (part 10)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. node_modules/@types/babel__traverse/LICENSE +21 -0
  2. node_modules/@types/babel__traverse/README.md +15 -0
  3. node_modules/@types/babel__traverse/index.d.ts +1506 -0
  4. node_modules/@types/babel__traverse/package.json +63 -0
  5. node_modules/@types/d3-array/LICENSE +21 -0
  6. node_modules/@types/d3-array/README.md +15 -0
  7. node_modules/@types/d3-array/index.d.ts +1118 -0
  8. node_modules/@types/d3-array/package.json +56 -0
  9. node_modules/@types/d3-color/LICENSE +21 -0
  10. node_modules/@types/d3-color/README.md +15 -0
  11. node_modules/@types/d3-color/index.d.ts +669 -0
  12. node_modules/@types/d3-color/package.json +55 -0
  13. node_modules/@types/d3-ease/LICENSE +21 -0
  14. node_modules/@types/d3-ease/README.md +15 -0
  15. node_modules/@types/d3-ease/index.d.ts +316 -0
  16. node_modules/@types/d3-ease/package.json +40 -0
  17. node_modules/@types/d3-interpolate/LICENSE +21 -0
  18. node_modules/@types/d3-interpolate/README.md +15 -0
  19. node_modules/@types/d3-interpolate/index.d.ts +387 -0
  20. node_modules/@types/d3-interpolate/package.json +47 -0
  21. node_modules/@types/d3-path/LICENSE +21 -0
  22. node_modules/@types/d3-path/README.md +15 -0
  23. node_modules/@types/d3-path/index.d.ts +108 -0
  24. node_modules/@types/d3-path/package.json +41 -0
  25. node_modules/@types/d3-scale/LICENSE +21 -0
  26. node_modules/@types/d3-scale/README.md +15 -0
  27. node_modules/@types/d3-scale/index.d.ts +0 -0
  28. node_modules/@types/d3-scale/package.json +53 -0
  29. node_modules/@types/d3-shape/LICENSE +21 -0
  30. node_modules/@types/d3-shape/README.md +15 -0
  31. node_modules/@types/d3-shape/index.d.ts +0 -0
  32. node_modules/@types/d3-shape/package.json +53 -0
  33. node_modules/@types/d3-time/LICENSE +21 -0
  34. node_modules/@types/d3-time/README.md +15 -0
  35. node_modules/@types/d3-time/index.d.ts +697 -0
  36. node_modules/@types/d3-time/package.json +46 -0
  37. node_modules/@types/d3-timer/LICENSE +21 -0
  38. node_modules/@types/d3-timer/README.md +15 -0
  39. node_modules/@types/d3-timer/index.d.ts +68 -0
  40. node_modules/@types/d3-timer/package.json +45 -0
  41. node_modules/@types/estree/LICENSE +21 -0
  42. node_modules/@types/estree/README.md +15 -0
  43. node_modules/@types/estree/flow.d.ts +167 -0
  44. node_modules/@types/estree/index.d.ts +694 -0
  45. node_modules/@types/estree/package.json +27 -0
  46. node_modules/@types/node/LICENSE +21 -0
  47. node_modules/@types/node/README.md +15 -0
  48. node_modules/@types/node/assert.d.ts +1078 -0
  49. node_modules/@types/node/assert/strict.d.ts +111 -0
  50. node_modules/@types/node/async_hooks.d.ts +603 -0
node_modules/@types/babel__traverse/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
node_modules/@types/babel__traverse/README.md ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Installation
2
+ > `npm install --save @types/babel__traverse`
3
+
4
+ # Summary
5
+ This package contains type definitions for @babel/traverse (https://github.com/babel/babel/tree/main/packages/babel-traverse).
6
+
7
+ # Details
8
+ Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__traverse.
9
+
10
+ ### Additional Details
11
+ * Last updated: Thu, 31 Jul 2025 21:02:30 GMT
12
+ * Dependencies: [@babel/types](https://npmjs.com/package/@babel/types)
13
+
14
+ # Credits
15
+ These definitions were written by [Troy Gerwien](https://github.com/yortus), [Marvin Hagemeister](https://github.com/marvinhagemeister), [Ryan Petrich](https://github.com/rpetrich), [Melvin Groenhoff](https://github.com/mgroenhoff), [Dean L.](https://github.com/dlgrit), [Ifiok Jr.](https://github.com/ifiokjr), [ExE Boss](https://github.com/ExE-Boss), and [Daniel Tschinder](https://github.com/danez).
node_modules/@types/babel__traverse/index.d.ts ADDED
@@ -0,0 +1,1506 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import * as t from "@babel/types";
2
+ export import Node = t.Node;
3
+ export import RemovePropertiesOptions = t.RemovePropertiesOptions;
4
+
5
+ declare const traverse: {
6
+ <S>(parent: Node, opts: TraverseOptions<S>, scope: Scope | undefined, state: S, parentPath?: NodePath): void;
7
+ (parent: Node, opts?: TraverseOptions, scope?: Scope, state?: any, parentPath?: NodePath): void;
8
+
9
+ visitors: typeof visitors;
10
+ verify: typeof visitors.verify;
11
+ explode: typeof visitors.explode;
12
+
13
+ cheap: (node: Node, enter: (node: Node) => void) => void;
14
+ node: (
15
+ node: Node,
16
+ opts: TraverseOptions,
17
+ scope?: Scope,
18
+ state?: any,
19
+ path?: NodePath,
20
+ skipKeys?: Record<string, boolean>,
21
+ ) => void;
22
+ clearNode: (node: Node, opts?: RemovePropertiesOptions) => void;
23
+ removeProperties: (tree: Node, opts?: RemovePropertiesOptions) => Node;
24
+ hasType: (tree: Node, type: Node["type"], denylistTypes?: string[]) => boolean;
25
+
26
+ cache: typeof cache;
27
+ };
28
+
29
+ export namespace visitors {
30
+ /**
31
+ * `explode()` will take a `Visitor` object with all of the various shorthands
32
+ * that we support, and validates & normalizes it into a common format, ready
33
+ * to be used in traversal.
34
+ *
35
+ * The various shorthands are:
36
+ * - `Identifier() { ... }` -> `Identifier: { enter() { ... } }`
37
+ * - `"Identifier|NumericLiteral": { ... }` -> `Identifier: { ... }, NumericLiteral: { ... }`
38
+ * - Aliases in `@babel/types`: e.g. `Property: { ... }` -> `ObjectProperty: { ... }, ClassProperty: { ... }`
39
+ *
40
+ * Other normalizations are:
41
+ * - Visitors of virtual types are wrapped, so that they are only visited when their dynamic check passes
42
+ * - `enter` and `exit` functions are wrapped in arrays, to ease merging of visitors
43
+ */
44
+ function explode<S = unknown>(
45
+ visitor: Visitor<S>,
46
+ ): {
47
+ [Type in Exclude<Node, t.DeprecatedAliases>["type"]]?: VisitNodeObject<S, Extract<Node, { type: Type }>>;
48
+ };
49
+ function verify(visitor: Visitor): void;
50
+ function merge<State>(visitors: Array<Visitor<State>>): Visitor<State>;
51
+ function merge(
52
+ visitors: Visitor[],
53
+ states?: any[],
54
+ wrapper?: (
55
+ stateKey: any,
56
+ visitorKey: keyof Visitor,
57
+ func: VisitNodeFunction<unknown, Node>,
58
+ ) => VisitNodeFunction<unknown, Node> | null,
59
+ ): Visitor;
60
+ }
61
+
62
+ export namespace cache {
63
+ let path: WeakMap<t.Node, Map<t.Node, NodePath>>;
64
+ let scope: WeakMap<t.Node, Scope>;
65
+ function clear(): void;
66
+ function clearPath(): void;
67
+ function clearScope(): void;
68
+ }
69
+
70
+ export default traverse;
71
+
72
+ export type TraverseOptions<S = Node> = {
73
+ scope?: Scope;
74
+ noScope?: boolean;
75
+ denylist?: NodeType[];
76
+ /** @deprecated will be removed in Babel 8 */
77
+ blacklist?: NodeType[];
78
+ shouldSkip?: (node: NodePath) => boolean;
79
+ } & Visitor<S>;
80
+
81
+ export class Scope {
82
+ /**
83
+ * This searches the current "scope" and collects all references/bindings
84
+ * within.
85
+ */
86
+ constructor(path: NodePath, parentScope?: Scope);
87
+ uid: number;
88
+ path: NodePath;
89
+ block: Node;
90
+ labels: Map<string, NodePath<t.LabeledStatement>>;
91
+ parentBlock: Node;
92
+ parent: Scope;
93
+ hub: HubInterface;
94
+ bindings: { [name: string]: Binding };
95
+ references: { [name: string]: true };
96
+ globals: { [name: string]: t.Identifier | t.JSXIdentifier };
97
+ uids: { [name: string]: boolean };
98
+ data: Record<string | symbol, unknown>;
99
+ crawling: boolean;
100
+
101
+ static globals: string[];
102
+ /** Variables available in current context. */
103
+ static contextVariables: string[];
104
+
105
+ /** Traverse node with current scope and path. */
106
+ traverse<S>(node: Node | Node[], opts: TraverseOptions<S>, state: S): void;
107
+ traverse(node: Node | Node[], opts?: TraverseOptions, state?: any): void;
108
+
109
+ /** Generate a unique identifier and add it to the current scope. */
110
+ generateDeclaredUidIdentifier(name?: string): t.Identifier;
111
+
112
+ /** Generate a unique identifier. */
113
+ generateUidIdentifier(name?: string): t.Identifier;
114
+
115
+ /** Generate a unique `_id1` binding. */
116
+ generateUid(name?: string): string;
117
+
118
+ /** Generate a unique identifier based on a node. */
119
+ generateUidIdentifierBasedOnNode(parent: Node, defaultName?: string): t.Identifier;
120
+
121
+ /**
122
+ * Determine whether evaluating the specific input `node` is a consequenceless reference. ie.
123
+ * evaluating it wont result in potentially arbitrary code from being ran. The following are
124
+ * whitelisted and determined not to cause side effects:
125
+ *
126
+ * - `this` expressions
127
+ * - `super` expressions
128
+ * - Bound identifiers
129
+ */
130
+ isStatic(node: Node): boolean;
131
+
132
+ /** Possibly generate a memoised identifier if it is not static and has consequences. */
133
+ maybeGenerateMemoised(node: Node, dontPush?: boolean): t.Identifier;
134
+
135
+ checkBlockScopedCollisions(local: Binding, kind: BindingKind, name: string, id: object): void;
136
+
137
+ rename(oldName: string, newName?: string, block?: Node): void;
138
+
139
+ dump(): void;
140
+
141
+ toArray(
142
+ node: t.Node,
143
+ i?: number | boolean,
144
+ arrayLikeIsIterable?: boolean,
145
+ ): t.ArrayExpression | t.CallExpression | t.Identifier;
146
+
147
+ hasLabel(name: string): boolean;
148
+
149
+ getLabel(name: string): NodePath<t.LabeledStatement> | undefined;
150
+
151
+ registerLabel(path: NodePath<t.LabeledStatement>): void;
152
+
153
+ registerDeclaration(path: NodePath): void;
154
+
155
+ buildUndefinedNode(): t.UnaryExpression;
156
+
157
+ registerConstantViolation(path: NodePath): void;
158
+
159
+ registerBinding(kind: BindingKind, path: NodePath, bindingPath?: NodePath): void;
160
+
161
+ addGlobal(node: t.Identifier | t.JSXIdentifier): void;
162
+
163
+ hasUid(name: string): boolean;
164
+
165
+ hasGlobal(name: string): boolean;
166
+
167
+ hasReference(name: string): boolean;
168
+
169
+ isPure(node: Node, constantsOnly?: boolean): boolean;
170
+
171
+ /**
172
+ * Set some arbitrary data on the current scope.
173
+ */
174
+ setData(key: string, val: any): any;
175
+
176
+ /**
177
+ * Recursively walk up scope tree looking for the data `key`.
178
+ */
179
+ getData(key: string): any;
180
+
181
+ /**
182
+ * Recursively walk up scope tree looking for the data `key` and if it exists,
183
+ * remove it.
184
+ */
185
+ removeData(key: string): void;
186
+
187
+ crawl(): void;
188
+
189
+ push(opts: {
190
+ id: t.LVal;
191
+ init?: t.Expression;
192
+ unique?: boolean;
193
+ _blockHoist?: number | undefined;
194
+ kind?: "var" | "let" | "const";
195
+ }): void;
196
+
197
+ /** Walk up to the top of the scope tree and get the `Program`. */
198
+ getProgramParent(): Scope;
199
+
200
+ /** Walk up the scope tree until we hit either a Function or return null. */
201
+ getFunctionParent(): Scope | null;
202
+
203
+ /**
204
+ * Walk up the scope tree until we hit either a BlockStatement/Loop/Program/Function/Switch or reach the
205
+ * very top and hit Program.
206
+ */
207
+ getBlockParent(): Scope;
208
+
209
+ /**
210
+ * Walk up from a pattern scope (function param initializer) until we hit a non-pattern scope,
211
+ * then returns its block parent
212
+ * @returns An ancestry scope whose path is a block parent
213
+ */
214
+ getPatternParent(): Scope;
215
+
216
+ /** Walks the scope tree and gathers **all** bindings. */
217
+ getAllBindings(): Record<string, Binding>;
218
+
219
+ /** Walks the scope tree and gathers all declarations of `kind`. */
220
+ getAllBindingsOfKind(...kinds: string[]): Record<string, Binding>;
221
+
222
+ bindingIdentifierEquals(name: string, node: Node): boolean;
223
+
224
+ getBinding(name: string): Binding | undefined;
225
+
226
+ getOwnBinding(name: string): Binding | undefined;
227
+
228
+ getBindingIdentifier(name: string): t.Identifier;
229
+
230
+ getOwnBindingIdentifier(name: string): t.Identifier;
231
+
232
+ hasOwnBinding(name: string): boolean;
233
+
234
+ hasBinding(
235
+ name: string,
236
+ optsOrNoGlobals?:
237
+ | boolean
238
+ | {
239
+ noGlobals?: boolean;
240
+ noUids?: boolean;
241
+ },
242
+ ): boolean;
243
+
244
+ parentHasBinding(
245
+ name: string,
246
+ opts?: {
247
+ noGlobals?: boolean;
248
+ noUids?: boolean;
249
+ },
250
+ ): boolean;
251
+
252
+ /** Move a binding of `name` to another `scope`. */
253
+ moveBindingTo(name: string, scope: Scope): void;
254
+
255
+ removeOwnBinding(name: string): void;
256
+
257
+ removeBinding(name: string): void;
258
+ }
259
+
260
+ export type BindingKind = "var" | "let" | "const" | "module" | "hoisted" | "param" | "local" | "unknown";
261
+
262
+ /**
263
+ * This class is responsible for a binding inside of a scope.
264
+ *
265
+ * It tracks the following:
266
+ *
267
+ * * Node path.
268
+ * * Amount of times referenced by other nodes.
269
+ * * Paths to nodes that reassign or modify this binding.
270
+ * * The kind of binding. (Is it a parameter, declaration etc)
271
+ */
272
+ export class Binding {
273
+ constructor(opts: { identifier: t.Identifier; scope: Scope; path: NodePath; kind: BindingKind });
274
+ identifier: t.Identifier;
275
+ scope: Scope;
276
+ path: NodePath;
277
+ kind: BindingKind;
278
+ referenced: boolean;
279
+ references: number;
280
+ referencePaths: NodePath[];
281
+ constant: boolean;
282
+ constantViolations: NodePath[];
283
+ hasDeoptedValue: boolean;
284
+ hasValue: boolean;
285
+ value: any;
286
+
287
+ deopValue(): void;
288
+ setValue(value: any): void;
289
+ clearValue(): void;
290
+
291
+ /** Register a constant violation with the provided `path`. */
292
+ reassign(path: NodePath): void;
293
+ /** Increment the amount of references to this binding. */
294
+ reference(path: NodePath): void;
295
+ /** Decrement the amount of references to this binding. */
296
+ dereference(): void;
297
+ }
298
+
299
+ export type Visitor<S = unknown> =
300
+ & VisitNodeObject<S, Node>
301
+ & {
302
+ [N in Node as N["type"]]?: VisitNode<S, N extends { type: N["type"] } ? N : never>;
303
+ }
304
+ & {
305
+ [K in keyof t.Aliases]?: VisitNode<S, t.Aliases[K]>;
306
+ }
307
+ & {
308
+ [K in keyof VirtualTypeAliases]?: VisitNode<S, VirtualTypeAliases[K]>;
309
+ }
310
+ & {
311
+ // Babel supports `NodeTypesWithoutComment | NodeTypesWithoutComment | ... ` but it is
312
+ // too complex for TS. So we type it as a general visitor only if the key contains `|`
313
+ // this is good enough for non-visitor traverse options e.g. `noScope`
314
+ [k: `${string}|${string}`]: VisitNode<S, Node>;
315
+ };
316
+
317
+ export type VisitNode<S, P extends Node> = VisitNodeFunction<S, P> | VisitNodeObject<S, P>;
318
+
319
+ export type VisitNodeFunction<S, P extends Node> = (this: S, path: NodePath<P>, state: S) => void;
320
+
321
+ type NodeType = Node["type"] | keyof t.Aliases;
322
+
323
+ export interface VisitNodeObject<S, P extends Node> {
324
+ enter?: VisitNodeFunction<S, P>;
325
+ exit?: VisitNodeFunction<S, P>;
326
+ }
327
+
328
+ export type NodeKeyOfArrays<T extends Node> = {
329
+ [P in keyof T]-?: T[P] extends Array<Node | null | undefined> ? P : never;
330
+ }[keyof T];
331
+
332
+ export type NodeKeyOfNodes<T extends Node> = {
333
+ [P in keyof T]-?: T[P] extends Node | null | undefined ? P : never;
334
+ }[keyof T];
335
+
336
+ export type NodePaths<T extends Node | readonly Node[]> = T extends readonly Node[]
337
+ ? { -readonly [K in keyof T]: NodePath<Extract<T[K], Node>> }
338
+ : T extends Node ? [NodePath<T>]
339
+ : never;
340
+
341
+ type NodeListType<N, K extends keyof N> = N[K] extends Array<infer P> ? (P extends Node ? P : never) : never;
342
+
343
+ type NodesInsertionParam<T extends Node> = T | readonly T[] | [T, ...T[]];
344
+
345
+ export class NodePath<T = Node> {
346
+ constructor(hub: HubInterface, parent: Node);
347
+ parent: Node;
348
+ hub: Hub;
349
+ data: Record<string | symbol, unknown>;
350
+ context: TraversalContext;
351
+ scope: Scope;
352
+ contexts: TraversalContext[];
353
+ state: any;
354
+ opts: any; // exploded TraverseOptions
355
+ skipKeys: Record<string, boolean> | null;
356
+ parentPath: T extends t.Program ? null : NodePath;
357
+ container: Node | Node[] | null;
358
+ listKey: string | null;
359
+ key: string | number | null;
360
+ node: T;
361
+ type: T extends Node ? T["type"] : T extends null | undefined ? undefined : Node["type"] | undefined;
362
+ shouldSkip: boolean;
363
+ shouldStop: boolean;
364
+ removed: boolean;
365
+ inList: boolean;
366
+ parentKey: string;
367
+ typeAnnotation: object;
368
+
369
+ static get<C extends Node, K extends keyof C>(opts: {
370
+ hub?: HubInterface;
371
+ parentPath: NodePath | null;
372
+ parent: Node;
373
+ container: C;
374
+ key: K;
375
+ }): NodePath<C[K]>;
376
+ static get<C extends Node, L extends NodeKeyOfArrays<C>>(opts: {
377
+ hub?: HubInterface;
378
+ parentPath: NodePath | null;
379
+ parent: Node;
380
+ container: C;
381
+ listKey: L;
382
+ key: number;
383
+ }): C[L] extends Array<Node | null | undefined> ? NodePath<C[L][number]> : never;
384
+
385
+ getScope(scope: Scope): Scope;
386
+
387
+ setData(key: string | symbol, val: any): any;
388
+
389
+ getData(key: string | symbol, def?: any): any;
390
+
391
+ hasNode(): this is NodePath<Exclude<T, null | undefined>>;
392
+
393
+ buildCodeFrameError(msg: string, Error?: ErrorConstructor): Error;
394
+
395
+ traverse<T>(visitor: TraverseOptions<T>, state: T): void;
396
+ traverse(visitor: TraverseOptions): void;
397
+
398
+ set(key: string, node: any): void;
399
+
400
+ getPathLocation(): string;
401
+
402
+ // Example: https://github.com/babel/babel/blob/63204ae51e020d84a5b246312f5eeb4d981ab952/packages/babel-traverse/src/path/modification.js#L83
403
+ debug(buildMessage: () => string): void;
404
+
405
+ // #region ------------------------- ancestry -------------------------
406
+ /**
407
+ * Starting at the parent path of the current `NodePath` and going up the
408
+ * tree, return the first `NodePath` that causes the provided `callback`
409
+ * to return a truthy value, or `null` if the `callback` never returns a
410
+ * truthy value.
411
+ */
412
+ findParent(callback: (path: NodePath) => boolean): NodePath | null;
413
+
414
+ /**
415
+ * Starting at current `NodePath` and going up the tree, return the first
416
+ * `NodePath` that causes the provided `callback` to return a truthy value,
417
+ * or `null` if the `callback` never returns a truthy value.
418
+ */
419
+ find(callback: (path: NodePath) => boolean): NodePath | null;
420
+
421
+ /** Get the parent function of the current path. */
422
+ getFunctionParent(): NodePath<t.Function> | null;
423
+
424
+ /** Walk up the tree until we hit a parent node path in a list. */
425
+ getStatementParent(): NodePath<t.Statement> | null;
426
+
427
+ /**
428
+ * Get the deepest common ancestor and then from it, get the earliest relationship path
429
+ * to that ancestor.
430
+ *
431
+ * Earliest is defined as being "before" all the other nodes in terms of list container
432
+ * position and visiting key.
433
+ */
434
+ getEarliestCommonAncestorFrom(paths: NodePath[]): NodePath;
435
+
436
+ /** Get the earliest path in the tree where the provided `paths` intersect. */
437
+ getDeepestCommonAncestorFrom(
438
+ paths: NodePath[],
439
+ filter?: (deepest: Node, i: number, ancestries: NodePath[][]) => NodePath,
440
+ ): NodePath;
441
+
442
+ /**
443
+ * Build an array of node paths containing the entire ancestry of the current node path.
444
+ *
445
+ * NOTE: The current node path is included in this.
446
+ */
447
+ getAncestry(): [this, ...NodePath[]];
448
+
449
+ /**
450
+ * A helper to find if `this` path is an ancestor of `maybeDescendant`
451
+ */
452
+ isAncestor(maybeDescendant: NodePath): boolean;
453
+
454
+ /**
455
+ * A helper to find if `this` path is a descendant of `maybeAncestor`
456
+ */
457
+ isDescendant(maybeAncestor: NodePath): boolean;
458
+
459
+ inType(...candidateTypes: string[]): boolean;
460
+ // #endregion
461
+
462
+ // #region ------------------------- inference -------------------------
463
+ /** Infer the type of the current `NodePath`. */
464
+ getTypeAnnotation(): t.FlowType | t.TSType;
465
+
466
+ isBaseType(baseName: string, soft?: boolean): boolean;
467
+
468
+ couldBeBaseType(name: string): boolean;
469
+
470
+ baseTypeStrictlyMatches(rightArg: NodePath): boolean;
471
+
472
+ isGenericType(genericName: string): boolean;
473
+ // #endregion
474
+
475
+ // #region ------------------------- replacement -------------------------
476
+ /**
477
+ * Replace a node with an array of multiple. This method performs the following steps:
478
+ *
479
+ * - Inherit the comments of first provided node with that of the current node.
480
+ * - Insert the provided nodes after the current node.
481
+ * - Remove the current node.
482
+ */
483
+ replaceWithMultiple<Nodes extends Node | readonly Node[] | [Node, ...Node[]]>(nodes: Nodes): NodePaths<Nodes>;
484
+
485
+ /**
486
+ * Parse a string as an expression and replace the current node with the result.
487
+ *
488
+ * NOTE: This is typically not a good idea to use. Building source strings when
489
+ * transforming ASTs is an antipattern and SHOULD NOT be encouraged. Even if it's
490
+ * easier to use, your transforms will be extremely brittle.
491
+ */
492
+ replaceWithSourceString(replacement: string): [NodePath];
493
+
494
+ /** Replace the current node with another. */
495
+ replaceWith<R extends Node>(replacementPath: R | NodePath<R>): [NodePath<R>];
496
+ replaceWith<R extends NodePath>(replacementPath: R): [R];
497
+
498
+ /**
499
+ * This method takes an array of statements nodes and then explodes it
500
+ * into expressions. This method retains completion records which is
501
+ * extremely important to retain original semantics.
502
+ */
503
+ replaceExpressionWithStatements(nodes: t.Statement[]): NodePaths<t.Expression | t.Statement>;
504
+
505
+ replaceInline<Nodes extends Node | readonly Node[] | [Node, ...Node[]]>(nodes: Nodes): NodePaths<Nodes>;
506
+ // #endregion
507
+
508
+ // #region ------------------------- evaluation -------------------------
509
+ /**
510
+ * Walk the input `node` and statically evaluate if it's truthy.
511
+ *
512
+ * Returning `true` when we're sure that the expression will evaluate to a
513
+ * truthy value, `false` if we're sure that it will evaluate to a falsy
514
+ * value and `undefined` if we aren't sure. Because of this please do not
515
+ * rely on coercion when using this method and check with === if it's false.
516
+ */
517
+ evaluateTruthy(): boolean | undefined;
518
+
519
+ /**
520
+ * Walk the input `node` and statically evaluate it.
521
+ *
522
+ * Returns an object in the form `{ confident, value, deopt }`. `confident`
523
+ * indicates whether or not we had to drop out of evaluating the expression
524
+ * because of hitting an unknown node that we couldn't confidently find the
525
+ * value of, in which case `deopt` is the path of said node.
526
+ *
527
+ * Example:
528
+ *
529
+ * t.evaluate(parse("5 + 5")) // { confident: true, value: 10 }
530
+ * t.evaluate(parse("!true")) // { confident: true, value: false }
531
+ * t.evaluate(parse("foo + foo")) // { confident: false, value: undefined, deopt: NodePath }
532
+ */
533
+ evaluate(): {
534
+ confident: boolean;
535
+ value: any;
536
+ deopt?: NodePath;
537
+ };
538
+ // #endregion
539
+
540
+ // #region ------------------------- introspection -------------------------
541
+ /**
542
+ * Match the current node if it matches the provided `pattern`.
543
+ *
544
+ * For example, given the match `React.createClass` it would match the
545
+ * parsed nodes of `React.createClass` and `React["createClass"]`.
546
+ */
547
+ matchesPattern(pattern: string, allowPartial?: boolean): boolean;
548
+
549
+ /**
550
+ * Check whether we have the input `key`. If the `key` references an array then we check
551
+ * if the array has any items, otherwise we just check if it's falsy.
552
+ */
553
+ has(key: string): boolean;
554
+ // has(key: keyof T): boolean;
555
+
556
+ isStatic(): boolean;
557
+
558
+ /** Alias of `has`. */
559
+ is(key: string): boolean;
560
+ // is(key: keyof T): boolean;
561
+
562
+ /** Opposite of `has`. */
563
+ isnt(key: string): boolean;
564
+ // isnt(key: keyof T): boolean;
565
+
566
+ /** Check whether the path node `key` strict equals `value`. */
567
+ equals(key: string, value: any): boolean;
568
+ // equals(key: keyof T, value: any): boolean;
569
+
570
+ /**
571
+ * Check the type against our stored internal type of the node. This is handy when a node has
572
+ * been removed yet we still internally know the type and need it to calculate node replacement.
573
+ */
574
+ isNodeType(type: string): boolean;
575
+
576
+ /**
577
+ * This checks whether or not we're in one of the following positions:
578
+ *
579
+ * for (KEY in right);
580
+ * for (KEY;;);
581
+ *
582
+ * This is because these spots allow VariableDeclarations AND normal expressions so we need
583
+ * to tell the path replacement that it's ok to replace this with an expression.
584
+ */
585
+ canHaveVariableDeclarationOrExpression(): boolean;
586
+
587
+ /**
588
+ * This checks whether we are swapping an arrow function's body between an
589
+ * expression and a block statement (or vice versa).
590
+ *
591
+ * This is because arrow functions may implicitly return an expression, which
592
+ * is the same as containing a block statement.
593
+ */
594
+ canSwapBetweenExpressionAndStatement(replacement: Node): boolean;
595
+
596
+ /** Check whether the current path references a completion record */
597
+ isCompletionRecord(allowInsideFunction?: boolean): boolean;
598
+
599
+ /**
600
+ * Check whether or not the current `key` allows either a single statement or block statement
601
+ * so we can explode it if necessary.
602
+ */
603
+ isStatementOrBlock(): boolean;
604
+
605
+ /** Check if the currently assigned path references the `importName` of `moduleSource`. */
606
+ referencesImport(moduleSource: string, importName: string): boolean;
607
+
608
+ /** Get the source code associated with this node. */
609
+ getSource(): string;
610
+
611
+ /** Check if the current path will maybe execute before another path */
612
+ willIMaybeExecuteBefore(target: NodePath): boolean;
613
+
614
+ resolve(dangerous?: boolean, resolved?: NodePath[]): NodePath;
615
+
616
+ isConstantExpression(): boolean;
617
+
618
+ isInStrictMode(): boolean;
619
+ // #endregion
620
+
621
+ // #region ------------------------- context -------------------------
622
+ call(key: string): boolean;
623
+
624
+ isDenylisted(): boolean;
625
+
626
+ /** @deprecated will be removed in Babel 8 */
627
+ isBlacklisted(): boolean;
628
+
629
+ visit(): boolean;
630
+
631
+ skip(): void;
632
+
633
+ skipKey(key: string): void;
634
+
635
+ stop(): void;
636
+
637
+ setScope(): void;
638
+
639
+ setContext(context?: TraversalContext): this;
640
+
641
+ /**
642
+ * Here we resync the node paths `key` and `container`. If they've changed according
643
+ * to what we have stored internally then we attempt to resync by crawling and looking
644
+ * for the new values.
645
+ */
646
+ resync(): void;
647
+
648
+ popContext(): void;
649
+
650
+ pushContext(context: TraversalContext): void;
651
+
652
+ requeue(pathToQueue?: NodePath): void;
653
+ // #endregion
654
+
655
+ // #region ------------------------- removal -------------------------
656
+ remove(): void;
657
+ // #endregion
658
+
659
+ // #region ------------------------- conversion -------------------------
660
+ toComputedKey(): t.PrivateName | t.Expression;
661
+
662
+ /** @deprecated Use `arrowFunctionToExpression` */
663
+ arrowFunctionToShadowed(): void;
664
+
665
+ /**
666
+ * Given an arbitrary function, process its content as if it were an arrow function, moving references
667
+ * to "this", "arguments", "super", and such into the function's parent scope. This method is useful if
668
+ * you have wrapped some set of items in an IIFE or other function, but want "this", "arguments", and super"
669
+ * to continue behaving as expected.
670
+ */
671
+ unwrapFunctionEnvironment(): void;
672
+
673
+ /**
674
+ * Convert a given arrow function into a normal ES5 function expression.
675
+ */
676
+ arrowFunctionToExpression({
677
+ allowInsertArrow,
678
+ allowInsertArrowWithRest,
679
+ /** @deprecated Use `noNewArrows` instead */
680
+ specCompliant,
681
+ noNewArrows,
682
+ }?: {
683
+ allowInsertArrow?: boolean;
684
+ allowInsertArrowWithRest?: boolean;
685
+ specCompliant?: boolean;
686
+ noNewArrows?: boolean;
687
+ }): NodePath<Exclude<t.Function, t.Method | t.ArrowFunctionExpression> | t.CallExpression>;
688
+
689
+ ensureBlock(
690
+ this: NodePath<t.Loop | t.WithStatement | t.Function | t.LabeledStatement | t.CatchClause>,
691
+ ): asserts this is NodePath<
692
+ T & {
693
+ body: t.BlockStatement;
694
+ }
695
+ >;
696
+ // #endregion
697
+
698
+ // #region ------------------------- modification -------------------------
699
+ /** Insert the provided nodes before the current one. */
700
+ insertBefore<Nodes extends NodesInsertionParam<Node>>(nodes: Nodes): NodePaths<Nodes>;
701
+
702
+ /**
703
+ * Insert the provided nodes after the current one. When inserting nodes after an
704
+ * expression, ensure that the completion record is correct by pushing the current node.
705
+ */
706
+ insertAfter<Nodes extends NodesInsertionParam<Node>>(nodes: Nodes): NodePaths<Nodes>;
707
+
708
+ /** Update all sibling node paths after `fromIndex` by `incrementBy`. */
709
+ updateSiblingKeys(fromIndex: number, incrementBy: number): void;
710
+
711
+ /**
712
+ * Insert child nodes at the start of the current node.
713
+ * @param listKey - The key at which the child nodes are stored (usually body).
714
+ * @param nodes - the nodes to insert.
715
+ */
716
+ unshiftContainer<
717
+ T extends Node,
718
+ K extends NodeKeyOfArrays<T>,
719
+ Nodes extends NodesInsertionParam<NodeListType<T, K>>,
720
+ >(this: NodePath<T>, listKey: K, nodes: Nodes): NodePaths<Nodes>;
721
+
722
+ /**
723
+ * Insert child nodes at the end of the current node.
724
+ * @param listKey - The key at which the child nodes are stored (usually body).
725
+ * @param nodes - the nodes to insert.
726
+ */
727
+ pushContainer<T extends Node, K extends NodeKeyOfArrays<T>, Nodes extends NodesInsertionParam<NodeListType<T, K>>>(
728
+ this: NodePath<T>,
729
+ listKey: K,
730
+ nodes: Nodes,
731
+ ): NodePaths<Nodes>;
732
+
733
+ /** Hoist the current node to the highest scope possible and return a UID referencing it. */
734
+ hoist(scope: Scope): void;
735
+ // #endregion
736
+
737
+ // #region ------------------------- family -------------------------
738
+ getOpposite(): NodePath | null;
739
+
740
+ getCompletionRecords(): NodePath[];
741
+
742
+ getSibling(key: string | number): NodePath;
743
+ getPrevSibling(): NodePath;
744
+ getNextSibling(): NodePath;
745
+ getAllPrevSiblings(): NodePath[];
746
+ getAllNextSiblings(): NodePath[];
747
+
748
+ get<K extends keyof T>(key: K, context?: boolean | TraversalContext): NodePathResult<T[K]>;
749
+ get<P extends string>(path: P, context?: boolean | TraversalContext): NodePathResult<ImplGetRecursive<T, P>>;
750
+ get(key: string, context?: boolean | TraversalContext): NodePath | NodePath[];
751
+
752
+ getBindingIdentifiers(duplicates: true): Record<string, t.Identifier[]>;
753
+ getBindingIdentifiers(duplicates?: false): Record<string, t.Identifier>;
754
+ getBindingIdentifiers(duplicates?: boolean): Record<string, t.Identifier | t.Identifier[]>;
755
+
756
+ getOuterBindingIdentifiers(duplicates: true): Record<string, t.Identifier[]>;
757
+ getOuterBindingIdentifiers(duplicates?: false): Record<string, t.Identifier>;
758
+ getOuterBindingIdentifiers(duplicates?: boolean): Record<string, t.Identifier | t.Identifier[]>;
759
+
760
+ getBindingIdentifierPaths(duplicates: true, outerOnly?: boolean): Record<string, Array<NodePath<t.Identifier>>>;
761
+ getBindingIdentifierPaths(duplicates?: false, outerOnly?: boolean): Record<string, NodePath<t.Identifier>>;
762
+ getBindingIdentifierPaths(
763
+ duplicates?: boolean,
764
+ outerOnly?: boolean,
765
+ ): Record<string, NodePath<t.Identifier> | Array<NodePath<t.Identifier>>>;
766
+
767
+ getOuterBindingIdentifierPaths(duplicates: true): Record<string, Array<NodePath<t.Identifier>>>;
768
+ getOuterBindingIdentifierPaths(duplicates?: false): Record<string, NodePath<t.Identifier>>;
769
+ getOuterBindingIdentifierPaths(
770
+ duplicates?: boolean,
771
+ outerOnly?: boolean,
772
+ ): Record<string, NodePath<t.Identifier> | Array<NodePath<t.Identifier>>>;
773
+ // #endregion
774
+
775
+ // #region ------------------------- comments -------------------------
776
+ /** Share comments amongst siblings. */
777
+ shareCommentsWithSiblings(): void;
778
+
779
+ addComment(type: t.CommentTypeShorthand, content: string, line?: boolean): void;
780
+
781
+ /** Give node `comments` of the specified `type`. */
782
+ addComments(type: t.CommentTypeShorthand, comments: t.Comment[]): void;
783
+ // #endregion
784
+
785
+ // #region ------------------------- isXXX -------------------------
786
+ isAccessor(opts?: object): this is NodePath<t.Accessor>;
787
+ isAnyTypeAnnotation(opts?: object): this is NodePath<t.AnyTypeAnnotation>;
788
+ isArgumentPlaceholder(opts?: object): this is NodePath<t.ArgumentPlaceholder>;
789
+ isArrayExpression(opts?: object): this is NodePath<t.ArrayExpression>;
790
+ isArrayPattern(opts?: object): this is NodePath<t.ArrayPattern>;
791
+ isArrayTypeAnnotation(opts?: object): this is NodePath<t.ArrayTypeAnnotation>;
792
+ isArrowFunctionExpression(opts?: object): this is NodePath<t.ArrowFunctionExpression>;
793
+ isAssignmentExpression(opts?: object): this is NodePath<t.AssignmentExpression>;
794
+ isAssignmentPattern(opts?: object): this is NodePath<t.AssignmentPattern>;
795
+ isAwaitExpression(opts?: object): this is NodePath<t.AwaitExpression>;
796
+ isBigIntLiteral(opts?: object): this is NodePath<t.BigIntLiteral>;
797
+ isBinary(opts?: object): this is NodePath<t.Binary>;
798
+ isBinaryExpression(opts?: object): this is NodePath<t.BinaryExpression>;
799
+ isBindExpression(opts?: object): this is NodePath<t.BindExpression>;
800
+ isBlock(opts?: object): this is NodePath<t.Block>;
801
+ isBlockParent(opts?: object): this is NodePath<t.BlockParent>;
802
+ isBlockStatement(opts?: object): this is NodePath<t.BlockStatement>;
803
+ isBooleanLiteral(opts?: object): this is NodePath<t.BooleanLiteral>;
804
+ isBooleanLiteralTypeAnnotation(opts?: object): this is NodePath<t.BooleanLiteralTypeAnnotation>;
805
+ isBooleanTypeAnnotation(opts?: object): this is NodePath<t.BooleanTypeAnnotation>;
806
+ isBreakStatement(opts?: object): this is NodePath<t.BreakStatement>;
807
+ isCallExpression(opts?: object): this is NodePath<t.CallExpression>;
808
+ isCatchClause(opts?: object): this is NodePath<t.CatchClause>;
809
+ isClass(opts?: object): this is NodePath<t.Class>;
810
+ isClassAccessorProperty(opts?: object): this is NodePath<t.ClassAccessorProperty>;
811
+ isClassBody(opts?: object): this is NodePath<t.ClassBody>;
812
+ isClassDeclaration(opts?: object): this is NodePath<t.ClassDeclaration>;
813
+ isClassExpression(opts?: object): this is NodePath<t.ClassExpression>;
814
+ isClassImplements(opts?: object): this is NodePath<t.ClassImplements>;
815
+ isClassMethod(opts?: object): this is NodePath<t.ClassMethod>;
816
+ isClassPrivateMethod(opts?: object): this is NodePath<t.ClassPrivateMethod>;
817
+ isClassPrivateProperty(opts?: object): this is NodePath<t.ClassPrivateProperty>;
818
+ isClassProperty(opts?: object): this is NodePath<t.ClassProperty>;
819
+ isCompletionStatement(opts?: object): this is NodePath<t.CompletionStatement>;
820
+ isConditional(opts?: object): this is NodePath<t.Conditional>;
821
+ isConditionalExpression(opts?: object): this is NodePath<t.ConditionalExpression>;
822
+ isContinueStatement(opts?: object): this is NodePath<t.ContinueStatement>;
823
+ isDebuggerStatement(opts?: object): this is NodePath<t.DebuggerStatement>;
824
+ isDecimalLiteral(opts?: object): this is NodePath<t.DecimalLiteral>;
825
+ isDeclaration(opts?: object): this is NodePath<t.Declaration>;
826
+ isDeclareClass(opts?: object): this is NodePath<t.DeclareClass>;
827
+ isDeclareExportAllDeclaration(opts?: object): this is NodePath<t.DeclareExportAllDeclaration>;
828
+ isDeclareExportDeclaration(opts?: object): this is NodePath<t.DeclareExportDeclaration>;
829
+ isDeclareFunction(opts?: object): this is NodePath<t.DeclareFunction>;
830
+ isDeclareInterface(opts?: object): this is NodePath<t.DeclareInterface>;
831
+ isDeclareModule(opts?: object): this is NodePath<t.DeclareModule>;
832
+ isDeclareModuleExports(opts?: object): this is NodePath<t.DeclareModuleExports>;
833
+ isDeclareOpaqueType(opts?: object): this is NodePath<t.DeclareOpaqueType>;
834
+ isDeclareTypeAlias(opts?: object): this is NodePath<t.DeclareTypeAlias>;
835
+ isDeclareVariable(opts?: object): this is NodePath<t.DeclareVariable>;
836
+ isDeclaredPredicate(opts?: object): this is NodePath<t.DeclaredPredicate>;
837
+ isDecorator(opts?: object): this is NodePath<t.Decorator>;
838
+ isDirective(opts?: object): this is NodePath<t.Directive>;
839
+ isDirectiveLiteral(opts?: object): this is NodePath<t.DirectiveLiteral>;
840
+ isDoExpression(opts?: object): this is NodePath<t.DoExpression>;
841
+ isDoWhileStatement(opts?: object): this is NodePath<t.DoWhileStatement>;
842
+ isEmptyStatement(opts?: object): this is NodePath<t.EmptyStatement>;
843
+ isEmptyTypeAnnotation(opts?: object): this is NodePath<t.EmptyTypeAnnotation>;
844
+ isEnumBody(opts?: object): this is NodePath<t.EnumBody>;
845
+ isEnumBooleanBody(opts?: object): this is NodePath<t.EnumBooleanBody>;
846
+ isEnumBooleanMember(opts?: object): this is NodePath<t.EnumBooleanMember>;
847
+ isEnumDeclaration(opts?: object): this is NodePath<t.EnumDeclaration>;
848
+ isEnumDefaultedMember(opts?: object): this is NodePath<t.EnumDefaultedMember>;
849
+ isEnumMember(opts?: object): this is NodePath<t.EnumMember>;
850
+ isEnumNumberBody(opts?: object): this is NodePath<t.EnumNumberBody>;
851
+ isEnumNumberMember(opts?: object): this is NodePath<t.EnumNumberMember>;
852
+ isEnumStringBody(opts?: object): this is NodePath<t.EnumStringBody>;
853
+ isEnumStringMember(opts?: object): this is NodePath<t.EnumStringMember>;
854
+ isEnumSymbolBody(opts?: object): this is NodePath<t.EnumSymbolBody>;
855
+ isExistsTypeAnnotation(opts?: object): this is NodePath<t.ExistsTypeAnnotation>;
856
+ isExportAllDeclaration(opts?: object): this is NodePath<t.ExportAllDeclaration>;
857
+ isExportDeclaration(opts?: object): this is NodePath<t.ExportDeclaration>;
858
+ isExportDefaultDeclaration(opts?: object): this is NodePath<t.ExportDefaultDeclaration>;
859
+ isExportDefaultSpecifier(opts?: object): this is NodePath<t.ExportDefaultSpecifier>;
860
+ isExportNamedDeclaration(opts?: object): this is NodePath<t.ExportNamedDeclaration>;
861
+ isExportNamespaceSpecifier(opts?: object): this is NodePath<t.ExportNamespaceSpecifier>;
862
+ isExportSpecifier(opts?: object): this is NodePath<t.ExportSpecifier>;
863
+ isExpression(opts?: object): this is NodePath<t.Expression>;
864
+ isExpressionStatement(opts?: object): this is NodePath<t.ExpressionStatement>;
865
+ isExpressionWrapper(opts?: object): this is NodePath<t.ExpressionWrapper>;
866
+ isFile(opts?: object): this is NodePath<t.File>;
867
+ isFlow(opts?: object): this is NodePath<t.Flow>;
868
+ isFlowBaseAnnotation(opts?: object): this is NodePath<t.FlowBaseAnnotation>;
869
+ isFlowDeclaration(opts?: object): this is NodePath<t.FlowDeclaration>;
870
+ isFlowPredicate(opts?: object): this is NodePath<t.FlowPredicate>;
871
+ isFlowType(opts?: object): this is NodePath<t.FlowType>;
872
+ isFor(opts?: object): this is NodePath<t.For>;
873
+ isForInStatement(opts?: object): this is NodePath<t.ForInStatement>;
874
+ isForOfStatement(opts?: object): this is NodePath<t.ForOfStatement>;
875
+ isForStatement(opts?: object): this is NodePath<t.ForStatement>;
876
+ isForXStatement(opts?: object): this is NodePath<t.ForXStatement>;
877
+ isFunction(opts?: object): this is NodePath<t.Function>;
878
+ isFunctionDeclaration(opts?: object): this is NodePath<t.FunctionDeclaration>;
879
+ isFunctionExpression(opts?: object): this is NodePath<t.FunctionExpression>;
880
+ isFunctionParameter(opts?: object): this is NodePath<t.FunctionParameter>;
881
+ isFunctionParent(opts?: object): this is NodePath<t.FunctionParent>;
882
+ isFunctionTypeAnnotation(opts?: object): this is NodePath<t.FunctionTypeAnnotation>;
883
+ isFunctionTypeParam(opts?: object): this is NodePath<t.FunctionTypeParam>;
884
+ isGenericTypeAnnotation(opts?: object): this is NodePath<t.GenericTypeAnnotation>;
885
+ isIdentifier(opts?: object): this is NodePath<t.Identifier>;
886
+ isIfStatement(opts?: object): this is NodePath<t.IfStatement>;
887
+ isImmutable(opts?: object): this is NodePath<t.Immutable>;
888
+ isImport(opts?: object): this is NodePath<t.Import>;
889
+ isImportAttribute(opts?: object): this is NodePath<t.ImportAttribute>;
890
+ isImportDeclaration(opts?: object): this is NodePath<t.ImportDeclaration>;
891
+ isImportExpression(opts?: object): this is NodePath<t.ImportExpression>;
892
+ isImportDefaultSpecifier(opts?: object): this is NodePath<t.ImportDefaultSpecifier>;
893
+ isImportNamespaceSpecifier(opts?: object): this is NodePath<t.ImportNamespaceSpecifier>;
894
+ isImportOrExportDeclaration(opts?: object): this is NodePath<t.ImportOrExportDeclaration>;
895
+ isImportSpecifier(opts?: object): this is NodePath<t.ImportSpecifier>;
896
+ isIndexedAccessType(opts?: object): this is NodePath<t.IndexedAccessType>;
897
+ isInferredPredicate(opts?: object): this is NodePath<t.InferredPredicate>;
898
+ isInterfaceDeclaration(opts?: object): this is NodePath<t.InterfaceDeclaration>;
899
+ isInterfaceExtends(opts?: object): this is NodePath<t.InterfaceExtends>;
900
+ isInterfaceTypeAnnotation(opts?: object): this is NodePath<t.InterfaceTypeAnnotation>;
901
+ isInterpreterDirective(opts?: object): this is NodePath<t.InterpreterDirective>;
902
+ isIntersectionTypeAnnotation(opts?: object): this is NodePath<t.IntersectionTypeAnnotation>;
903
+ isJSX(opts?: object): this is NodePath<t.JSX>;
904
+ isJSXAttribute(opts?: object): this is NodePath<t.JSXAttribute>;
905
+ isJSXClosingElement(opts?: object): this is NodePath<t.JSXClosingElement>;
906
+ isJSXClosingFragment(opts?: object): this is NodePath<t.JSXClosingFragment>;
907
+ isJSXElement(opts?: object): this is NodePath<t.JSXElement>;
908
+ isJSXEmptyExpression(opts?: object): this is NodePath<t.JSXEmptyExpression>;
909
+ isJSXExpressionContainer(opts?: object): this is NodePath<t.JSXExpressionContainer>;
910
+ isJSXFragment(opts?: object): this is NodePath<t.JSXFragment>;
911
+ isJSXIdentifier(opts?: object): this is NodePath<t.JSXIdentifier>;
912
+ isJSXMemberExpression(opts?: object): this is NodePath<t.JSXMemberExpression>;
913
+ isJSXNamespacedName(opts?: object): this is NodePath<t.JSXNamespacedName>;
914
+ isJSXOpeningElement(opts?: object): this is NodePath<t.JSXOpeningElement>;
915
+ isJSXOpeningFragment(opts?: object): this is NodePath<t.JSXOpeningFragment>;
916
+ isJSXSpreadAttribute(opts?: object): this is NodePath<t.JSXSpreadAttribute>;
917
+ isJSXSpreadChild(opts?: object): this is NodePath<t.JSXSpreadChild>;
918
+ isJSXText(opts?: object): this is NodePath<t.JSXText>;
919
+ isLVal(opts?: object): this is NodePath<t.LVal>;
920
+ isLabeledStatement(opts?: object): this is NodePath<t.LabeledStatement>;
921
+ isLiteral(opts?: object): this is NodePath<t.Literal>;
922
+ isLogicalExpression(opts?: object): this is NodePath<t.LogicalExpression>;
923
+ isLoop(opts?: object): this is NodePath<t.Loop>;
924
+ isMemberExpression(opts?: object): this is NodePath<t.MemberExpression>;
925
+ isMetaProperty(opts?: object): this is NodePath<t.MetaProperty>;
926
+ isMethod(opts?: object): this is NodePath<t.Method>;
927
+ isMiscellaneous(opts?: object): this is NodePath<t.Miscellaneous>;
928
+ isMixedTypeAnnotation(opts?: object): this is NodePath<t.MixedTypeAnnotation>;
929
+ isModuleDeclaration(opts?: object): this is NodePath<t.ModuleDeclaration>;
930
+ isModuleExpression(opts?: object): this is NodePath<t.ModuleExpression>;
931
+ isModuleSpecifier(opts?: object): this is NodePath<t.ModuleSpecifier>;
932
+ isNewExpression(opts?: object): this is NodePath<t.NewExpression>;
933
+ isNoop(opts?: object): this is NodePath<t.Noop>;
934
+ isNullLiteral(opts?: object): this is NodePath<t.NullLiteral>;
935
+ isNullLiteralTypeAnnotation(opts?: object): this is NodePath<t.NullLiteralTypeAnnotation>;
936
+ isNullableTypeAnnotation(opts?: object): this is NodePath<t.NullableTypeAnnotation>;
937
+
938
+ /** @deprecated Use `isNumericLiteral` */
939
+ isNumberLiteral(opts?: object): this is NodePath<t.NumberLiteral>;
940
+ isNumberLiteralTypeAnnotation(opts?: object): this is NodePath<t.NumberLiteralTypeAnnotation>;
941
+ isNumberTypeAnnotation(opts?: object): this is NodePath<t.NumberTypeAnnotation>;
942
+ isNumericLiteral(opts?: object): this is NodePath<t.NumericLiteral>;
943
+ isObjectExpression(opts?: object): this is NodePath<t.ObjectExpression>;
944
+ isObjectMember(opts?: object): this is NodePath<t.ObjectMember>;
945
+ isObjectMethod(opts?: object): this is NodePath<t.ObjectMethod>;
946
+ isObjectPattern(opts?: object): this is NodePath<t.ObjectPattern>;
947
+ isObjectProperty(opts?: object): this is NodePath<t.ObjectProperty>;
948
+ isObjectTypeAnnotation(opts?: object): this is NodePath<t.ObjectTypeAnnotation>;
949
+ isObjectTypeCallProperty(opts?: object): this is NodePath<t.ObjectTypeCallProperty>;
950
+ isObjectTypeIndexer(opts?: object): this is NodePath<t.ObjectTypeIndexer>;
951
+ isObjectTypeInternalSlot(opts?: object): this is NodePath<t.ObjectTypeInternalSlot>;
952
+ isObjectTypeProperty(opts?: object): this is NodePath<t.ObjectTypeProperty>;
953
+ isObjectTypeSpreadProperty(opts?: object): this is NodePath<t.ObjectTypeSpreadProperty>;
954
+ isOpaqueType(opts?: object): this is NodePath<t.OpaqueType>;
955
+ isOptionalCallExpression(opts?: object): this is NodePath<t.OptionalCallExpression>;
956
+ isOptionalIndexedAccessType(opts?: object): this is NodePath<t.OptionalIndexedAccessType>;
957
+ isOptionalMemberExpression(opts?: object): this is NodePath<t.OptionalMemberExpression>;
958
+ isParenthesizedExpression(opts?: object): this is NodePath<t.ParenthesizedExpression>;
959
+ isPattern(opts?: object): this is NodePath<t.Pattern>;
960
+ isPatternLike(opts?: object): this is NodePath<t.PatternLike>;
961
+ isPipelineBareFunction(opts?: object): this is NodePath<t.PipelineBareFunction>;
962
+ isPipelinePrimaryTopicReference(opts?: object): this is NodePath<t.PipelinePrimaryTopicReference>;
963
+ isPipelineTopicExpression(opts?: object): this is NodePath<t.PipelineTopicExpression>;
964
+ isPlaceholder(opts?: object): this is NodePath<t.Placeholder>;
965
+ isPrivate(opts?: object): this is NodePath<t.Private>;
966
+ isPrivateName(opts?: object): this is NodePath<t.PrivateName>;
967
+ isProgram(opts?: object): this is NodePath<t.Program>;
968
+ isProperty(opts?: object): this is NodePath<t.Property>;
969
+ isPureish(opts?: object): this is NodePath<t.Pureish>;
970
+ isQualifiedTypeIdentifier(opts?: object): this is NodePath<t.QualifiedTypeIdentifier>;
971
+ isRecordExpression(opts?: object): this is NodePath<t.RecordExpression>;
972
+ isRegExpLiteral(opts?: object): this is NodePath<t.RegExpLiteral>;
973
+
974
+ /** @deprecated Use `isRegExpLiteral` */
975
+ isRegexLiteral(opts?: object): this is NodePath<t.RegexLiteral>;
976
+ isRestElement(opts?: object): this is NodePath<t.RestElement>;
977
+
978
+ /** @deprecated Use `isRestElement` */
979
+ isRestProperty(opts?: object): this is NodePath<t.RestProperty>;
980
+ isReturnStatement(opts?: object): this is NodePath<t.ReturnStatement>;
981
+ isScopable(opts?: object): this is NodePath<t.Scopable>;
982
+ isSequenceExpression(opts?: object): this is NodePath<t.SequenceExpression>;
983
+ isSpreadElement(opts?: object): this is NodePath<t.SpreadElement>;
984
+
985
+ /** @deprecated Use `isSpreadElement` */
986
+ isSpreadProperty(opts?: object): this is NodePath<t.SpreadProperty>;
987
+ isStandardized(opts?: object): this is NodePath<t.Standardized>;
988
+ isStatement(opts?: object): this is NodePath<t.Statement>;
989
+ isStaticBlock(opts?: object): this is NodePath<t.StaticBlock>;
990
+ isStringLiteral(opts?: object): this is NodePath<t.StringLiteral>;
991
+ isStringLiteralTypeAnnotation(opts?: object): this is NodePath<t.StringLiteralTypeAnnotation>;
992
+ isStringTypeAnnotation(opts?: object): this is NodePath<t.StringTypeAnnotation>;
993
+ isSuper(opts?: object): this is NodePath<t.Super>;
994
+ isSwitchCase(opts?: object): this is NodePath<t.SwitchCase>;
995
+ isSwitchStatement(opts?: object): this is NodePath<t.SwitchStatement>;
996
+ isSymbolTypeAnnotation(opts?: object): this is NodePath<t.SymbolTypeAnnotation>;
997
+ isTSAnyKeyword(opts?: object): this is NodePath<t.TSAnyKeyword>;
998
+ isTSArrayType(opts?: object): this is NodePath<t.TSArrayType>;
999
+ isTSAsExpression(opts?: object): this is NodePath<t.TSAsExpression>;
1000
+ isTSBaseType(opts?: object): this is NodePath<t.TSBaseType>;
1001
+ isTSBigIntKeyword(opts?: object): this is NodePath<t.TSBigIntKeyword>;
1002
+ isTSBooleanKeyword(opts?: object): this is NodePath<t.TSBooleanKeyword>;
1003
+ isTSCallSignatureDeclaration(opts?: object): this is NodePath<t.TSCallSignatureDeclaration>;
1004
+ isTSConditionalType(opts?: object): this is NodePath<t.TSConditionalType>;
1005
+ isTSConstructSignatureDeclaration(opts?: object): this is NodePath<t.TSConstructSignatureDeclaration>;
1006
+ isTSConstructorType(opts?: object): this is NodePath<t.TSConstructorType>;
1007
+ isTSDeclareFunction(opts?: object): this is NodePath<t.TSDeclareFunction>;
1008
+ isTSDeclareMethod(opts?: object): this is NodePath<t.TSDeclareMethod>;
1009
+ isTSEntityName(opts?: object): this is NodePath<t.TSEntityName>;
1010
+ isTSEnumBody(opts?: object): this is NodePath<t.TSEnumBody>;
1011
+ isTSEnumDeclaration(opts?: object): this is NodePath<t.TSEnumDeclaration>;
1012
+ isTSEnumMember(opts?: object): this is NodePath<t.TSEnumMember>;
1013
+ isTSExportAssignment(opts?: object): this is NodePath<t.TSExportAssignment>;
1014
+ isTSExpressionWithTypeArguments(opts?: object): this is NodePath<t.TSExpressionWithTypeArguments>;
1015
+ isTSExternalModuleReference(opts?: object): this is NodePath<t.TSExternalModuleReference>;
1016
+ isTSFunctionType(opts?: object): this is NodePath<t.TSFunctionType>;
1017
+ isTSImportEqualsDeclaration(opts?: object): this is NodePath<t.TSImportEqualsDeclaration>;
1018
+ isTSImportType(opts?: object): this is NodePath<t.TSImportType>;
1019
+ isTSIndexSignature(opts?: object): this is NodePath<t.TSIndexSignature>;
1020
+ isTSIndexedAccessType(opts?: object): this is NodePath<t.TSIndexedAccessType>;
1021
+ isTSInferType(opts?: object): this is NodePath<t.TSInferType>;
1022
+ isTSInstantiationExpression(opts?: object): this is NodePath<t.TSInstantiationExpression>;
1023
+ isTSInterfaceBody(opts?: object): this is NodePath<t.TSInterfaceBody>;
1024
+ isTSInterfaceDeclaration(opts?: object): this is NodePath<t.TSInterfaceDeclaration>;
1025
+ isTSIntersectionType(opts?: object): this is NodePath<t.TSIntersectionType>;
1026
+ isTSIntrinsicKeyword(opts?: object): this is NodePath<t.TSIntrinsicKeyword>;
1027
+ isTSLiteralType(opts?: object): this is NodePath<t.TSLiteralType>;
1028
+ isTSMappedType(opts?: object): this is NodePath<t.TSMappedType>;
1029
+ isTSMethodSignature(opts?: object): this is NodePath<t.TSMethodSignature>;
1030
+ isTSModuleBlock(opts?: object): this is NodePath<t.TSModuleBlock>;
1031
+ isTSModuleDeclaration(opts?: object): this is NodePath<t.TSModuleDeclaration>;
1032
+ isTSNamedTupleMember(opts?: object): this is NodePath<t.TSNamedTupleMember>;
1033
+ isTSNamespaceExportDeclaration(opts?: object): this is NodePath<t.TSNamespaceExportDeclaration>;
1034
+ isTSNeverKeyword(opts?: object): this is NodePath<t.TSNeverKeyword>;
1035
+ isTSNonNullExpression(opts?: object): this is NodePath<t.TSNonNullExpression>;
1036
+ isTSNullKeyword(opts?: object): this is NodePath<t.TSNullKeyword>;
1037
+ isTSNumberKeyword(opts?: object): this is NodePath<t.TSNumberKeyword>;
1038
+ isTSObjectKeyword(opts?: object): this is NodePath<t.TSObjectKeyword>;
1039
+ isTSOptionalType(opts?: object): this is NodePath<t.TSOptionalType>;
1040
+ isTSParameterProperty(opts?: object): this is NodePath<t.TSParameterProperty>;
1041
+ isTSParenthesizedType(opts?: object): this is NodePath<t.TSParenthesizedType>;
1042
+ isTSPropertySignature(opts?: object): this is NodePath<t.TSPropertySignature>;
1043
+ isTSQualifiedName(opts?: object): this is NodePath<t.TSQualifiedName>;
1044
+ isTSRestType(opts?: object): this is NodePath<t.TSRestType>;
1045
+ isTSSatisfiesExpression(opts?: object): this is NodePath<t.TSSatisfiesExpression>;
1046
+ isTSStringKeyword(opts?: object): this is NodePath<t.TSStringKeyword>;
1047
+ isTSSymbolKeyword(opts?: object): this is NodePath<t.TSSymbolKeyword>;
1048
+ isTSTemplateLiteralType(opts?: object): this is NodePath<t.TSTemplateLiteralType>;
1049
+ isTSThisType(opts?: object): this is NodePath<t.TSThisType>;
1050
+ isTSTupleType(opts?: object): this is NodePath<t.TSTupleType>;
1051
+ isTSType(opts?: object): this is NodePath<t.TSType>;
1052
+ isTSTypeAliasDeclaration(opts?: object): this is NodePath<t.TSTypeAliasDeclaration>;
1053
+ isTSTypeAnnotation(opts?: object): this is NodePath<t.TSTypeAnnotation>;
1054
+ isTSTypeAssertion(opts?: object): this is NodePath<t.TSTypeAssertion>;
1055
+ isTSTypeElement(opts?: object): this is NodePath<t.TSTypeElement>;
1056
+ isTSTypeLiteral(opts?: object): this is NodePath<t.TSTypeLiteral>;
1057
+ isTSTypeOperator(opts?: object): this is NodePath<t.TSTypeOperator>;
1058
+ isTSTypeParameter(opts?: object): this is NodePath<t.TSTypeParameter>;
1059
+ isTSTypeParameterDeclaration(opts?: object): this is NodePath<t.TSTypeParameterDeclaration>;
1060
+ isTSTypeParameterInstantiation(opts?: object): this is NodePath<t.TSTypeParameterInstantiation>;
1061
+ isTSTypePredicate(opts?: object): this is NodePath<t.TSTypePredicate>;
1062
+ isTSTypeQuery(opts?: object): this is NodePath<t.TSTypeQuery>;
1063
+ isTSTypeReference(opts?: object): this is NodePath<t.TSTypeReference>;
1064
+ isTSUndefinedKeyword(opts?: object): this is NodePath<t.TSUndefinedKeyword>;
1065
+ isTSUnionType(opts?: object): this is NodePath<t.TSUnionType>;
1066
+ isTSUnknownKeyword(opts?: object): this is NodePath<t.TSUnknownKeyword>;
1067
+ isTSVoidKeyword(opts?: object): this is NodePath<t.TSVoidKeyword>;
1068
+ isTaggedTemplateExpression(opts?: object): this is NodePath<t.TaggedTemplateExpression>;
1069
+ isTemplateElement(opts?: object): this is NodePath<t.TemplateElement>;
1070
+ isTemplateLiteral(opts?: object): this is NodePath<t.TemplateLiteral>;
1071
+ isTerminatorless(opts?: object): this is NodePath<t.Terminatorless>;
1072
+ isThisExpression(opts?: object): this is NodePath<t.ThisExpression>;
1073
+ isThisTypeAnnotation(opts?: object): this is NodePath<t.ThisTypeAnnotation>;
1074
+ isThrowStatement(opts?: object): this is NodePath<t.ThrowStatement>;
1075
+ isTopicReference(opts?: object): this is NodePath<t.TopicReference>;
1076
+ isTryStatement(opts?: object): this is NodePath<t.TryStatement>;
1077
+ isTupleExpression(opts?: object): this is NodePath<t.TupleExpression>;
1078
+ isTupleTypeAnnotation(opts?: object): this is NodePath<t.TupleTypeAnnotation>;
1079
+ isTypeAlias(opts?: object): this is NodePath<t.TypeAlias>;
1080
+ isTypeAnnotation(opts?: object): this is NodePath<t.TypeAnnotation>;
1081
+ isTypeCastExpression(opts?: object): this is NodePath<t.TypeCastExpression>;
1082
+ isTypeParameter(opts?: object): this is NodePath<t.TypeParameter>;
1083
+ isTypeParameterDeclaration(opts?: object): this is NodePath<t.TypeParameterDeclaration>;
1084
+ isTypeParameterInstantiation(opts?: object): this is NodePath<t.TypeParameterInstantiation>;
1085
+ isTypeScript(opts?: object): this is NodePath<t.TypeScript>;
1086
+ isTypeofTypeAnnotation(opts?: object): this is NodePath<t.TypeofTypeAnnotation>;
1087
+ isUnaryExpression(opts?: object): this is NodePath<t.UnaryExpression>;
1088
+ isUnaryLike(opts?: object): this is NodePath<t.UnaryLike>;
1089
+ isUnionTypeAnnotation(opts?: object): this is NodePath<t.UnionTypeAnnotation>;
1090
+ isUpdateExpression(opts?: object): this is NodePath<t.UpdateExpression>;
1091
+ isUserWhitespacable(opts?: object): this is NodePath<t.UserWhitespacable>;
1092
+ isV8IntrinsicIdentifier(opts?: object): this is NodePath<t.V8IntrinsicIdentifier>;
1093
+ isVariableDeclaration(opts?: object): this is NodePath<t.VariableDeclaration>;
1094
+ isVariableDeclarator(opts?: object): this is NodePath<t.VariableDeclarator>;
1095
+ isVariance(opts?: object): this is NodePath<t.Variance>;
1096
+ isVoidPattern(opts?: object): this is NodePath<t.VoidPattern>;
1097
+ isVoidTypeAnnotation(opts?: object): this is NodePath<t.VoidTypeAnnotation>;
1098
+ isWhile(opts?: object): this is NodePath<t.While>;
1099
+ isWhileStatement(opts?: object): this is NodePath<t.WhileStatement>;
1100
+ isWithStatement(opts?: object): this is NodePath<t.WithStatement>;
1101
+ isYieldExpression(opts?: object): this is NodePath<t.YieldExpression>;
1102
+
1103
+ isBindingIdentifier(opts?: object): this is NodePath<VirtualTypeAliases["BindingIdentifier"]>;
1104
+ isBlockScoped(opts?: object): this is NodePath<t.FunctionDeclaration | t.ClassDeclaration | t.VariableDeclaration>;
1105
+
1106
+ /** @deprecated */
1107
+ isExistentialTypeParam(opts?: object): this is NodePath<VirtualTypeAliases["ExistentialTypeParam"]>;
1108
+ isForAwaitStatement(opts?: object): this is NodePath<VirtualTypeAliases["ForAwaitStatement"]>;
1109
+ isGenerated(opts?: object): boolean;
1110
+
1111
+ /** @deprecated */
1112
+ isNumericLiteralTypeAnnotation(opts?: object): void;
1113
+ isPure(opts?: object): boolean;
1114
+ isReferenced(opts?: object): boolean;
1115
+ isReferencedIdentifier(opts?: object): this is NodePath<VirtualTypeAliases["ReferencedIdentifier"]>;
1116
+ isReferencedMemberExpression(opts?: object): this is NodePath<VirtualTypeAliases["ReferencedMemberExpression"]>;
1117
+ isScope(opts?: object): this is NodePath<VirtualTypeAliases["Scope"]>;
1118
+ isUser(opts?: object): boolean;
1119
+ isVar(opts?: object): this is NodePath<VirtualTypeAliases["Var"]>;
1120
+ // #endregion
1121
+
1122
+ // #region ------------------------- assertXXX -------------------------
1123
+ assertAccessor(opts?: object): asserts this is NodePath<t.Accessor>;
1124
+ assertAnyTypeAnnotation(opts?: object): asserts this is NodePath<t.AnyTypeAnnotation>;
1125
+ assertArgumentPlaceholder(opts?: object): asserts this is NodePath<t.ArgumentPlaceholder>;
1126
+ assertArrayExpression(opts?: object): asserts this is NodePath<t.ArrayExpression>;
1127
+ assertArrayPattern(opts?: object): asserts this is NodePath<t.ArrayPattern>;
1128
+ assertArrayTypeAnnotation(opts?: object): asserts this is NodePath<t.ArrayTypeAnnotation>;
1129
+ assertArrowFunctionExpression(opts?: object): asserts this is NodePath<t.ArrowFunctionExpression>;
1130
+ assertAssignmentExpression(opts?: object): asserts this is NodePath<t.AssignmentExpression>;
1131
+ assertAssignmentPattern(opts?: object): asserts this is NodePath<t.AssignmentPattern>;
1132
+ assertAwaitExpression(opts?: object): asserts this is NodePath<t.AwaitExpression>;
1133
+ assertBigIntLiteral(opts?: object): asserts this is NodePath<t.BigIntLiteral>;
1134
+ assertBinary(opts?: object): asserts this is NodePath<t.Binary>;
1135
+ assertBinaryExpression(opts?: object): asserts this is NodePath<t.BinaryExpression>;
1136
+ assertBindExpression(opts?: object): asserts this is NodePath<t.BindExpression>;
1137
+ assertBlock(opts?: object): asserts this is NodePath<t.Block>;
1138
+ assertBlockParent(opts?: object): asserts this is NodePath<t.BlockParent>;
1139
+ assertBlockStatement(opts?: object): asserts this is NodePath<t.BlockStatement>;
1140
+ assertBooleanLiteral(opts?: object): asserts this is NodePath<t.BooleanLiteral>;
1141
+ assertBooleanLiteralTypeAnnotation(opts?: object): asserts this is NodePath<t.BooleanLiteralTypeAnnotation>;
1142
+ assertBooleanTypeAnnotation(opts?: object): asserts this is NodePath<t.BooleanTypeAnnotation>;
1143
+ assertBreakStatement(opts?: object): asserts this is NodePath<t.BreakStatement>;
1144
+ assertCallExpression(opts?: object): asserts this is NodePath<t.CallExpression>;
1145
+ assertCatchClause(opts?: object): asserts this is NodePath<t.CatchClause>;
1146
+ assertClass(opts?: object): asserts this is NodePath<t.Class>;
1147
+ assertClassAccessorProperty(opts?: object): asserts this is NodePath<t.ClassAccessorProperty>;
1148
+ assertClassBody(opts?: object): asserts this is NodePath<t.ClassBody>;
1149
+ assertClassDeclaration(opts?: object): asserts this is NodePath<t.ClassDeclaration>;
1150
+ assertClassExpression(opts?: object): asserts this is NodePath<t.ClassExpression>;
1151
+ assertClassImplements(opts?: object): asserts this is NodePath<t.ClassImplements>;
1152
+ assertClassMethod(opts?: object): asserts this is NodePath<t.ClassMethod>;
1153
+ assertClassPrivateMethod(opts?: object): asserts this is NodePath<t.ClassPrivateMethod>;
1154
+ assertClassPrivateProperty(opts?: object): asserts this is NodePath<t.ClassPrivateProperty>;
1155
+ assertClassProperty(opts?: object): asserts this is NodePath<t.ClassProperty>;
1156
+ assertCompletionStatement(opts?: object): asserts this is NodePath<t.CompletionStatement>;
1157
+ assertConditional(opts?: object): asserts this is NodePath<t.Conditional>;
1158
+ assertConditionalExpression(opts?: object): asserts this is NodePath<t.ConditionalExpression>;
1159
+ assertContinueStatement(opts?: object): asserts this is NodePath<t.ContinueStatement>;
1160
+ assertDebuggerStatement(opts?: object): asserts this is NodePath<t.DebuggerStatement>;
1161
+ assertDecimalLiteral(opts?: object): asserts this is NodePath<t.DecimalLiteral>;
1162
+ assertDeclaration(opts?: object): asserts this is NodePath<t.Declaration>;
1163
+ assertDeclareClass(opts?: object): asserts this is NodePath<t.DeclareClass>;
1164
+ assertDeclareExportAllDeclaration(opts?: object): asserts this is NodePath<t.DeclareExportAllDeclaration>;
1165
+ assertDeclareExportDeclaration(opts?: object): asserts this is NodePath<t.DeclareExportDeclaration>;
1166
+ assertDeclareFunction(opts?: object): asserts this is NodePath<t.DeclareFunction>;
1167
+ assertDeclareInterface(opts?: object): asserts this is NodePath<t.DeclareInterface>;
1168
+ assertDeclareModule(opts?: object): asserts this is NodePath<t.DeclareModule>;
1169
+ assertDeclareModuleExports(opts?: object): asserts this is NodePath<t.DeclareModuleExports>;
1170
+ assertDeclareOpaqueType(opts?: object): asserts this is NodePath<t.DeclareOpaqueType>;
1171
+ assertDeclareTypeAlias(opts?: object): asserts this is NodePath<t.DeclareTypeAlias>;
1172
+ assertDeclareVariable(opts?: object): asserts this is NodePath<t.DeclareVariable>;
1173
+ assertDeclaredPredicate(opts?: object): asserts this is NodePath<t.DeclaredPredicate>;
1174
+ assertDecorator(opts?: object): asserts this is NodePath<t.Decorator>;
1175
+ assertDirective(opts?: object): asserts this is NodePath<t.Directive>;
1176
+ assertDirectiveLiteral(opts?: object): asserts this is NodePath<t.DirectiveLiteral>;
1177
+ assertDoExpression(opts?: object): asserts this is NodePath<t.DoExpression>;
1178
+ assertDoWhileStatement(opts?: object): asserts this is NodePath<t.DoWhileStatement>;
1179
+ assertEmptyStatement(opts?: object): asserts this is NodePath<t.EmptyStatement>;
1180
+ assertEmptyTypeAnnotation(opts?: object): asserts this is NodePath<t.EmptyTypeAnnotation>;
1181
+ assertEnumBody(opts?: object): asserts this is NodePath<t.EnumBody>;
1182
+ assertEnumBooleanBody(opts?: object): asserts this is NodePath<t.EnumBooleanBody>;
1183
+ assertEnumBooleanMember(opts?: object): asserts this is NodePath<t.EnumBooleanMember>;
1184
+ assertEnumDeclaration(opts?: object): asserts this is NodePath<t.EnumDeclaration>;
1185
+ assertEnumDefaultedMember(opts?: object): asserts this is NodePath<t.EnumDefaultedMember>;
1186
+ assertEnumMember(opts?: object): asserts this is NodePath<t.EnumMember>;
1187
+ assertEnumNumberBody(opts?: object): asserts this is NodePath<t.EnumNumberBody>;
1188
+ assertEnumNumberMember(opts?: object): asserts this is NodePath<t.EnumNumberMember>;
1189
+ assertEnumStringBody(opts?: object): asserts this is NodePath<t.EnumStringBody>;
1190
+ assertEnumStringMember(opts?: object): asserts this is NodePath<t.EnumStringMember>;
1191
+ assertEnumSymbolBody(opts?: object): asserts this is NodePath<t.EnumSymbolBody>;
1192
+ assertExistsTypeAnnotation(opts?: object): asserts this is NodePath<t.ExistsTypeAnnotation>;
1193
+ assertExportAllDeclaration(opts?: object): asserts this is NodePath<t.ExportAllDeclaration>;
1194
+ assertExportDeclaration(opts?: object): asserts this is NodePath<t.ExportDeclaration>;
1195
+ assertExportDefaultDeclaration(opts?: object): asserts this is NodePath<t.ExportDefaultDeclaration>;
1196
+ assertExportDefaultSpecifier(opts?: object): asserts this is NodePath<t.ExportDefaultSpecifier>;
1197
+ assertExportNamedDeclaration(opts?: object): asserts this is NodePath<t.ExportNamedDeclaration>;
1198
+ assertExportNamespaceSpecifier(opts?: object): asserts this is NodePath<t.ExportNamespaceSpecifier>;
1199
+ assertExportSpecifier(opts?: object): asserts this is NodePath<t.ExportSpecifier>;
1200
+ assertExpression(opts?: object): asserts this is NodePath<t.Expression>;
1201
+ assertExpressionStatement(opts?: object): asserts this is NodePath<t.ExpressionStatement>;
1202
+ assertExpressionWrapper(opts?: object): asserts this is NodePath<t.ExpressionWrapper>;
1203
+ assertFile(opts?: object): asserts this is NodePath<t.File>;
1204
+ assertFlow(opts?: object): asserts this is NodePath<t.Flow>;
1205
+ assertFlowBaseAnnotation(opts?: object): asserts this is NodePath<t.FlowBaseAnnotation>;
1206
+ assertFlowDeclaration(opts?: object): asserts this is NodePath<t.FlowDeclaration>;
1207
+ assertFlowPredicate(opts?: object): asserts this is NodePath<t.FlowPredicate>;
1208
+ assertFlowType(opts?: object): asserts this is NodePath<t.FlowType>;
1209
+ assertFor(opts?: object): asserts this is NodePath<t.For>;
1210
+ assertForInStatement(opts?: object): asserts this is NodePath<t.ForInStatement>;
1211
+ assertForOfStatement(opts?: object): asserts this is NodePath<t.ForOfStatement>;
1212
+ assertForStatement(opts?: object): asserts this is NodePath<t.ForStatement>;
1213
+ assertForXStatement(opts?: object): asserts this is NodePath<t.ForXStatement>;
1214
+ assertFunction(opts?: object): asserts this is NodePath<t.Function>;
1215
+ assertFunctionDeclaration(opts?: object): asserts this is NodePath<t.FunctionDeclaration>;
1216
+ assertFunctionExpression(opts?: object): asserts this is NodePath<t.FunctionExpression>;
1217
+ assertFunctionParameter(opts?: object): asserts this is NodePath<t.FunctionParameter>;
1218
+ assertFunctionParent(opts?: object): asserts this is NodePath<t.FunctionParent>;
1219
+ assertFunctionTypeAnnotation(opts?: object): asserts this is NodePath<t.FunctionTypeAnnotation>;
1220
+ assertFunctionTypeParam(opts?: object): asserts this is NodePath<t.FunctionTypeParam>;
1221
+ assertGenericTypeAnnotation(opts?: object): asserts this is NodePath<t.GenericTypeAnnotation>;
1222
+ assertIdentifier(opts?: object): asserts this is NodePath<t.Identifier>;
1223
+ assertIfStatement(opts?: object): asserts this is NodePath<t.IfStatement>;
1224
+ assertImmutable(opts?: object): asserts this is NodePath<t.Immutable>;
1225
+ assertImport(opts?: object): asserts this is NodePath<t.Import>;
1226
+ assertImportAttribute(opts?: object): asserts this is NodePath<t.ImportAttribute>;
1227
+ assertImportDeclaration(opts?: object): asserts this is NodePath<t.ImportDeclaration>;
1228
+ assertImportExpression(opts?: object): asserts this is NodePath<t.ImportExpression>;
1229
+ assertImportDefaultSpecifier(opts?: object): asserts this is NodePath<t.ImportDefaultSpecifier>;
1230
+ assertImportNamespaceSpecifier(opts?: object): asserts this is NodePath<t.ImportNamespaceSpecifier>;
1231
+ assertImportOrExportDeclaration(opts?: object): asserts this is NodePath<t.ImportOrExportDeclaration>;
1232
+ assertImportSpecifier(opts?: object): asserts this is NodePath<t.ImportSpecifier>;
1233
+ assertIndexedAccessType(opts?: object): asserts this is NodePath<t.IndexedAccessType>;
1234
+ assertInferredPredicate(opts?: object): asserts this is NodePath<t.InferredPredicate>;
1235
+ assertInterfaceDeclaration(opts?: object): asserts this is NodePath<t.InterfaceDeclaration>;
1236
+ assertInterfaceExtends(opts?: object): asserts this is NodePath<t.InterfaceExtends>;
1237
+ assertInterfaceTypeAnnotation(opts?: object): asserts this is NodePath<t.InterfaceTypeAnnotation>;
1238
+ assertInterpreterDirective(opts?: object): asserts this is NodePath<t.InterpreterDirective>;
1239
+ assertIntersectionTypeAnnotation(opts?: object): asserts this is NodePath<t.IntersectionTypeAnnotation>;
1240
+ assertJSX(opts?: object): asserts this is NodePath<t.JSX>;
1241
+ assertJSXAttribute(opts?: object): asserts this is NodePath<t.JSXAttribute>;
1242
+ assertJSXClosingElement(opts?: object): asserts this is NodePath<t.JSXClosingElement>;
1243
+ assertJSXClosingFragment(opts?: object): asserts this is NodePath<t.JSXClosingFragment>;
1244
+ assertJSXElement(opts?: object): asserts this is NodePath<t.JSXElement>;
1245
+ assertJSXEmptyExpression(opts?: object): asserts this is NodePath<t.JSXEmptyExpression>;
1246
+ assertJSXExpressionContainer(opts?: object): asserts this is NodePath<t.JSXExpressionContainer>;
1247
+ assertJSXFragment(opts?: object): asserts this is NodePath<t.JSXFragment>;
1248
+ assertJSXIdentifier(opts?: object): asserts this is NodePath<t.JSXIdentifier>;
1249
+ assertJSXMemberExpression(opts?: object): asserts this is NodePath<t.JSXMemberExpression>;
1250
+ assertJSXNamespacedName(opts?: object): asserts this is NodePath<t.JSXNamespacedName>;
1251
+ assertJSXOpeningElement(opts?: object): asserts this is NodePath<t.JSXOpeningElement>;
1252
+ assertJSXOpeningFragment(opts?: object): asserts this is NodePath<t.JSXOpeningFragment>;
1253
+ assertJSXSpreadAttribute(opts?: object): asserts this is NodePath<t.JSXSpreadAttribute>;
1254
+ assertJSXSpreadChild(opts?: object): asserts this is NodePath<t.JSXSpreadChild>;
1255
+ assertJSXText(opts?: object): asserts this is NodePath<t.JSXText>;
1256
+ assertLVal(opts?: object): asserts this is NodePath<t.LVal>;
1257
+ assertLabeledStatement(opts?: object): asserts this is NodePath<t.LabeledStatement>;
1258
+ assertLiteral(opts?: object): asserts this is NodePath<t.Literal>;
1259
+ assertLogicalExpression(opts?: object): asserts this is NodePath<t.LogicalExpression>;
1260
+ assertLoop(opts?: object): asserts this is NodePath<t.Loop>;
1261
+ assertMemberExpression(opts?: object): asserts this is NodePath<t.MemberExpression>;
1262
+ assertMetaProperty(opts?: object): asserts this is NodePath<t.MetaProperty>;
1263
+ assertMethod(opts?: object): asserts this is NodePath<t.Method>;
1264
+ assertMiscellaneous(opts?: object): asserts this is NodePath<t.Miscellaneous>;
1265
+ assertMixedTypeAnnotation(opts?: object): asserts this is NodePath<t.MixedTypeAnnotation>;
1266
+ assertModuleDeclaration(opts?: object): asserts this is NodePath<t.ModuleDeclaration>;
1267
+ assertModuleExpression(opts?: object): asserts this is NodePath<t.ModuleExpression>;
1268
+ assertModuleSpecifier(opts?: object): asserts this is NodePath<t.ModuleSpecifier>;
1269
+ assertNewExpression(opts?: object): asserts this is NodePath<t.NewExpression>;
1270
+ assertNoop(opts?: object): asserts this is NodePath<t.Noop>;
1271
+ assertNullLiteral(opts?: object): asserts this is NodePath<t.NullLiteral>;
1272
+ assertNullLiteralTypeAnnotation(opts?: object): asserts this is NodePath<t.NullLiteralTypeAnnotation>;
1273
+ assertNullableTypeAnnotation(opts?: object): asserts this is NodePath<t.NullableTypeAnnotation>;
1274
+
1275
+ /** @deprecated Use `assertNumericLiteral` */
1276
+ assertNumberLiteral(opts?: object): asserts this is NodePath<t.NumberLiteral>;
1277
+ assertNumberLiteralTypeAnnotation(opts?: object): asserts this is NodePath<t.NumberLiteralTypeAnnotation>;
1278
+ assertNumberTypeAnnotation(opts?: object): asserts this is NodePath<t.NumberTypeAnnotation>;
1279
+ assertNumericLiteral(opts?: object): asserts this is NodePath<t.NumericLiteral>;
1280
+ assertObjectExpression(opts?: object): asserts this is NodePath<t.ObjectExpression>;
1281
+ assertObjectMember(opts?: object): asserts this is NodePath<t.ObjectMember>;
1282
+ assertObjectMethod(opts?: object): asserts this is NodePath<t.ObjectMethod>;
1283
+ assertObjectPattern(opts?: object): asserts this is NodePath<t.ObjectPattern>;
1284
+ assertObjectProperty(opts?: object): asserts this is NodePath<t.ObjectProperty>;
1285
+ assertObjectTypeAnnotation(opts?: object): asserts this is NodePath<t.ObjectTypeAnnotation>;
1286
+ assertObjectTypeCallProperty(opts?: object): asserts this is NodePath<t.ObjectTypeCallProperty>;
1287
+ assertObjectTypeIndexer(opts?: object): asserts this is NodePath<t.ObjectTypeIndexer>;
1288
+ assertObjectTypeInternalSlot(opts?: object): asserts this is NodePath<t.ObjectTypeInternalSlot>;
1289
+ assertObjectTypeProperty(opts?: object): asserts this is NodePath<t.ObjectTypeProperty>;
1290
+ assertObjectTypeSpreadProperty(opts?: object): asserts this is NodePath<t.ObjectTypeSpreadProperty>;
1291
+ assertOpaqueType(opts?: object): asserts this is NodePath<t.OpaqueType>;
1292
+ assertOptionalCallExpression(opts?: object): asserts this is NodePath<t.OptionalCallExpression>;
1293
+ assertOptionalIndexedAccessType(opts?: object): asserts this is NodePath<t.OptionalIndexedAccessType>;
1294
+ assertOptionalMemberExpression(opts?: object): asserts this is NodePath<t.OptionalMemberExpression>;
1295
+ assertParenthesizedExpression(opts?: object): asserts this is NodePath<t.ParenthesizedExpression>;
1296
+ assertPattern(opts?: object): asserts this is NodePath<t.Pattern>;
1297
+ assertPatternLike(opts?: object): asserts this is NodePath<t.PatternLike>;
1298
+ assertPipelineBareFunction(opts?: object): asserts this is NodePath<t.PipelineBareFunction>;
1299
+ assertPipelinePrimaryTopicReference(opts?: object): asserts this is NodePath<t.PipelinePrimaryTopicReference>;
1300
+ assertPipelineTopicExpression(opts?: object): asserts this is NodePath<t.PipelineTopicExpression>;
1301
+ assertPlaceholder(opts?: object): asserts this is NodePath<t.Placeholder>;
1302
+ assertPrivate(opts?: object): asserts this is NodePath<t.Private>;
1303
+ assertPrivateName(opts?: object): asserts this is NodePath<t.PrivateName>;
1304
+ assertProgram(opts?: object): asserts this is NodePath<t.Program>;
1305
+ assertProperty(opts?: object): asserts this is NodePath<t.Property>;
1306
+ assertPureish(opts?: object): asserts this is NodePath<t.Pureish>;
1307
+ assertQualifiedTypeIdentifier(opts?: object): asserts this is NodePath<t.QualifiedTypeIdentifier>;
1308
+ assertRecordExpression(opts?: object): asserts this is NodePath<t.RecordExpression>;
1309
+ assertRegExpLiteral(opts?: object): asserts this is NodePath<t.RegExpLiteral>;
1310
+
1311
+ /** @deprecated Use `assertRegExpLiteral` */
1312
+ assertRegexLiteral(opts?: object): asserts this is NodePath<t.RegexLiteral>;
1313
+ assertRestElement(opts?: object): asserts this is NodePath<t.RestElement>;
1314
+
1315
+ /** @deprecated Use `assertRestElement` */
1316
+ assertRestProperty(opts?: object): asserts this is NodePath<t.RestProperty>;
1317
+ assertReturnStatement(opts?: object): asserts this is NodePath<t.ReturnStatement>;
1318
+ assertScopable(opts?: object): asserts this is NodePath<t.Scopable>;
1319
+ assertSequenceExpression(opts?: object): asserts this is NodePath<t.SequenceExpression>;
1320
+ assertSpreadElement(opts?: object): asserts this is NodePath<t.SpreadElement>;
1321
+
1322
+ /** @deprecated Use `assertSpreadElement` */
1323
+ assertSpreadProperty(opts?: object): asserts this is NodePath<t.SpreadProperty>;
1324
+ assertStandardized(opts?: object): asserts this is NodePath<t.Standardized>;
1325
+ assertStatement(opts?: object): asserts this is NodePath<t.Statement>;
1326
+ assertStaticBlock(opts?: object): asserts this is NodePath<t.StaticBlock>;
1327
+ assertStringLiteral(opts?: object): asserts this is NodePath<t.StringLiteral>;
1328
+ assertStringLiteralTypeAnnotation(opts?: object): asserts this is NodePath<t.StringLiteralTypeAnnotation>;
1329
+ assertStringTypeAnnotation(opts?: object): asserts this is NodePath<t.StringTypeAnnotation>;
1330
+ assertSuper(opts?: object): asserts this is NodePath<t.Super>;
1331
+ assertSwitchCase(opts?: object): asserts this is NodePath<t.SwitchCase>;
1332
+ assertSwitchStatement(opts?: object): asserts this is NodePath<t.SwitchStatement>;
1333
+ assertSymbolTypeAnnotation(opts?: object): asserts this is NodePath<t.SymbolTypeAnnotation>;
1334
+ assertTSAnyKeyword(opts?: object): asserts this is NodePath<t.TSAnyKeyword>;
1335
+ assertTSArrayType(opts?: object): asserts this is NodePath<t.TSArrayType>;
1336
+ assertTSAsExpression(opts?: object): asserts this is NodePath<t.TSAsExpression>;
1337
+ assertTSBaseType(opts?: object): asserts this is NodePath<t.TSBaseType>;
1338
+ assertTSBigIntKeyword(opts?: object): asserts this is NodePath<t.TSBigIntKeyword>;
1339
+ assertTSBooleanKeyword(opts?: object): asserts this is NodePath<t.TSBooleanKeyword>;
1340
+ assertTSCallSignatureDeclaration(opts?: object): asserts this is NodePath<t.TSCallSignatureDeclaration>;
1341
+ assertTSConditionalType(opts?: object): asserts this is NodePath<t.TSConditionalType>;
1342
+ assertTSConstructSignatureDeclaration(opts?: object): asserts this is NodePath<t.TSConstructSignatureDeclaration>;
1343
+ assertTSConstructorType(opts?: object): asserts this is NodePath<t.TSConstructorType>;
1344
+ assertTSDeclareFunction(opts?: object): asserts this is NodePath<t.TSDeclareFunction>;
1345
+ assertTSDeclareMethod(opts?: object): asserts this is NodePath<t.TSDeclareMethod>;
1346
+ assertTSEntityName(opts?: object): asserts this is NodePath<t.TSEntityName>;
1347
+ assertTSEnumBody(opts?: object): asserts this is NodePath<t.TSEnumBody>;
1348
+ assertTSEnumDeclaration(opts?: object): asserts this is NodePath<t.TSEnumDeclaration>;
1349
+ assertTSEnumMember(opts?: object): asserts this is NodePath<t.TSEnumMember>;
1350
+ assertTSExportAssignment(opts?: object): asserts this is NodePath<t.TSExportAssignment>;
1351
+ assertTSExpressionWithTypeArguments(opts?: object): asserts this is NodePath<t.TSExpressionWithTypeArguments>;
1352
+ assertTSExternalModuleReference(opts?: object): asserts this is NodePath<t.TSExternalModuleReference>;
1353
+ assertTSFunctionType(opts?: object): asserts this is NodePath<t.TSFunctionType>;
1354
+ assertTSImportEqualsDeclaration(opts?: object): asserts this is NodePath<t.TSImportEqualsDeclaration>;
1355
+ assertTSImportType(opts?: object): asserts this is NodePath<t.TSImportType>;
1356
+ assertTSIndexSignature(opts?: object): asserts this is NodePath<t.TSIndexSignature>;
1357
+ assertTSIndexedAccessType(opts?: object): asserts this is NodePath<t.TSIndexedAccessType>;
1358
+ assertTSInferType(opts?: object): asserts this is NodePath<t.TSInferType>;
1359
+ assertTSInstantiationExpression(opts?: object): asserts this is NodePath<t.TSInstantiationExpression>;
1360
+ assertTSInterfaceBody(opts?: object): asserts this is NodePath<t.TSInterfaceBody>;
1361
+ assertTSInterfaceDeclaration(opts?: object): asserts this is NodePath<t.TSInterfaceDeclaration>;
1362
+ assertTSIntersectionType(opts?: object): asserts this is NodePath<t.TSIntersectionType>;
1363
+ assertTSIntrinsicKeyword(opts?: object): asserts this is NodePath<t.TSIntrinsicKeyword>;
1364
+ assertTSLiteralType(opts?: object): asserts this is NodePath<t.TSLiteralType>;
1365
+ assertTSMappedType(opts?: object): asserts this is NodePath<t.TSMappedType>;
1366
+ assertTSMethodSignature(opts?: object): asserts this is NodePath<t.TSMethodSignature>;
1367
+ assertTSModuleBlock(opts?: object): asserts this is NodePath<t.TSModuleBlock>;
1368
+ assertTSModuleDeclaration(opts?: object): asserts this is NodePath<t.TSModuleDeclaration>;
1369
+ assertTSNamedTupleMember(opts?: object): asserts this is NodePath<t.TSNamedTupleMember>;
1370
+ assertTSNamespaceExportDeclaration(opts?: object): asserts this is NodePath<t.TSNamespaceExportDeclaration>;
1371
+ assertTSNeverKeyword(opts?: object): asserts this is NodePath<t.TSNeverKeyword>;
1372
+ assertTSNonNullExpression(opts?: object): asserts this is NodePath<t.TSNonNullExpression>;
1373
+ assertTSNullKeyword(opts?: object): asserts this is NodePath<t.TSNullKeyword>;
1374
+ assertTSNumberKeyword(opts?: object): asserts this is NodePath<t.TSNumberKeyword>;
1375
+ assertTSObjectKeyword(opts?: object): asserts this is NodePath<t.TSObjectKeyword>;
1376
+ assertTSOptionalType(opts?: object): asserts this is NodePath<t.TSOptionalType>;
1377
+ assertTSParameterProperty(opts?: object): asserts this is NodePath<t.TSParameterProperty>;
1378
+ assertTSParenthesizedType(opts?: object): asserts this is NodePath<t.TSParenthesizedType>;
1379
+ assertTSPropertySignature(opts?: object): asserts this is NodePath<t.TSPropertySignature>;
1380
+ assertTSQualifiedName(opts?: object): asserts this is NodePath<t.TSQualifiedName>;
1381
+ assertTSRestType(opts?: object): asserts this is NodePath<t.TSRestType>;
1382
+ assertTSSatisfiesExpression(opts?: object): asserts this is NodePath<t.TSSatisfiesExpression>;
1383
+ assertTSStringKeyword(opts?: object): asserts this is NodePath<t.TSStringKeyword>;
1384
+ assertTSSymbolKeyword(opts?: object): asserts this is NodePath<t.TSSymbolKeyword>;
1385
+ assertTSTemplateLiteralType(opts?: object): asserts this is NodePath<t.TSTemplateLiteralType>;
1386
+ assertTSThisType(opts?: object): asserts this is NodePath<t.TSThisType>;
1387
+ assertTSTupleType(opts?: object): asserts this is NodePath<t.TSTupleType>;
1388
+ assertTSType(opts?: object): asserts this is NodePath<t.TSType>;
1389
+ assertTSTypeAliasDeclaration(opts?: object): asserts this is NodePath<t.TSTypeAliasDeclaration>;
1390
+ assertTSTypeAnnotation(opts?: object): asserts this is NodePath<t.TSTypeAnnotation>;
1391
+ assertTSTypeAssertion(opts?: object): asserts this is NodePath<t.TSTypeAssertion>;
1392
+ assertTSTypeElement(opts?: object): asserts this is NodePath<t.TSTypeElement>;
1393
+ assertTSTypeLiteral(opts?: object): asserts this is NodePath<t.TSTypeLiteral>;
1394
+ assertTSTypeOperator(opts?: object): asserts this is NodePath<t.TSTypeOperator>;
1395
+ assertTSTypeParameter(opts?: object): asserts this is NodePath<t.TSTypeParameter>;
1396
+ assertTSTypeParameterDeclaration(opts?: object): asserts this is NodePath<t.TSTypeParameterDeclaration>;
1397
+ assertTSTypeParameterInstantiation(opts?: object): asserts this is NodePath<t.TSTypeParameterInstantiation>;
1398
+ assertTSTypePredicate(opts?: object): asserts this is NodePath<t.TSTypePredicate>;
1399
+ assertTSTypeQuery(opts?: object): asserts this is NodePath<t.TSTypeQuery>;
1400
+ assertTSTypeReference(opts?: object): asserts this is NodePath<t.TSTypeReference>;
1401
+ assertTSUndefinedKeyword(opts?: object): asserts this is NodePath<t.TSUndefinedKeyword>;
1402
+ assertTSUnionType(opts?: object): asserts this is NodePath<t.TSUnionType>;
1403
+ assertTSUnknownKeyword(opts?: object): asserts this is NodePath<t.TSUnknownKeyword>;
1404
+ assertTSVoidKeyword(opts?: object): asserts this is NodePath<t.TSVoidKeyword>;
1405
+ assertTaggedTemplateExpression(opts?: object): asserts this is NodePath<t.TaggedTemplateExpression>;
1406
+ assertTemplateElement(opts?: object): asserts this is NodePath<t.TemplateElement>;
1407
+ assertTemplateLiteral(opts?: object): asserts this is NodePath<t.TemplateLiteral>;
1408
+ assertTerminatorless(opts?: object): asserts this is NodePath<t.Terminatorless>;
1409
+ assertThisExpression(opts?: object): asserts this is NodePath<t.ThisExpression>;
1410
+ assertThisTypeAnnotation(opts?: object): asserts this is NodePath<t.ThisTypeAnnotation>;
1411
+ assertThrowStatement(opts?: object): asserts this is NodePath<t.ThrowStatement>;
1412
+ assertTopicReference(opts?: object): asserts this is NodePath<t.TopicReference>;
1413
+ assertTryStatement(opts?: object): asserts this is NodePath<t.TryStatement>;
1414
+ assertTupleExpression(opts?: object): asserts this is NodePath<t.TupleExpression>;
1415
+ assertTupleTypeAnnotation(opts?: object): asserts this is NodePath<t.TupleTypeAnnotation>;
1416
+ assertTypeAlias(opts?: object): asserts this is NodePath<t.TypeAlias>;
1417
+ assertTypeAnnotation(opts?: object): asserts this is NodePath<t.TypeAnnotation>;
1418
+ assertTypeCastExpression(opts?: object): asserts this is NodePath<t.TypeCastExpression>;
1419
+ assertTypeParameter(opts?: object): asserts this is NodePath<t.TypeParameter>;
1420
+ assertTypeParameterDeclaration(opts?: object): asserts this is NodePath<t.TypeParameterDeclaration>;
1421
+ assertTypeParameterInstantiation(opts?: object): asserts this is NodePath<t.TypeParameterInstantiation>;
1422
+ assertTypeScript(opts?: object): asserts this is NodePath<t.TypeScript>;
1423
+ assertTypeofTypeAnnotation(opts?: object): asserts this is NodePath<t.TypeofTypeAnnotation>;
1424
+ assertUnaryExpression(opts?: object): asserts this is NodePath<t.UnaryExpression>;
1425
+ assertUnaryLike(opts?: object): asserts this is NodePath<t.UnaryLike>;
1426
+ assertUnionTypeAnnotation(opts?: object): asserts this is NodePath<t.UnionTypeAnnotation>;
1427
+ assertUpdateExpression(opts?: object): asserts this is NodePath<t.UpdateExpression>;
1428
+ assertUserWhitespacable(opts?: object): asserts this is NodePath<t.UserWhitespacable>;
1429
+ assertV8IntrinsicIdentifier(opts?: object): asserts this is NodePath<t.V8IntrinsicIdentifier>;
1430
+ assertVariableDeclaration(opts?: object): asserts this is NodePath<t.VariableDeclaration>;
1431
+ assertVariableDeclarator(opts?: object): asserts this is NodePath<t.VariableDeclarator>;
1432
+ assertVariance(opts?: object): asserts this is NodePath<t.Variance>;
1433
+ assertVoidPattern(opts?: object): asserts this is NodePath<t.VoidPattern>;
1434
+ assertVoidTypeAnnotation(opts?: object): asserts this is NodePath<t.VoidTypeAnnotation>;
1435
+ assertWhile(opts?: object): asserts this is NodePath<t.While>;
1436
+ assertWhileStatement(opts?: object): asserts this is NodePath<t.WhileStatement>;
1437
+ assertWithStatement(opts?: object): asserts this is NodePath<t.WithStatement>;
1438
+ assertYieldExpression(opts?: object): asserts this is NodePath<t.YieldExpression>;
1439
+ // #endregion
1440
+ }
1441
+
1442
+ export interface HubInterface {
1443
+ getCode(): string | undefined;
1444
+ getScope(): Scope | undefined;
1445
+ addHelper(name: string): any;
1446
+ buildError(node: Node, msg: string, Error: ErrorConstructor): Error;
1447
+ }
1448
+
1449
+ export class Hub implements HubInterface {
1450
+ constructor();
1451
+ getCode(): string | undefined;
1452
+ getScope(): Scope | undefined;
1453
+ addHelper(name: string): any;
1454
+ buildError(node: Node, msg: string, Error?: ErrorConstructor): Error;
1455
+ }
1456
+
1457
+ export interface TraversalContext<S = unknown> {
1458
+ parentPath: NodePath;
1459
+ scope: Scope;
1460
+ state: S;
1461
+ opts: TraverseOptions;
1462
+ }
1463
+
1464
+ // Based on `GetFieldType`s from `@types/lodash/common/object.d.ts`:
1465
+ // dprint-ignore
1466
+ type ImplGetOfArray<T extends readonly unknown[], K extends string> =
1467
+ K extends `${infer N extends number}` ? T[N]
1468
+ : K extends keyof T ? T[K]
1469
+ : never;
1470
+
1471
+ // dprint-ignore
1472
+ type ImplGetByKey<T, K extends string>
1473
+ = T extends readonly unknown[] ? ImplGetOfArray<T, K>
1474
+ : K extends keyof T ? T[K]
1475
+ : K extends `${infer N extends number}`
1476
+ ? N extends keyof T ? T[N] : never
1477
+ : never;
1478
+
1479
+ // dprint-ignore
1480
+ type ImplGetRecursive<T, K extends string>
1481
+ = K extends `${infer L}.${infer R}`
1482
+ ? ImplGetRecursive<ImplGetByKey<T, L>, R>
1483
+ : ImplGetByKey<T, K>;
1484
+
1485
+ export type NodePathResult<T> =
1486
+ | (Extract<T, Node | null | undefined> extends never ? never : NodePath<Extract<T, Node | null | undefined>>)
1487
+ | (T extends Array<Node | null | undefined> ? Array<NodePath<T[number]>> : never);
1488
+
1489
+ export interface VirtualTypeAliases {
1490
+ BindingIdentifier: t.Identifier;
1491
+ BlockScoped: Node;
1492
+ ExistentialTypeParam: t.ExistsTypeAnnotation;
1493
+ Flow: t.Flow | t.ImportDeclaration | t.ExportDeclaration | t.ImportSpecifier;
1494
+ ForAwaitStatement: t.ForOfStatement;
1495
+ Generated: Node;
1496
+ NumericLiteralTypeAnnotation: t.NumberLiteralTypeAnnotation;
1497
+ Pure: Node;
1498
+ Referenced: Node;
1499
+ ReferencedIdentifier: t.Identifier | t.JSXIdentifier;
1500
+ ReferencedMemberExpression: t.MemberExpression;
1501
+ RestProperty: t.RestElement;
1502
+ Scope: t.Scopable | t.Pattern;
1503
+ SpreadProperty: t.RestElement;
1504
+ User: Node;
1505
+ Var: t.VariableDeclaration;
1506
+ }
node_modules/@types/babel__traverse/package.json ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "@types/babel__traverse",
3
+ "version": "7.28.0",
4
+ "description": "TypeScript definitions for @babel/traverse",
5
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__traverse",
6
+ "license": "MIT",
7
+ "contributors": [
8
+ {
9
+ "name": "Troy Gerwien",
10
+ "githubUsername": "yortus",
11
+ "url": "https://github.com/yortus"
12
+ },
13
+ {
14
+ "name": "Marvin Hagemeister",
15
+ "githubUsername": "marvinhagemeister",
16
+ "url": "https://github.com/marvinhagemeister"
17
+ },
18
+ {
19
+ "name": "Ryan Petrich",
20
+ "githubUsername": "rpetrich",
21
+ "url": "https://github.com/rpetrich"
22
+ },
23
+ {
24
+ "name": "Melvin Groenhoff",
25
+ "githubUsername": "mgroenhoff",
26
+ "url": "https://github.com/mgroenhoff"
27
+ },
28
+ {
29
+ "name": "Dean L.",
30
+ "githubUsername": "dlgrit",
31
+ "url": "https://github.com/dlgrit"
32
+ },
33
+ {
34
+ "name": "Ifiok Jr.",
35
+ "githubUsername": "ifiokjr",
36
+ "url": "https://github.com/ifiokjr"
37
+ },
38
+ {
39
+ "name": "ExE Boss",
40
+ "githubUsername": "ExE-Boss",
41
+ "url": "https://github.com/ExE-Boss"
42
+ },
43
+ {
44
+ "name": "Daniel Tschinder",
45
+ "githubUsername": "danez",
46
+ "url": "https://github.com/danez"
47
+ }
48
+ ],
49
+ "main": "",
50
+ "types": "index.d.ts",
51
+ "repository": {
52
+ "type": "git",
53
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
54
+ "directory": "types/babel__traverse"
55
+ },
56
+ "scripts": {},
57
+ "dependencies": {
58
+ "@babel/types": "^7.28.2"
59
+ },
60
+ "peerDependencies": {},
61
+ "typesPublisherContentHash": "f8bf439253873b2b30a22c425df086f130320cf70d832d84412e82a51e410680",
62
+ "typeScriptVersion": "5.1"
63
+ }
node_modules/@types/d3-array/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
node_modules/@types/d3-array/README.md ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Installation
2
+ > `npm install --save @types/d3-array`
3
+
4
+ # Summary
5
+ This package contains type definitions for d3-array (https://github.com/d3/d3-array).
6
+
7
+ # Details
8
+ Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-array.
9
+
10
+ ### Additional Details
11
+ * Last updated: Fri, 12 Sep 2025 20:02:35 GMT
12
+ * Dependencies: none
13
+
14
+ # Credits
15
+ These definitions were written by [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [Tom Wanzek](https://github.com/tomwanzek), [denisname](https://github.com/denisname), [Hugues Stefanski](https://github.com/ledragon), [Nathan Bierema](https://github.com/Methuselah96), and [Fil](https://github.com/Fil).
node_modules/@types/d3-array/index.d.ts ADDED
@@ -0,0 +1,1118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Last module patch version validated against: 3.2.4
2
+
3
+ // --------------------------------------------------------------------------
4
+ // Shared Types and Interfaces
5
+ // --------------------------------------------------------------------------
6
+
7
+ /**
8
+ * Administrivia: JavaScript primitive types and Date
9
+ */
10
+ export type Primitive = number | string | boolean | Date;
11
+
12
+ /**
13
+ * Administrivia: anything with a valueOf(): number method is comparable, so we allow it in numeric operations
14
+ */
15
+ export interface Numeric {
16
+ valueOf(): number;
17
+ }
18
+
19
+ /**
20
+ * Administrivia: a matrix of numeric values.
21
+ * If height is not specified, it is inferred from the given width and data.length.
22
+ */
23
+ export interface Matrix {
24
+ data: ArrayLike<number>;
25
+ width: number;
26
+ height?: number;
27
+ }
28
+
29
+ /**
30
+ * Represents a nested/recursive InternMap type
31
+ *
32
+ * The first generic "TObject" refers to the type of the data object that is available in the accessor functions.
33
+ * The second generic "TReduce" refers to the type of the data available at the deepest level (the result data).
34
+ * The third generic "TKeys" refers to the type of the keys at each level of the nestes InternMap.
35
+ */
36
+ export type NestedInternMap<TObject, TReduce, TKeys extends unknown[]> = TKeys extends [infer TFirst, ...infer TRest]
37
+ ? InternMap<TFirst, NestedInternMap<TObject, TReduce, TRest>>
38
+ : TReduce;
39
+
40
+ /**
41
+ * Represents a nested/recursive Array type
42
+ *
43
+ * The first generic "TObject" refers to the type of the data object that is available in the accessor functions.
44
+ * The second generic "TReduce" refers to the type of the data available at the deepest level (the result data).
45
+ * The third generic "TKeys" refers to the type of the keys at each level of the nestes Array.
46
+ */
47
+ export type NestedArray<TObject, TReduce, TKeys extends unknown[]> = TKeys extends [infer TFirst, ...infer TRest]
48
+ ? Array<[TFirst, NestedArray<TObject, TReduce, TRest>]>
49
+ : TReduce;
50
+
51
+ // --------------------------------------------------------------------------------------
52
+ // Statistics
53
+ // --------------------------------------------------------------------------------------
54
+
55
+ /**
56
+ * Return the minimum value in the array using natural order.
57
+ */
58
+ export function min(iterable: Iterable<string>): string | undefined;
59
+
60
+ /**
61
+ * Return the minimum value in the array using natural order.
62
+ */
63
+ export function min<T extends Numeric>(iterable: Iterable<T>): T | undefined;
64
+ /**
65
+ * Return the minimum value in the array using natural order.
66
+ */
67
+ export function min<T>(
68
+ iterable: Iterable<T>,
69
+ accessor: (datum: T, index: number, array: Iterable<T>) => string | undefined | null,
70
+ ): string | undefined;
71
+ /**
72
+ * Return the minimum value in the array using natural order.
73
+ */
74
+ export function min<T, U extends Numeric>(
75
+ iterable: Iterable<T>,
76
+ accessor: (datum: T, index: number, array: Iterable<T>) => U | undefined | null,
77
+ ): U | undefined;
78
+
79
+ /**
80
+ * Return the index of the minimum value in the array using natural order.
81
+ */
82
+ export function minIndex(iterable: Iterable<unknown>): number;
83
+ /**
84
+ * Return the index of the minimum value in the array using natural order and a projection function to map values.
85
+ */
86
+ export function minIndex<TDatum>(
87
+ iterable: Iterable<TDatum>,
88
+ accessor: (datum: TDatum, index: number, array: Iterable<TDatum>) => unknown,
89
+ ): number;
90
+ /**
91
+ * Return the index of the minimum value in the array using natural order.
92
+ */
93
+ export function minIndex(iterable: Iterable<unknown>): number;
94
+
95
+ /**
96
+ * Return the maximum value in the array of strings using natural order.
97
+ */
98
+ export function max(iterable: Iterable<string>): string | undefined;
99
+ /**
100
+ * Return the maximum value in the array of numbers using natural order.
101
+ */
102
+ export function max<T extends Numeric>(iterable: Iterable<T>): T | undefined;
103
+ /**
104
+ * Return the maximum value in the array using natural order and a projection function to map values to strings.
105
+ */
106
+ export function max<T>(
107
+ iterable: Iterable<T>,
108
+ accessor: (datum: T, index: number, array: Iterable<T>) => string | undefined | null,
109
+ ): string | undefined;
110
+ /**
111
+ * Return the maximum value in the array using natural order and a projection function to map values to easily-sorted values.
112
+ */
113
+ export function max<T, U extends Numeric>(
114
+ iterable: Iterable<T>,
115
+ accessor: (datum: T, index: number, array: Iterable<T>) => U | undefined | null,
116
+ ): U | undefined;
117
+
118
+ /**
119
+ * Return the index of the maximum value in the array using natural order.
120
+ */
121
+ export function maxIndex(iterable: Iterable<unknown>): number;
122
+ /**
123
+ * Return the index of the maximum value in the array using natural order and a projection function to map values.
124
+ */
125
+ export function maxIndex<TDatum>(
126
+ iterable: Iterable<TDatum>,
127
+ accessor: (datum: TDatum, index: number, array: Iterable<TDatum>) => unknown,
128
+ ): number;
129
+
130
+ /**
131
+ * Return the min and max simultaneously.
132
+ */
133
+ export function extent(iterable: Iterable<string>): [string, string] | [undefined, undefined];
134
+ /**
135
+ * Return the min and max simultaneously.
136
+ */
137
+ export function extent<T extends Numeric>(iterable: Iterable<T>): [T, T] | [undefined, undefined];
138
+ /**
139
+ * Return the min and max simultaneously.
140
+ */
141
+ export function extent<T>(
142
+ iterable: Iterable<T>,
143
+ accessor: (datum: T, index: number, array: Iterable<T>) => string | undefined | null,
144
+ ): [string, string] | [undefined, undefined];
145
+ /**
146
+ * Return the min and max simultaneously.
147
+ */
148
+ export function extent<T, U extends Numeric>(
149
+ iterable: Iterable<T>,
150
+ accessor: (datum: T, index: number, array: Iterable<T>) => U | undefined | null,
151
+ ): [U, U] | [undefined, undefined];
152
+
153
+ /**
154
+ * Returns the mode of the given iterable, i.e. the value which appears the most often.
155
+ * In case of equality, returns the first of the relevant values.
156
+ * If the iterable contains no comparable values, returns undefined.
157
+ * An optional accessor function may be specified, which is equivalent to calling Array.from before computing the mode.
158
+ * This method ignores undefined, null and NaN values; this is useful for ignoring missing data.
159
+ */
160
+ export function mode(iterable: Iterable<Numeric | undefined | null>): number;
161
+ /**
162
+ * Returns the mode of the given iterable, i.e. the value which appears the most often.
163
+ * In case of equality, returns the first of the relevant values.
164
+ * If the iterable contains no comparable values, returns undefined.
165
+ * An optional accessor function may be specified, which is equivalent to calling Array.from before computing the mode.
166
+ * This method ignores undefined, null and NaN values; this is useful for ignoring missing data.
167
+ */
168
+ export function mode<T>(
169
+ iterable: Iterable<T>,
170
+ accessor: (datum: T, index: number, array: Iterable<T>) => number | undefined | null,
171
+ ): number;
172
+
173
+ /**
174
+ * Compute the sum of an array of numbers.
175
+ */
176
+ export function sum(iterable: Iterable<Numeric | undefined | null>): number;
177
+ /**
178
+ * Compute the sum of an array, using the given accessor to convert values to numbers.
179
+ */
180
+ export function sum<T>(
181
+ iterable: Iterable<T>,
182
+ accessor: (datum: T, index: number, array: Iterable<T>) => number | undefined | null,
183
+ ): number;
184
+
185
+ /**
186
+ * Return the mean of an array of numbers
187
+ */
188
+ export function mean(iterable: Iterable<Numeric | undefined | null>): number | undefined;
189
+ /**
190
+ * Return the mean of an array of numbers
191
+ */
192
+ export function mean<T>(
193
+ iterable: Iterable<T>,
194
+ accessor: (datum: T, index: number, array: Iterable<T>) => number | undefined | null,
195
+ ): number | undefined;
196
+
197
+ /**
198
+ * Return the median of an array of numbers
199
+ */
200
+ export function median(iterable: Iterable<Numeric | undefined | null>): number | undefined;
201
+ /**
202
+ * Return the median of an array of numbers
203
+ */
204
+ export function median<T>(
205
+ iterable: Iterable<T>,
206
+ accessor: (element: T, i: number, array: Iterable<T>) => number | undefined | null,
207
+ ): number | undefined;
208
+
209
+ /**
210
+ * Like median, but returns the index of the element to the left of the median.
211
+ */
212
+ export function medianIndex(iterable: Iterable<Numeric | undefined | null>): number;
213
+ /**
214
+ * Like median, but returns the index of the element to the left of the median.
215
+ */
216
+ export function medianIndex<T>(
217
+ iterable: Iterable<T>,
218
+ accessor: (element: T, i: number, array: Iterable<T>) => number | undefined | null,
219
+ ): number;
220
+
221
+ /**
222
+ * Returns the cumulative sum of the given iterable of numbers, as a Float64Array of the same length.
223
+ * If the iterable contains no numbers, returns zeros.
224
+ * An optional accessor function may be specified, which is equivalent to calling Array.from before computing the cumulative sum.
225
+ * This method ignores undefined and NaN values; this is useful for ignoring missing data.
226
+ */
227
+ export function cumsum(iterable: Iterable<Numeric | undefined | null>): Float64Array;
228
+ /**
229
+ * Returns the cumulative sum of the given iterable of numbers, as a Float64Array of the same length.
230
+ * If the iterable contains no numbers, returns zeros.
231
+ * An optional accessor function may be specified, which is equivalent to calling Array.from before computing the cumulative sum.
232
+ * This method ignores undefined and NaN values; this is useful for ignoring missing data.
233
+ */
234
+ export function cumsum<T>(
235
+ iterable: Iterable<T>,
236
+ accessor: (element: T, i: number, array: Iterable<T>) => number | undefined | null,
237
+ ): Float64Array;
238
+
239
+ /**
240
+ * Returns the p-quantile of the given iterable of numbers, where p is a number in the range [0, 1].
241
+ *
242
+ * An optional accessor function may be specified, which is equivalent to calling array.map(accessor) before computing the quantile.
243
+ */
244
+ export function quantile(iterable: Iterable<Numeric | undefined | null>, p: number): number | undefined;
245
+ /**
246
+ * Returns the p-quantile of the given iterable of numbers, where p is a number in the range [0, 1].
247
+ *
248
+ * An optional accessor function may be specified, which is equivalent to calling array.map(accessor) before computing the quantile.
249
+ */
250
+ export function quantile<T>(
251
+ iterable: Iterable<T>,
252
+ p: number,
253
+ accessor: (element: T, i: number, array: Iterable<T>) => number | undefined | null,
254
+ ): number | undefined;
255
+
256
+ /**
257
+ * Similar to quantile, but returns the index to the left of p.
258
+ */
259
+ export function quantileIndex(iterable: Iterable<Numeric | undefined | null>, p: number): number;
260
+ /**
261
+ * Similar to quantile, but returns the index to the left of p.
262
+ */
263
+ export function quantileIndex<T>(
264
+ iterable: Iterable<T>,
265
+ p: number,
266
+ accessor: (element: T, i: number, array: Iterable<T>) => number | undefined | null,
267
+ ): number;
268
+
269
+ /**
270
+ * Similar to quantile, but expects the input to be a sorted array of values.
271
+ * In contrast with quantile, the accessor is only called on the elements needed to compute the quantile.
272
+ */
273
+ export function quantileSorted(
274
+ array: Array<Numeric | undefined | null>,
275
+ p: number,
276
+ ): number | undefined;
277
+ /**
278
+ * Similar to quantile, but expects the input to be a sorted array of values.
279
+ * In contrast with quantile, the accessor is only called on the elements needed to compute the quantile.
280
+ */
281
+ export function quantileSorted<T>(
282
+ array: T[],
283
+ p: number,
284
+ accessor: (element: T, i: number, array: T[]) => number | undefined | null,
285
+ ): number | undefined;
286
+
287
+ /**
288
+ * Returns an array with the rank of each value in the iterable, i.e. the zero-based index of the value when the iterable is sorted.
289
+ * Nullish values are sorted to the end and ranked NaN.
290
+ * An optional comparator or accessor function may be specified; the latter is equivalent to calling array.map(accessor) before computing the ranks.
291
+ * If comparator is not specified, it defaults to ascending.
292
+ * Ties (equivalent values) all get the same rank, defined as the first time the value is found.
293
+ */
294
+ export function rank(iterable: Iterable<Numeric | undefined | null>): Float64Array;
295
+ /**
296
+ * Returns an array with the rank of each value in the iterable, i.e. the zero-based index of the value when the iterable is sorted.
297
+ * Nullish values are sorted to the end and ranked NaN.
298
+ * An optional comparator or accessor function may be specified; the latter is equivalent to calling array.map(accessor) before computing the ranks.
299
+ * If comparator is not specified, it defaults to ascending.
300
+ * Ties (equivalent values) all get the same rank, defined as the first time the value is found.
301
+ */
302
+ export function rank<T>(
303
+ iterable: Iterable<T>,
304
+ accessorOrComparator:
305
+ | ((datum: T, index: number, array: Iterable<T>) => number | undefined | null)
306
+ | ((a: T, b: T) => number | undefined | null),
307
+ ): Float64Array;
308
+
309
+ /**
310
+ * Returns an unbiased estimator of the population variance of the given iterable of numbers using Welford’s algorithm.
311
+ * If the iterable has fewer than two numbers, returns undefined.
312
+ * An optional accessor function may be specified, which is equivalent to calling Array.from before computing the variance.
313
+ * This method ignores undefined and NaN values; this is useful for ignoring missing data.
314
+ */
315
+ export function variance(iterable: Iterable<Numeric | undefined | null>): number | undefined;
316
+ /**
317
+ * Returns an unbiased estimator of the population variance of the given iterable of numbers using Welford’s algorithm.
318
+ * If the iterable has fewer than two numbers, returns undefined.
319
+ * An optional accessor function may be specified, which is equivalent to calling Array.from before computing the variance.
320
+ * This method ignores undefined and NaN values; this is useful for ignoring missing data.
321
+ */
322
+ export function variance<T>(
323
+ iterable: Iterable<T>,
324
+ accessor: (datum: T, index: number, array: Iterable<T>) => number | undefined | null,
325
+ ): number | undefined;
326
+
327
+ /**
328
+ * Compute the standard deviation, defined as the square root of the bias-corrected variance, of the given array of numbers.
329
+ */
330
+ export function deviation(iterable: Iterable<Numeric | undefined | null>): number | undefined;
331
+ /**
332
+ * Compute the standard deviation, defined as the square root of the bias-corrected variance, of the given array,
333
+ * using the given accessor to convert values to numbers.
334
+ */
335
+ export function deviation<T>(
336
+ iterable: Iterable<T>,
337
+ accessor: (datum: T, index: number, array: Iterable<T>) => number | undefined | null,
338
+ ): number | undefined;
339
+
340
+ /**
341
+ * Returns a full precision summation of the given values.
342
+ * Although slower, d3.fsum can replace d3.sum wherever greater precision is needed. Uses d3.Adder.
343
+ */
344
+ export function fsum(values: Iterable<Numeric | undefined | null>): number;
345
+ /**
346
+ * Returns a full precision summation of the given values.
347
+ * Although slower, d3.fsum can replace d3.sum wherever greater precision is needed. Uses d3.Adder.
348
+ */
349
+ export function fsum<T>(
350
+ values: Iterable<T>,
351
+ accessor: (datum: T, index: number, array: Iterable<T>) => number | undefined | null,
352
+ ): number;
353
+
354
+ /**
355
+ * Returns a full precision cumulative sum of the given values.
356
+ * Although slower, d3.fcumsum can replace d3.cumsum when greater precision is needed. Uses d3.Adder.
357
+ */
358
+ export function fcumsum(values: Iterable<Numeric | undefined | null>): Float64Array;
359
+ /**
360
+ * Returns a full precision cumulative sum of the given values.
361
+ * Although slower, d3.fcumsum can replace d3.cumsum when greater precision is needed. Uses d3.Adder.
362
+ */
363
+ export function fcumsum<T>(
364
+ values: Iterable<T>,
365
+ accessor: (datum: T, index: number, array: Iterable<T>) => number | undefined | null,
366
+ ): Float64Array;
367
+
368
+ export class Adder {
369
+ /**
370
+ * Creates a full precision adder for IEEE 754 floating point numbers, setting its initial value to 0.
371
+ */
372
+ constructor();
373
+
374
+ /**
375
+ * Adds the specified number to the adder’s current value and returns the adder.
376
+ */
377
+ add(number: number): Adder;
378
+
379
+ /**
380
+ * Returns the IEEE 754 double precision representation of the adder’s current value.
381
+ * Most useful as the short-hand notation +adder.
382
+ */
383
+ valueOf(): number;
384
+ }
385
+
386
+ // --------------------------------------------------------------------------------------
387
+ // Search
388
+ // --------------------------------------------------------------------------------------
389
+
390
+ /**
391
+ * Returns the least element of the specified iterable according to the specified comparator.
392
+ * If comparator is not specified, it defaults to ascending.
393
+ */
394
+ export function least<T>(iterable: Iterable<T>, comparator?: (a: T, b: T) => number): T | undefined;
395
+ /**
396
+ * Returns the least element of the specified iterable according to the specified accessor.
397
+ */
398
+ export function least<T>(iterable: Iterable<T>, accessor: (a: T) => unknown): T | undefined;
399
+
400
+ /**
401
+ * Returns the index of the least element of the specified iterable according to the specified comparator.
402
+ */
403
+ export function leastIndex(iterable: Iterable<unknown>): number | undefined;
404
+ /**
405
+ * Returns the index of the least element of the specified iterable according to the specified comparator.
406
+ */
407
+ export function leastIndex<T>(iterable: Iterable<T>, comparator: (a: T, b: T) => number): number | undefined;
408
+ /**
409
+ * Returns the index of the least element of the specified iterable according to the specified accessor.
410
+ */
411
+ // tslint:disable-next-line:unified-signatures
412
+ export function leastIndex<T>(iterable: Iterable<T>, accessor: (a: T) => unknown): number | undefined;
413
+
414
+ /**
415
+ * Returns the greatest element of the specified iterable according to the specified comparator or accessor.
416
+ * If the given iterable contains no comparable elements (i.e., the comparator returns NaN when comparing each element to itself), returns undefined.
417
+ * If comparator is not specified, it defaults to ascending.
418
+ */
419
+ export function greatest<T>(iterable: Iterable<T>, comparator?: (a: T, b: T) => number): T | undefined;
420
+ /**
421
+ * Returns the greatest element of the specified iterable according to the specified comparator or accessor.
422
+ * If the given iterable contains no comparable elements (i.e., the comparator returns NaN when comparing each element to itself), returns undefined.
423
+ * If comparator is not specified, it defaults to ascending.
424
+ */
425
+ export function greatest<T>(iterable: Iterable<T>, accessor: (a: T) => unknown): T | undefined;
426
+
427
+ /**
428
+ * Returns the index of the greatest element of the specified iterable according to the specified comparator or accessor.
429
+ * If the given iterable contains no comparable elements (i.e., the comparator returns NaN when comparing each element to itself), returns -1.
430
+ * If comparator is not specified, it defaults to ascending.
431
+ */
432
+ export function greatestIndex(iterable: Iterable<unknown>): number | undefined;
433
+ /**
434
+ * Returns the index of the greatest element of the specified iterable according to the specified comparator or accessor.
435
+ * If the given iterable contains no comparable elements (i.e., the comparator returns NaN when comparing each element to itself), returns -1.
436
+ * If comparator is not specified, it defaults to ascending.
437
+ */
438
+ export function greatestIndex<T>(iterable: Iterable<T>, comparator: (a: T, b: T) => number): number | undefined;
439
+ /**
440
+ * Returns the index of the greatest element of the specified iterable according to the specified comparator or accessor.
441
+ * If the given iterable contains no comparable elements (i.e., the comparator returns NaN when comparing each element to itself), returns -1.
442
+ * If comparator is not specified, it defaults to ascending.
443
+ */
444
+ // tslint:disable-next-line:unified-signatures
445
+ export function greatestIndex<T>(iterable: Iterable<T>, accessor: (a: T) => unknown): number | undefined;
446
+
447
+ export function bisectLeft(array: ArrayLike<number>, x: number, lo?: number, hi?: number): number;
448
+ export function bisectLeft(array: ArrayLike<string>, x: string, lo?: number, hi?: number): number;
449
+ export function bisectLeft(array: ArrayLike<Date>, x: Date, lo?: number, hi?: number): number;
450
+
451
+ export function bisectRight(array: ArrayLike<number>, x: number, lo?: number, hi?: number): number;
452
+ export function bisectRight(array: ArrayLike<string>, x: string, lo?: number, hi?: number): number;
453
+ export function bisectRight(array: ArrayLike<Date>, x: Date, lo?: number, hi?: number): number;
454
+
455
+ export function bisectCenter(array: ArrayLike<number>, x: number, lo?: number, hi?: number): number;
456
+ export function bisectCenter(array: ArrayLike<string>, x: string, lo?: number, hi?: number): number;
457
+ export function bisectCenter(array: ArrayLike<Date>, x: Date, lo?: number, hi?: number): number;
458
+
459
+ export const bisect: typeof bisectRight;
460
+
461
+ export interface Bisector<T, U> {
462
+ left(array: ArrayLike<T>, x: U, lo?: number, hi?: number): number;
463
+ right(array: ArrayLike<T>, x: U, lo?: number, hi?: number): number;
464
+ center(array: ArrayLike<T>, x: U, lo?: number, hi?: number): number;
465
+ }
466
+
467
+ export function bisector<T, U>(comparator: (a: T, b: U) => number): Bisector<T, U>;
468
+ // tslint:disable-next-line:unified-signatures
469
+ export function bisector<T, U>(accessor: (x: T) => U): Bisector<T, U>;
470
+
471
+ /**
472
+ * Rearranges items so that all items in the [left, k] are the smallest. The k-th element will have the (k - left + 1)-th smallest value in [left, right].
473
+ *
474
+ * @param array The array to partially sort (in place).
475
+ * @param k The middle index for partial sorting.
476
+ * @param left The left index of the range to sort.
477
+ * @param right The right index.
478
+ * @param compare The compare function.
479
+ */
480
+ export function quickselect<T>(
481
+ array: ArrayLike<T>,
482
+ k: number,
483
+ left?: number,
484
+ right?: number,
485
+ compare?: (a: Primitive | undefined, b: Primitive | undefined) => number,
486
+ ): T[];
487
+
488
+ // NB. this is limited to primitive values due to D3's use of the <, >, and >= operators. Results get weird for object instances.
489
+ /**
490
+ * Compares two primitive values for sorting (in ascending order).
491
+ */
492
+ export function ascending(a: Primitive | undefined, b: Primitive | undefined): number;
493
+
494
+ // NB. this is limited to primitive values due to D3's use of the <, >, and >= operators. Results get weird for object instances.
495
+ /**
496
+ * Compares two primitive values for sorting (in descending order).
497
+ */
498
+ export function descending(a: Primitive | undefined, b: Primitive | undefined): number;
499
+
500
+ // --------------------------------------------------------------------------------------
501
+ // Transformations
502
+ // --------------------------------------------------------------------------------------
503
+
504
+ /**
505
+ * Groups the specified iterable of values into an InternMap from key to array of value.
506
+ *
507
+ * @param iterable The iterable to group.
508
+ * @param keys The key functions.
509
+ */
510
+ export function group<TObject, TKeys extends unknown[]>(
511
+ iterable: Iterable<TObject>,
512
+ ...keys: {
513
+ [Index in keyof TKeys]: (value: TObject, index: number, values: TObject[]) => TKeys[Index];
514
+ }
515
+ ): NestedInternMap<TObject, TObject[], TKeys>;
516
+
517
+ /**
518
+ * Equivalent to group, but returns nested arrays instead of nested maps.
519
+ *
520
+ * @param iterable The iterable to group.
521
+ * @param keys The key functions.
522
+ */
523
+ export function groups<TObject, TKeys extends unknown[]>(
524
+ iterable: Iterable<TObject>,
525
+ ...keys: {
526
+ [Index in keyof TKeys]: (value: TObject, index: number, values: TObject[]) => TKeys[Index];
527
+ }
528
+ ): NestedArray<TObject, TObject[], TKeys>;
529
+
530
+ /**
531
+ * Equivalent to group, but returns a flat array of [key0, key1, …, values] instead of nested maps.
532
+ *
533
+ * @param iterable The iterable to group.
534
+ * @param keys The key functions.
535
+ */
536
+ export function flatGroup<TObject, TKeys extends unknown[]>(
537
+ iterable: Iterable<TObject>,
538
+ ...keys: {
539
+ [Index in keyof TKeys]: (value: TObject, index: number, values: TObject[]) => TKeys[Index];
540
+ }
541
+ ): Array<[...TKeys, TObject[]]>;
542
+
543
+ /**
544
+ * Equivalent to group but returns a unique value per compound key instead of an array, throwing if the key is not unique.
545
+ *
546
+ * @param iterable The iterable to group.
547
+ * @param key The key functions.
548
+ */
549
+ export function index<TObject, TKeys extends unknown[]>(
550
+ iterable: Iterable<TObject>,
551
+ ...keys: {
552
+ [Index in keyof TKeys]: (value: TObject, index: number, values: TObject[]) => TKeys[Index];
553
+ }
554
+ ): NestedInternMap<TObject, TObject, TKeys>;
555
+
556
+ /**
557
+ * Equivalent to index, but returns nested arrays instead of nested maps.
558
+ *
559
+ * @param iterable The iterable to group.
560
+ * @param keys The key functions.
561
+ */
562
+ export function indexes<TObject, TKeys extends unknown[]>(
563
+ iterable: Iterable<TObject>,
564
+ ...keys: {
565
+ [Index in keyof TKeys]: (value: TObject, index: number, values: TObject[]) => TKeys[Index];
566
+ }
567
+ ): NestedArray<TObject, TObject, TKeys>;
568
+
569
+ /**
570
+ * Groups and reduces the specified array of values into an InternMap from key to value.
571
+ *
572
+ * @param iterable The iterable to group.
573
+ * @param reduce The reduce function.
574
+ * @param keys The key functions.
575
+ */
576
+ export function rollup<TObject, TReduce, TKeys extends unknown[]>(
577
+ iterable: Iterable<TObject>,
578
+ reduce: (values: TObject[]) => TReduce,
579
+ ...keys: {
580
+ [Index in keyof TKeys]: (value: TObject, index: number, values: TObject[]) => TKeys[Index];
581
+ }
582
+ ): NestedInternMap<TObject, TReduce, TKeys>;
583
+
584
+ /**
585
+ * Equivalent to rollup, but returns nested arrays instead of nested maps.
586
+ *
587
+ * @param iterable The iterable to group.
588
+ * @param reduce The reduce function.
589
+ * @param keys The key functions.
590
+ */
591
+ export function rollups<TObject, TReduce, TKeys extends unknown[]>(
592
+ iterable: Iterable<TObject>,
593
+ reduce: (values: TObject[]) => TReduce,
594
+ ...keys: {
595
+ [Index in keyof TKeys]: (value: TObject, index: number, values: TObject[]) => TKeys[Index];
596
+ }
597
+ ): NestedArray<TObject, TReduce, TKeys>;
598
+
599
+ /**
600
+ * Equivalent to rollup, but returns a flat array of [key0, key1, …, value] instead of nested maps.
601
+ *
602
+ * @param iterable The iterable to group.
603
+ * @param reduce The reduce function.
604
+ * @param keys The key functions.
605
+ */
606
+ export function flatRollup<TObject, TReduce, TKeys extends unknown[]>(
607
+ iterable: Iterable<TObject>,
608
+ reduce: (values: TObject[]) => TReduce,
609
+ ...keys: {
610
+ [Index in keyof TKeys]: (value: TObject, index: number, values: TObject[]) => TKeys[Index];
611
+ }
612
+ ): Array<[...TKeys, TReduce]>;
613
+
614
+ /**
615
+ * Groups the specified iterable of elements according to the specified key function, sorts the groups according to the specified comparator, and then returns an array of keys in sorted order.
616
+ * The comparator will be asked to compare two groups a and b and should return a negative value if a should be before b, a positive value if a should be after b, or zero for a partial ordering.
617
+ */
618
+ export function groupSort<TObject, TKey>(
619
+ iterable: Iterable<TObject>,
620
+ comparator: (a: TObject[], b: TObject[]) => number,
621
+ key: (value: TObject) => TKey,
622
+ ): TKey[];
623
+ /**
624
+ * Groups the specified iterable of elements according to the specified key function, sorts the groups according to the specified accessor, and then returns an array of keys in sorted order.
625
+ */
626
+ export function groupSort<TObject, TKey>(
627
+ iterable: Iterable<TObject>,
628
+ // tslint:disable-next-line:unified-signatures
629
+ accessor: (value: TObject[]) => unknown,
630
+ key: (value: TObject) => TKey,
631
+ ): TKey[];
632
+
633
+ /**
634
+ * Returns the number of valid number values (i.e., not null, NaN, or undefined) in the specified iterable; accepts an accessor.
635
+ *
636
+ * @param iterable Input array.
637
+ */
638
+ export function count(iterable: Iterable<unknown>): number;
639
+ /**
640
+ * Returns the number of valid number values (i.e., not null, NaN, or undefined) in the specified iterable; accepts an accessor.
641
+ *
642
+ * @param iterable Input array.
643
+ * @param accessor Accessor method.
644
+ */
645
+ export function count<TObject>(
646
+ iterable: Iterable<TObject>,
647
+ accessor: (a: TObject, b: TObject) => number | null | undefined,
648
+ ): number;
649
+
650
+ /**
651
+ * Computes the Cartesian product of any number of iterables.
652
+ *
653
+ * When called **without** a reducer, the result is an array of tuples,
654
+ * where each tuple contains one element from each input iterable.
655
+ *
656
+ * @typeParam T - A tuple type describing the element type of each iterable argument.
657
+ * For example, passing `[number[], string[]]` infers `T` as `[number, string]`.
658
+ *
659
+ * @param iterables - Two or more iterables to combine into a Cartesian product.
660
+ * @returns An array of tuples containing one value from each iterable.
661
+ *
662
+ * @example
663
+ * ```ts
664
+ * const nums = [1, 2];
665
+ * const chars = ['a', 'b'];
666
+ * const out = cross(nums, chars);
667
+ * // ^? type: [number, string][]
668
+ * // Example value: [[1,'a'], [1,'b'], [2,'a'], [2,'b']]
669
+ * ```
670
+ */
671
+ export function cross<T extends unknown[]>(
672
+ ...iterables: { [K in keyof T]: Iterable<T[K]> }
673
+ ): T[];
674
+
675
+ /**
676
+ * Computes the Cartesian product of any number of iterables and then applies
677
+ * a reducer to each tuple, returning the reduced values.
678
+ *
679
+ * The final argument **must** be the reducer function; all prior arguments are iterables.
680
+ *
681
+ * @typeParam T - A tuple type describing the element type of each iterable argument.
682
+ * @typeParam U - The result type produced by the reducer.
683
+ *
684
+ * @param args - The iterables to combine, followed by a reducer function.
685
+ * @param args.reducer - A function invoked with one element from each iterable
686
+ * (spread as individual parameters) that returns a reduced value.
687
+ * @returns An array of reduced values returned by the reducer.
688
+ *
689
+ * @example
690
+ * ```ts
691
+ * const nums = [1, 2];
692
+ * const chars = ['a', 'b'];
693
+ * const out = cross(nums, chars, (n, c) => `${n}${c}`);
694
+ * // ^? type: string[]
695
+ * // Example value: ['1a', '1b', '2a', '2b']
696
+ * ```
697
+ */
698
+ export function cross<T extends unknown[], U>(
699
+ ...args: [...iterables: { [K in keyof T]: Iterable<T[K]> }, reducer: (...values: T) => U]
700
+ ): U[];
701
+
702
+ /**
703
+ * Merges the specified arrays into a single array.
704
+ */
705
+ export function merge<T>(iterables: Iterable<Iterable<T>>): T[];
706
+
707
+ /**
708
+ * For each adjacent pair of elements in the specified array, returns a new array of tuples of elements i and i - 1.
709
+ * Returns the empty array if the input array has fewer than two elements.
710
+ *
711
+ * @param iterable Array of input elements
712
+ */
713
+ export function pairs<T>(iterable: Iterable<T>): Array<[T, T]>;
714
+ /**
715
+ * For each adjacent pair of elements in the specified array, in order, invokes the specified reducer function passing the element i and element i - 1.
716
+ * Returns the resulting array of pair-wise reduced elements.
717
+ * Returns the empty array if the input array has fewer than two elements.
718
+ *
719
+ * @param iterable Array of input elements
720
+ * @param reducer A reducer function taking as input to adjacent elements of the input array and returning a reduced value.
721
+ */
722
+ export function pairs<T, U>(iterable: Iterable<T>, reducer: (a: T, b: T) => U): U[];
723
+
724
+ /**
725
+ * Returns a permutation of the specified source object (or array) using the specified iterable of keys.
726
+ * The returned array contains the corresponding property of the source object for each key in keys, in order.
727
+ * For example, `permute(["a", "b", "c"], [1, 2, 0]) // ["b", "c", "a"]`
728
+ *
729
+ * It is acceptable to have more keys than source elements, and for keys to be duplicated or omitted.
730
+ */
731
+ export function permute<T>(source: { [key: number]: T }, keys: Iterable<number>): T[];
732
+ /**
733
+ * Extract the values from an object into an array with a stable order. For example:
734
+ * `var object = {yield: 27, year: 1931, site: "University Farm"};`
735
+ * `d3.permute(object, ["site", "yield"]); // ["University Farm", 27]`
736
+ */
737
+ export function permute<T, K extends keyof T>(source: T, keys: Iterable<K>): Array<T[K]>;
738
+
739
+ /**
740
+ * Randomizes the order of the specified array using the Fisher–Yates shuffle.
741
+ */
742
+ export function shuffle<T>(array: T[], lo?: number, hi?: number): T[];
743
+ export function shuffle(array: Int8Array, lo?: number, hi?: number): Int8Array;
744
+ export function shuffle(array: Uint8Array, lo?: number, hi?: number): Uint8Array;
745
+ export function shuffle(array: Uint8ClampedArray, lo?: number, hi?: number): Uint8ClampedArray;
746
+ export function shuffle(array: Int16Array, lo?: number, hi?: number): Int16Array;
747
+ export function shuffle(array: Uint16Array, lo?: number, hi?: number): Uint16Array;
748
+ export function shuffle(array: Int32Array, lo?: number, hi?: number): Int32Array;
749
+ export function shuffle(array: Uint32Array, lo?: number, hi?: number): Uint32Array;
750
+ export function shuffle(array: Float32Array, lo?: number, hi?: number): Float32Array;
751
+ export function shuffle(array: Float64Array, lo?: number, hi?: number): Float64Array;
752
+
753
+ /**
754
+ * Returns a shuffle function given the specified random source.
755
+ */
756
+ export function shuffler(random: () => number): typeof shuffle;
757
+
758
+ /**
759
+ * Generate an array of approximately count + 1 uniformly-spaced, nicely-rounded values between start and stop (inclusive).
760
+ * Each value is a power of ten multiplied by 1, 2 or 5. See also d3.tickIncrement, d3.tickStep and linear.ticks.
761
+ *
762
+ * Ticks are inclusive in the sense that they may include the specified start and stop values if (and only if) they are exact,
763
+ * nicely-rounded values consistent with the inferred step. More formally, each returned tick t satisfies start ≤ t and t ≤ stop.
764
+ *
765
+ * @param start Start value for ticks
766
+ * @param stop Stop value for ticks
767
+ * @param count count + 1 is the approximate number of ticks to be returned by d3.ticks.
768
+ */
769
+ export function ticks(start: number, stop: number, count: number): number[];
770
+
771
+ /**
772
+ * Returns the difference between adjacent tick values if the same arguments were passed to d3.ticks:
773
+ * a nicely-rounded value that is a power of ten multiplied by 1, 2 or 5.
774
+ *
775
+ * Like d3.tickStep, except requires that start is always less than or equal to stop, and if the tick step for the given start,
776
+ * stop and count would be less than one, returns the negative inverse tick step instead.
777
+ *
778
+ * This method is always guaranteed to return an integer, and is used by d3.ticks to avoid guarantee that the returned tick values
779
+ * are represented as precisely as possible in IEEE 754 floating point.
780
+ *
781
+ * @param start Start value for ticks
782
+ * @param stop Stop value for ticks
783
+ * @param count count + 1 is the approximate number of ticks to be returned by d3.ticks.
784
+ */
785
+ export function tickIncrement(start: number, stop: number, count: number): number;
786
+
787
+ /**
788
+ * Returns the difference between adjacent tick values if the same arguments were passed to d3.ticks:
789
+ * a nicely-rounded value that is a power of ten multiplied by 1, 2 or 5.
790
+ *
791
+ * Note that due to the limited precision of IEEE 754 floating point, the returned value may not be exact decimals;
792
+ * use d3-format to format numbers for human consumption.
793
+ *
794
+ * @param start Start value for ticks
795
+ * @param stop Stop value for ticks
796
+ * @param count count + 1 is the approximate number of ticks to be returned by d3.ticks.
797
+ */
798
+ export function tickStep(start: number, stop: number, count: number): number;
799
+
800
+ /**
801
+ * Returns a new interval [niceStart, niceStop] covering the given interval [start, stop] and where niceStart and niceStop are guaranteed to align with the corresponding tick step.
802
+ * Like d3.tickIncrement, this requires that start is less than or equal to stop.
803
+ *
804
+ * @param start Start value for ticks
805
+ * @param stop Stop value for ticks
806
+ * @param count count + 1 is the approximate number of ticks to be returned by d3.ticks.
807
+ */
808
+ export function nice(start: number, stop: number, count: number): [number, number];
809
+
810
+ /**
811
+ * Generates a 0-based numeric sequence. The output range does not include 'stop'.
812
+ */
813
+ export function range(stop: number): number[];
814
+ /**
815
+ * Generates a numeric sequence starting from the given start and stop values. 'step' defaults to 1. The output range does not include 'stop'.
816
+ */
817
+ // tslint:disable-next-line:unified-signatures
818
+ export function range(start: number, stop: number, step?: number): number[];
819
+
820
+ /**
821
+ * Transpose a matrix provided in Array of Arrays format.
822
+ */
823
+ export function transpose<T>(matrix: ArrayLike<ArrayLike<T>>): T[][];
824
+
825
+ /**
826
+ * Returns an array of arrays, where the ith array contains the ith element from each of the argument arrays.
827
+ * The returned array is truncated in length to the shortest array in arrays. If arrays contains only a single array, the returned array
828
+ * contains one-element arrays. With no arguments, the returned array is empty.
829
+ */
830
+ export function zip<T>(...arrays: Array<ArrayLike<T>>): T[][];
831
+
832
+ // --------------------------------------------------------------------------------------
833
+ // Blur
834
+ // --------------------------------------------------------------------------------------
835
+
836
+ /**
837
+ * Blurs an array of data in-place by applying three iterations of a moving average transform (box filter)
838
+ * for a fast approximation of a Gaussian kernel of the given radius, a non-negative number.
839
+ * Returns the given data.
840
+ */
841
+ export function blur(data: ArrayLike<number>, radius: number): ArrayLike<number>;
842
+
843
+ /**
844
+ * Blurs a matrix of the given width and height in-place by applying a horizontal blur of radius rx
845
+ * and a vertical blur of radius ry (which defaults to rx).
846
+ * The matrix values data are stored in a flat (one-dimensional) array.
847
+ * If height is not specified, it is inferred from the given width and data.length.
848
+ * Returns the blurred matrix {data, width, height}.
849
+ */
850
+ export function blur2(data: Matrix, rx: number, ry?: number): Matrix;
851
+
852
+ /**
853
+ * Blurs the given ImageData in-place, blurring each of the RGBA layers independently by applying an horizontal blur of radius rx
854
+ * and a vertical blur of radius ry (which defaults to rx).
855
+ * Returns the blurred ImageData.
856
+ */
857
+ export function blurImage(imageData: ImageData, rx: number, ry?: number): ImageData;
858
+
859
+ // --------------------------------------------------------------------------------------
860
+ // Iterables
861
+ // --------------------------------------------------------------------------------------
862
+
863
+ /**
864
+ * Returns true if the given test function returns true for every value in the given iterable.
865
+ * This method returns as soon as test returns a non-truthy value or all values are iterated over.
866
+ * Equivalent to array.every.
867
+ */
868
+ export function every<T>(
869
+ iterable: Iterable<T>,
870
+ test: (value: T, index: number, iterable: Iterable<T>) => unknown,
871
+ ): boolean;
872
+
873
+ /**
874
+ * Returns true if the given test function returns true for any value in the given iterable.
875
+ * This method returns as soon as test returns a truthy value or all values are iterated over.
876
+ * Equivalent to array.some.
877
+ */
878
+ export function some<T>(
879
+ iterable: Iterable<T>,
880
+ test: (value: T, index: number, iterable: Iterable<T>) => unknown,
881
+ ): boolean;
882
+
883
+ /**
884
+ * Returns a new array containing the values from iterable, in order, for which the given test function returns true.
885
+ * Equivalent to array.filter.
886
+ */
887
+ export function filter<T>(
888
+ iterable: Iterable<T>,
889
+ test: (value: T, index: number, iterable: Iterable<T>) => unknown,
890
+ ): T[];
891
+
892
+ /**
893
+ * Returns a new array containing the mapped values from iterable, in order, as defined by given mapper function.
894
+ * Equivalent to array.map and Array.from.
895
+ */
896
+ export function map<T, U>(iterable: Iterable<T>, mapper: (value: T, index: number, iterable: Iterable<T>) => U): U[];
897
+
898
+ /**
899
+ * Returns the reduced value defined by given reducer function, which is repeatedly invoked for each value in iterable, being passed the current reduced value and the next value.
900
+ * Equivalent to array.reduce.
901
+ */
902
+ export function reduce<T>(
903
+ iterable: Iterable<T>,
904
+ reducer: (previousValue: T, currentValue: T, currentIndex: number, iterable: Iterable<T>) => T,
905
+ initialValue?: T,
906
+ ): T;
907
+ /**
908
+ * Returns the reduced value defined by given reducer function, which is repeatedly invoked for each value in iterable, being passed the current reduced value and the next value.
909
+ * Equivalent to array.reduce.
910
+ */
911
+ export function reduce<T, U>(
912
+ iterable: Iterable<T>,
913
+ reducer: (previousValue: U, currentValue: T, currentIndex: number, iterable: Iterable<T>) => U,
914
+ initialValue: U,
915
+ ): U;
916
+
917
+ /**
918
+ * Returns an array containing the values in the given iterable in reverse order.
919
+ * Equivalent to array.reverse, except that it does not mutate the given iterable.
920
+ */
921
+ export function reverse<T>(iterable: Iterable<T>): T[];
922
+
923
+ /**
924
+ * Returns an array containing the values in the given iterable in the sorted order defined by the given comparator function.
925
+ * If comparator is not specified, it defaults to d3.ascending.
926
+ * Equivalent to array.sort, except that it does not mutate the given iterable, and the comparator defaults to natural order instead of lexicographic order.
927
+ */
928
+ export function sort<T>(iterable: Iterable<T>, comparator?: (a: T, b: T) => number): T[];
929
+ /**
930
+ * Returns an array containing the values in the given iterable in the sorted order defined by the given accessor function.
931
+ * This is equivalent to a comparator using natural order.
932
+ * The accessor is only invoked once per element, and thus may be nondeterministic.
933
+ * Multiple accessors may be specified to break ties.
934
+ */
935
+ export function sort<T>(iterable: Iterable<T>, ...accessors: Array<(a: T) => unknown>): T[];
936
+
937
+ // --------------------------------------------------------------------------------------
938
+ // Sets
939
+ // --------------------------------------------------------------------------------------
940
+
941
+ /**
942
+ * Returns a new InternSet containing every value in iterable that is not in any of the others iterables.
943
+ */
944
+ export function difference<T>(iterable: Iterable<T>, ...others: Array<Iterable<T>>): InternSet<T>;
945
+
946
+ /**
947
+ * Returns a new InternSet containing every (distinct) value that appears in any of the given iterables.
948
+ * The order of values in the returned set is based on their first occurrence in the given iterables.
949
+ */
950
+ export function union<T>(...iterables: Array<Iterable<T>>): InternSet<T>;
951
+
952
+ /**
953
+ * Returns a new InternSet containing every (distinct) value that appears in all of the given iterables.
954
+ * The order of values in the returned set is based on their first occurrence in the given iterables.
955
+ */
956
+ export function intersection<T>(...iterables: Array<Iterable<T>>): InternSet<T>;
957
+
958
+ /**
959
+ * Returns true if a is a superset of b: if every value in the given iterable b is also in the given iterable a.
960
+ */
961
+ export function superset<T>(a: Iterable<T>, b: Iterable<T>): boolean;
962
+
963
+ /**
964
+ * Returns true if a is a subset of b: if every value in the given iterable a is also in the given iterable b.
965
+ */
966
+ export function subset<T>(a: Iterable<T>, b: Iterable<T>): boolean;
967
+
968
+ /**
969
+ * Returns true if a and b are disjoint: if a and b contain no shared value.
970
+ */
971
+ export function disjoint<T>(a: Iterable<T>, b: Iterable<T>): boolean;
972
+
973
+ // --------------------------------------------------------------------------------------
974
+ // Bins
975
+ // --------------------------------------------------------------------------------------
976
+
977
+ export interface Bin<Datum, Value extends number | Date | undefined> extends Array<Datum> {
978
+ x0: Value | undefined;
979
+ x1: Value | undefined;
980
+ }
981
+
982
+ /**
983
+ * Type definition for threshold generator which returns the count of recommended thresholds
984
+ */
985
+ export type ThresholdCountGenerator<Value extends number | undefined = number | undefined> = (
986
+ values: ArrayLike<Value>,
987
+ min: number,
988
+ max: number,
989
+ ) => number;
990
+
991
+ /**
992
+ * Type definition for threshold generator which returns an array of recommended numbers thresholds
993
+ */
994
+ export type ThresholdNumberArrayGenerator<Value extends number | undefined> = (
995
+ values: ArrayLike<Value>,
996
+ min: number,
997
+ max: number,
998
+ ) => Value[];
999
+
1000
+ /**
1001
+ * Type definition for threshold generator which returns an array of recommended dates thresholds
1002
+ */
1003
+ export type ThresholdDateArrayGenerator<Value extends Date | undefined> = (
1004
+ values: ArrayLike<Value>,
1005
+ min: Date,
1006
+ max: Date,
1007
+ ) => Value[];
1008
+
1009
+ export interface HistogramCommon<Datum, Value extends number | Date | undefined> {
1010
+ (data: ArrayLike<Datum>): Array<Bin<Datum, Value>>;
1011
+
1012
+ value(): (d: Datum, i: number, data: ArrayLike<Datum>) => Value;
1013
+ value(valueAccessor: (d: Datum, i: number, data: ArrayLike<Datum>) => Value): this;
1014
+ }
1015
+
1016
+ export interface HistogramGeneratorDate<Datum, Value extends Date | undefined> extends HistogramCommon<Datum, Date> {
1017
+ domain(): (values: ArrayLike<Value>) => [Date, Date];
1018
+ domain(domain: [Date, Date] | ((values: ArrayLike<Value>) => [Date, Date])): this;
1019
+
1020
+ thresholds(): ThresholdDateArrayGenerator<Value>;
1021
+ /**
1022
+ * Set the array of values to be used as thresholds in determining the bins.
1023
+ *
1024
+ * Any threshold values outside the domain are ignored. The first bin.x0 is always equal to the minimum domain value,
1025
+ * and the last bin.x1 is always equal to the maximum domain value.
1026
+ *
1027
+ * @param thresholds Either an array of threshold values used for binning. The elements must
1028
+ * be of the same type as the materialized values of the histogram.
1029
+ * Or a function which accepts as arguments the array of materialized values, and
1030
+ * optionally the domain minimum and maximum. The function calculates and returns the array of values to be used as
1031
+ * thresholds in determining the bins.
1032
+ */
1033
+ thresholds(thresholds: ArrayLike<Value> | ThresholdDateArrayGenerator<Value>): this;
1034
+ }
1035
+
1036
+ export interface HistogramGeneratorNumber<Datum, Value extends number | undefined>
1037
+ extends HistogramCommon<Datum, Value>
1038
+ {
1039
+ domain(): (values: Iterable<Value>) => [number, number] | [undefined, undefined];
1040
+ domain(domain: [number, number] | ((values: Iterable<Value>) => [number, number] | [undefined, undefined])): this;
1041
+
1042
+ thresholds(): ThresholdCountGenerator<Value> | ThresholdNumberArrayGenerator<Value>;
1043
+ /**
1044
+ * Divide the domain uniformly into approximately count bins. IMPORTANT: This threshold
1045
+ * setting approach only works, when the materialized values are numbers!
1046
+ *
1047
+ * Any threshold values outside the domain are ignored. The first bin.x0 is always equal to the minimum domain value,
1048
+ * and the last bin.x1 is always equal to the maximum domain value.
1049
+ *
1050
+ * @param count Either the desired number of uniform bins or a function which accepts as arguments the array of
1051
+ * materialized values, and optionally the domain minimum and maximum. The function calculates and returns the
1052
+ * suggested number of bins.
1053
+ */
1054
+ thresholds(count: number | ThresholdCountGenerator<Value>): this;
1055
+ /**
1056
+ * Set the array of values to be used as thresholds in determining the bins.
1057
+ *
1058
+ * Any threshold values outside the domain are ignored. The first bin.x0 is always equal to the minimum domain value,
1059
+ * and the last bin.x1 is always equal to the maximum domain value.
1060
+ *
1061
+ * @param thresholds Either an array of threshold values used for binning. The elements must
1062
+ * be of the same type as the materialized values of the histogram.
1063
+ * Or a function which accepts as arguments the array of materialized values, and
1064
+ * optionally the domain minimum and maximum. The function calculates and returns the array of values to be used as
1065
+ * thresholds in determining the bins.
1066
+ */
1067
+ // tslint:disable-next-line:unified-signatures
1068
+ thresholds(thresholds: ArrayLike<Value> | ThresholdNumberArrayGenerator<Value>): this;
1069
+ }
1070
+
1071
+ /**
1072
+ * @deprecated Use bin instead.
1073
+ */
1074
+ export function histogram(): HistogramGeneratorNumber<number, number>;
1075
+
1076
+ /**
1077
+ * @deprecated Use bin instead.
1078
+ */
1079
+ // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
1080
+ export function histogram<Datum, Value extends number | undefined>(): HistogramGeneratorNumber<Datum, Value>;
1081
+
1082
+ /**
1083
+ * @deprecated Use bin instead.
1084
+ */
1085
+ // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
1086
+ export function histogram<Datum, Value extends Date | undefined>(): HistogramGeneratorDate<Datum, Value>;
1087
+
1088
+ export function bin(): HistogramGeneratorNumber<number, number>;
1089
+ // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
1090
+ export function bin<Datum, Value extends number | undefined>(): HistogramGeneratorNumber<Datum, Value>;
1091
+ // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
1092
+ export function bin<Datum, Value extends Date | undefined>(): HistogramGeneratorDate<Datum, Value>;
1093
+
1094
+ // --------------------------------------------------------------------------------------
1095
+ // Histogram Thresholds
1096
+ // --------------------------------------------------------------------------------------
1097
+
1098
+ export function thresholdFreedmanDiaconis(values: ArrayLike<number | undefined>, min: number, max: number): number; // of type ThresholdCountGenerator
1099
+
1100
+ export function thresholdScott(values: ArrayLike<number | undefined>, min: number, max: number): number; // of type ThresholdCountGenerator
1101
+
1102
+ export function thresholdSturges(values: ArrayLike<number | undefined>): number; // of type ThresholdCountGenerator
1103
+
1104
+ // --------------------------------------------------------------------------------------
1105
+ // Interning
1106
+ // --------------------------------------------------------------------------------------
1107
+
1108
+ /**
1109
+ * The InternMap class extends the native JavaScript Map class, allowing Dates and other non-primitive keys by bypassing the SameValueZero algorithm when determining key equality.
1110
+ */
1111
+ export class InternMap<K = any, V = any> extends Map<K, V> {
1112
+ }
1113
+
1114
+ /**
1115
+ * The InternSet class extends the native JavaScript Set class, allowing Dates and other non-primitive keys by bypassing the SameValueZero algorithm when determining key equality.
1116
+ */
1117
+ export class InternSet<T = any> extends Set<T> {
1118
+ }
node_modules/@types/d3-array/package.json ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "@types/d3-array",
3
+ "version": "3.2.2",
4
+ "description": "TypeScript definitions for d3-array",
5
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-array",
6
+ "license": "MIT",
7
+ "contributors": [
8
+ {
9
+ "name": "Alex Ford",
10
+ "githubUsername": "gustavderdrache",
11
+ "url": "https://github.com/gustavderdrache"
12
+ },
13
+ {
14
+ "name": "Boris Yankov",
15
+ "githubUsername": "borisyankov",
16
+ "url": "https://github.com/borisyankov"
17
+ },
18
+ {
19
+ "name": "Tom Wanzek",
20
+ "githubUsername": "tomwanzek",
21
+ "url": "https://github.com/tomwanzek"
22
+ },
23
+ {
24
+ "name": "denisname",
25
+ "githubUsername": "denisname",
26
+ "url": "https://github.com/denisname"
27
+ },
28
+ {
29
+ "name": "Hugues Stefanski",
30
+ "githubUsername": "ledragon",
31
+ "url": "https://github.com/ledragon"
32
+ },
33
+ {
34
+ "name": "Nathan Bierema",
35
+ "githubUsername": "Methuselah96",
36
+ "url": "https://github.com/Methuselah96"
37
+ },
38
+ {
39
+ "name": "Fil",
40
+ "githubUsername": "Fil",
41
+ "url": "https://github.com/Fil"
42
+ }
43
+ ],
44
+ "main": "",
45
+ "types": "index.d.ts",
46
+ "repository": {
47
+ "type": "git",
48
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
49
+ "directory": "types/d3-array"
50
+ },
51
+ "scripts": {},
52
+ "dependencies": {},
53
+ "peerDependencies": {},
54
+ "typesPublisherContentHash": "d8ff015b14e99aec79f6ac45682bd8237145131c804b94de0ed1e6bc003d5190",
55
+ "typeScriptVersion": "5.2"
56
+ }
node_modules/@types/d3-color/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
node_modules/@types/d3-color/README.md ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Installation
2
+ > `npm install --save @types/d3-color`
3
+
4
+ # Summary
5
+ This package contains type definitions for d3-color (https://github.com/d3/d3-color/).
6
+
7
+ # Details
8
+ Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-color.
9
+
10
+ ### Additional Details
11
+ * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
12
+ * Dependencies: none
13
+
14
+ # Credits
15
+ These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), [Hugues Stefanski](https://github.com/ledragon), [Nathan Bierema](https://github.com/Methuselah96), and [Fil](https://github.com/Fil).
node_modules/@types/d3-color/index.d.ts ADDED
@@ -0,0 +1,669 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Last module patch version validated against: 3.1.0
2
+
3
+ // ---------------------------------------------------------------------------
4
+ // Shared Type Definitions and Interfaces
5
+ // ---------------------------------------------------------------------------
6
+
7
+ /**
8
+ * Type allowing for color objects from a specified color space
9
+ */
10
+ export type ColorSpaceObject = RGBColor | HSLColor | LabColor | HCLColor | CubehelixColor;
11
+
12
+ /**
13
+ * A helper interface of methods common to color objects (including colors defined outside the d3-color standard module,
14
+ * e.g. in d3-hsv). This interface
15
+ */
16
+ export interface ColorCommonInstance {
17
+ /**
18
+ * Returns true if and only if the color is displayable on standard hardware.
19
+ * For example, this returns false for an RGB color if any channel value is less than zero or greater than 255, or if the opacity is not in the range [0, 1].
20
+ */
21
+ displayable(): boolean;
22
+ /**
23
+ * Returns a string representing this color according to the CSS Object Model specification,
24
+ * such as rgb(247, 234, 186) or rgba(247, 234, 186, 0.2).
25
+ * If this color is not displayable, a suitable displayable color is returned instead.
26
+ * For example, RGB channel values greater than 255 are clamped to 255.
27
+ */
28
+ toString(): string;
29
+ /**
30
+ * Returns a brighter copy of this color. If k is specified, it controls how much brighter the returned color should be.
31
+ * If k is not specified, it defaults to 1. The behavior of this method is dependent on the implementing color space.
32
+ *
33
+ * @param k A color space dependent number to determine, how much brighter the returned color should be.
34
+ */
35
+ brighter(k?: number): this;
36
+ /**
37
+ * Returns a darker copy of this color. If k is specified, it controls how much darker the returned color should be.
38
+ * If k is not specified, it defaults to 1. The behavior of this method is dependent on the implementing color space.
39
+ *
40
+ * @param k A color space dependent number to determine, how much darker the returned color should be.
41
+ */
42
+ darker(k?: number): this;
43
+ /**
44
+ * Returns the RGB equivalent of this color. For RGB colors, that’s "this".
45
+ */
46
+ rgb(): RGBColor;
47
+ /**
48
+ * Returns a hexadecimal string representing this color.
49
+ * If this color is not displayable, a suitable displayable color is returned instead.
50
+ * For example, RGB channel values greater than 255 are clamped to 255.
51
+ */
52
+ hex(): string;
53
+ }
54
+
55
+ /**
56
+ * A Color object which serves as a base class for
57
+ * colorspace-specific sub-class implementations.
58
+ */
59
+ export interface Color {
60
+ /**
61
+ * Returns true if and only if the color is displayable on standard hardware.
62
+ * For example, this returns false for an RGB color if any channel value is less than zero or greater than 255, or if the opacity is not in the range [0, 1].
63
+ */
64
+ displayable(): boolean; // Note: While this method is used in prototyping for colors of specific colorspaces, it should not be called directly, as 'this.rgb' would not be implemented on Color
65
+ /**
66
+ * Returns a string representing this color according to the CSS Object Model specification,
67
+ * such as rgb(247, 234, 186) or rgba(247, 234, 186, 0.2).
68
+ * If this color is not displayable, a suitable displayable color is returned instead.
69
+ * For example, RGB channel values greater than 255 are clamped to 255.
70
+ */
71
+ toString(): string; // Note: While this method is used in prototyping for colors of specific colorspaces, it should not be called directly, as 'this.rgb' would not be implemented on Color
72
+ /**
73
+ * Returns a hexadecimal string representing this color in RGB space, such as #f7eaba.
74
+ * If this color is not displayable, a suitable displayable color is returned instead.
75
+ * For example, RGB channel values greater than 255 are clamped to 255.
76
+ */
77
+ formatHex(): string;
78
+ /**
79
+ * Returns a hexadecimal string representing this color in RGBA space, such as #f7eaba90.
80
+ * If this color is not displayable, a suitable displayable color is returned instead.
81
+ * For example, RGB channel values greater than 255 are clamped to 255.
82
+ */
83
+ formatHex8(): string;
84
+ /**
85
+ * Returns a string representing this color according to the CSS Color Module Level 3 specification, such as hsl(257, 50%, 80%) or hsla(257, 50%, 80%, 0.2).
86
+ * If this color is not displayable, a suitable displayable color is returned instead by clamping S and L channel values to the interval [0, 100].
87
+ */
88
+ formatHsl(): string;
89
+ /**
90
+ * Returns a string representing this color according to the CSS Object Model specification, such as rgb(247, 234, 186) or rgba(247, 234, 186, 0.2).
91
+ * If this color is not displayable, a suitable displayable color is returned instead by clamping RGB channel values to the interval [0, 255].
92
+ */
93
+ formatRgb(): string;
94
+ /**
95
+ * @deprecated Use color.formatHex.
96
+ */
97
+ hex(): string;
98
+ }
99
+
100
+ /**
101
+ * A Color factory object, which may also be used with instanceof to test if an object is a color instance.
102
+ */
103
+ export interface ColorFactory extends Function {
104
+ /**
105
+ * Parses the specified CSS Color Module Level 3 specifier string, returning an RGB or HSL color.
106
+ * If the specifier was not valid, null is returned.
107
+ *
108
+ * @param cssColorSpecifier A CSS Color Module Level 3 specifier string.
109
+ */
110
+ (cssColorSpecifier: string): RGBColor | HSLColor | null;
111
+ /**
112
+ * Converts the provided color instance and returns an RGB or HSL color.
113
+ *
114
+ * @param color A permissible color space instance.
115
+ */
116
+ (color: ColorSpaceObject | ColorCommonInstance): RGBColor | HSLColor;
117
+ /**
118
+ * Prototype of the factory, which can be used for instanceof testing
119
+ */
120
+ readonly prototype: Color;
121
+ }
122
+
123
+ /**
124
+ * An RGB color object.
125
+ */
126
+ export interface RGBColor extends Color {
127
+ /**
128
+ * Value of red channel
129
+ */
130
+ r: number;
131
+ /**
132
+ * Value of green channel
133
+ */
134
+ g: number;
135
+ /**
136
+ * Value of blue channel
137
+ */
138
+ b: number;
139
+ /**
140
+ * Opacity value
141
+ */
142
+ opacity: number;
143
+ /**
144
+ * Returns a brighter copy of this color. If k is specified, it controls how much brighter the returned color should be.
145
+ * If k is not specified, it defaults to 1.
146
+ *
147
+ * @param k A color space dependent number to determine, how much brighter the returned color should be.
148
+ */
149
+ brighter(k?: number): this;
150
+ /**
151
+ * Returns a darker copy of this color. If k is specified, it controls how much darker the returned color should be.
152
+ * If k is not specified, it defaults to 1.
153
+ *
154
+ * @param k A color space dependent number to determine, how much darker the returned color should be.
155
+ */
156
+ darker(k?: number): this;
157
+ /**
158
+ * Returns the RGB equivalent of this color.
159
+ */
160
+ rgb(): this;
161
+ /**
162
+ * Returns a copy of this color.
163
+ *
164
+ * @param values If values is specified, any enumerable own properties of values are assigned to the new returned color.
165
+ */
166
+ copy(
167
+ values?: {
168
+ r?: number | undefined;
169
+ g?: number | undefined;
170
+ b?: number | undefined;
171
+ opacity?: number | undefined;
172
+ },
173
+ ): this;
174
+ /**
175
+ * Returns a new RGB color where the r, g, and b channels are clamped to the range [0, 255] and rounded to the nearest integer value,
176
+ * and the opacity is clamped to the range [0, 1].
177
+ */
178
+ clamp(): this;
179
+ }
180
+
181
+ /**
182
+ * An RGB color factory object, which may also be used with instanceof to test if an object
183
+ * is an RGB color instance.
184
+ */
185
+ export interface RGBColorFactory extends Function {
186
+ /**
187
+ * Constructs a new RGB color based on the specified channel values and opacity.
188
+ *
189
+ * @param r Red channel value.
190
+ * @param g Green channel value.
191
+ * @param b Blue channel value.
192
+ * @param opacity Optional opacity value, defaults to 1.
193
+ */
194
+ (r: number, g: number, b: number, opacity?: number): RGBColor;
195
+ /**
196
+ * Parses the specified CSS Color Module Level 3 specifier string, returning an RGB color.
197
+ * If the specifier was not valid, null is returned.
198
+ *
199
+ * @param cssColorSpecifier A CSS Color Module Level 3 specifier string.
200
+ */
201
+ (cssColorSpecifier: string): RGBColor;
202
+ /**
203
+ * Converts the provided color instance and returns an RGB color. The color instance is converted to the RGB color space using color.rgb.
204
+ * Note that unlike color.rgb this method always returns a new instance, even if color is already an RGB color.
205
+ *
206
+ * @param color A permissible color space instance.
207
+ */
208
+ // tslint:disable-next-line:unified-signatures
209
+ (color: ColorSpaceObject | ColorCommonInstance): RGBColor;
210
+ /**
211
+ * Prototype of the factory, which can be used for instanceof testing
212
+ */
213
+ readonly prototype: RGBColor;
214
+ }
215
+
216
+ /**
217
+ * An HSL color object.
218
+ */
219
+ export interface HSLColor extends Color {
220
+ /**
221
+ * Hue channel value.
222
+ */
223
+ h: number;
224
+ /**
225
+ * Saturation channel value.
226
+ */
227
+ s: number;
228
+ /**
229
+ * Lightness channel value.
230
+ */
231
+ l: number;
232
+ /**
233
+ * Opacity value.
234
+ */
235
+ opacity: number;
236
+ /**
237
+ * Returns a brighter copy of this color. If k is specified, it controls how much brighter the returned color should be.
238
+ * If k is not specified, it defaults to 1.
239
+ *
240
+ * @param k A color space dependent number to determine, how much brighter the returned color should be.
241
+ */
242
+ brighter(k?: number): this;
243
+ /**
244
+ * Returns a darker copy of this color. If k is specified, it controls how much darker the returned color should be.
245
+ * If k is not specified, it defaults to 1.
246
+ *
247
+ * @param k A color space dependent number to determine, how much darker the returned color should be.
248
+ */
249
+ darker(k?: number): this;
250
+ /**
251
+ * Returns the RGB color equivalent of this color.
252
+ */
253
+ rgb(): RGBColor;
254
+ /**
255
+ * Returns a copy of this color.
256
+ *
257
+ * @param values If values is specified, any enumerable own properties of values are assigned to the new returned color.
258
+ */
259
+ copy(
260
+ values?: {
261
+ h?: number | undefined;
262
+ s?: number | undefined;
263
+ l?: number | undefined;
264
+ opacity?: number | undefined;
265
+ },
266
+ ): this;
267
+ /**
268
+ * Returns a new HSL color where the h channel is clamped to the range [0, 360), and the s, l, and opacity channels are clamped to the range [0, 1].
269
+ */
270
+ clamp(): this;
271
+ }
272
+
273
+ /**
274
+ * An HSL color factory object, which may also be used with instanceof to test if an object
275
+ * is an HSL color instance.
276
+ */
277
+ export interface HSLColorFactory extends Function {
278
+ /**
279
+ * Constructs a new HSL color based on the specified channel values and opacity.
280
+ *
281
+ * @param h Hue channel value.
282
+ * @param s Saturation channel value.
283
+ * @param l Lightness channel value.
284
+ * @param opacity Optional opacity value, defaults to 1.
285
+ */
286
+ (h: number, s: number, l: number, opacity?: number): HSLColor;
287
+ /**
288
+ * Parses the specified CSS Color Module Level 3 specifier string, returning an HSL color.
289
+ * If the specifier was not valid, null is returned.
290
+ *
291
+ * @param cssColorSpecifier A CSS Color Module Level 3 specifier string.
292
+ */
293
+ (cssColorSpecifier: string): HSLColor;
294
+ /**
295
+ * Converts the provided color instance and returns an HSL color.
296
+ * The color instance is converted to the RGB color space using color.rgb and then converted to HSL.
297
+ * (Colors already in the HSL color space skip the conversion to RGB.)
298
+ *
299
+ * @param color A permissible color space instance.
300
+ */
301
+ // tslint:disable-next-line:unified-signatures
302
+ (color: ColorSpaceObject | ColorCommonInstance): HSLColor;
303
+ /**
304
+ * Prototype of the factory, which can be used for instanceof testing
305
+ */
306
+ readonly prototype: HSLColor;
307
+ }
308
+
309
+ /**
310
+ * A Lab (CIELAB) color object.
311
+ */
312
+ export interface LabColor extends Color {
313
+ /**
314
+ * Lightness typically in the range [0, 100].
315
+ */
316
+ l: number;
317
+ /**
318
+ * Position between red/magenta and green typically in [-160, +160].
319
+ */
320
+ a: number;
321
+ /**
322
+ * Position between yellow and blue typically in [-160, +160].
323
+ */
324
+ b: number;
325
+ /**
326
+ * Opacity value
327
+ */
328
+ opacity: number;
329
+ /**
330
+ * Returns a brighter copy of this color. If k is specified, it controls how much brighter the returned color should be.
331
+ * If k is not specified, it defaults to 1.
332
+ *
333
+ * @param k A color space dependent number to determine, how much brighter the returned color should be.
334
+ */
335
+ brighter(k?: number): this;
336
+ /**
337
+ * Returns a darker copy of this color. If k is specified, it controls how much darker the returned color should be.
338
+ * If k is not specified, it defaults to 1.
339
+ *
340
+ * @param k A color space dependent number to determine, how much darker the returned color should be.
341
+ */
342
+ darker(k?: number): this;
343
+ /**
344
+ * Returns the RGB color equivalent of this color.
345
+ */
346
+ rgb(): RGBColor;
347
+ /**
348
+ * Returns a copy of this color.
349
+ *
350
+ * @param values If values is specified, any enumerable own properties of values are assigned to the new returned color.
351
+ */
352
+ copy(
353
+ values?: {
354
+ l?: number | undefined;
355
+ a?: number | undefined;
356
+ b?: number | undefined;
357
+ opacity?: number | undefined;
358
+ },
359
+ ): this;
360
+ }
361
+
362
+ /**
363
+ * A Lab (CIELAB) color factory object, which may also be used with instanceof to test if an object
364
+ * is a Lab color instance.
365
+ */
366
+ export interface LabColorFactory extends Function {
367
+ /**
368
+ * Constructs a new CIELAB color based on the specified channel values and opacity.
369
+ *
370
+ * @param l Lightness typically in the range [0, 100].
371
+ * @param a Position between red/magenta and green typically in [-160, +160].
372
+ * @param b Position between yellow and blue typically in [-160, +160].
373
+ * @param opacity Optional opacity value, defaults to 1.
374
+ */
375
+ (l: number, a: number, b: number, opacity?: number): LabColor;
376
+ /**
377
+ * Parses the specified CSS Color Module Level 3 specifier string, returning a Lab color.
378
+ * If the specifier was not valid, null is returned.
379
+ *
380
+ * @param cssColorSpecifier A CSS Color Module Level 3 specifier string.
381
+ */
382
+ (cssColorSpecifier: string): LabColor;
383
+ /**
384
+ * Converts the provided color instance and returns a Lab color.
385
+ * The color instance is converted to the RGB color space using color.rgb and then converted to CIELAB.
386
+ * (Colors already in the Lab color space skip the conversion to RGB,
387
+ * and colors in the HCL color space are converted directly to CIELAB.)
388
+ *
389
+ * @param color A permissible color space instance.
390
+ */
391
+ // tslint:disable-next-line:unified-signatures
392
+ (color: ColorSpaceObject | ColorCommonInstance): LabColor;
393
+ /**
394
+ * Prototype of the factory, which can be used for instanceof testing
395
+ */
396
+ readonly prototype: LabColor;
397
+ }
398
+
399
+ /**
400
+ * A gray color factory for Lab (CIELAB) colors.
401
+ */
402
+ export type GrayColorFactory =
403
+ /**
404
+ * Constructs a new CIELAB color with the specified l value and a = b = 0.
405
+ *
406
+ * @param l Lightness typically in the range [0, 100].
407
+ * @param opacity Optional opacity value, defaults to 1.
408
+ */
409
+ (l: number, opacity?: number) => LabColor;
410
+
411
+ /**
412
+ * An HCL (CIELCH) color object.
413
+ */
414
+ export interface HCLColor extends Color {
415
+ /**
416
+ * Hue channel value typically in [0, 360).
417
+ */
418
+ h: number;
419
+ /**
420
+ * Chroma channel value typically in [0, 230].
421
+ */
422
+ c: number;
423
+ /**
424
+ * Luminance channel value typically in the range [0, 100].
425
+ */
426
+ l: number;
427
+ /**
428
+ * Opacity value
429
+ */
430
+ opacity: number;
431
+ /**
432
+ * Returns a brighter copy of this color. If k is specified, it controls how much brighter the returned color should be.
433
+ * If k is not specified, it defaults to 1.
434
+ *
435
+ * @param k A color space dependent number to determine, how much brighter the returned color should be.
436
+ */
437
+ brighter(k?: number): this;
438
+ /**
439
+ * Returns a darker copy of this color. If k is specified, it controls how much darker the returned color should be.
440
+ * If k is not specified, it defaults to 1.
441
+ *
442
+ * @param k A color space dependent number to determine, how much darker the returned color should be.
443
+ */
444
+ darker(k?: number): this;
445
+ /**
446
+ * Returns the RGB color equivalent of this color.
447
+ */
448
+ rgb(): RGBColor;
449
+ /**
450
+ * Returns a copy of this color.
451
+ *
452
+ * @param values If values is specified, any enumerable own properties of values are assigned to the new returned color.
453
+ */
454
+ copy(
455
+ values?: {
456
+ h?: number | undefined;
457
+ c?: number | undefined;
458
+ l?: number | undefined;
459
+ opacity?: number | undefined;
460
+ },
461
+ ): this;
462
+ }
463
+
464
+ /**
465
+ * An HCL (CIELCH) color factory object, which may also be used with instanceof to test if an object
466
+ * is an HCL color instance.
467
+ */
468
+ export interface HCLColorFactory extends Function {
469
+ /**
470
+ * Constructs a new HCL color based on the specified channel values and opacity.
471
+ *
472
+ * @param h Hue channel value typically in [0, 360).
473
+ * @param c Chroma channel value typically in [0, 230].
474
+ * @param l Luminance channel value typically in the range [0, 100].
475
+ * @param opacity Optional opacity value, defaults to 1.
476
+ */
477
+ (h: number, c: number, l: number, opacity?: number): HCLColor;
478
+ /**
479
+ * Parses the specified CSS Color Module Level 3 specifier string, returning an HCL color.
480
+ * If the specifier was not valid, null is returned.
481
+ *
482
+ * @param cssColorSpecifier A CSS Color Module Level 3 specifier string.
483
+ */
484
+ (cssColorSpecifier: string): HCLColor;
485
+ /**
486
+ * Converts the provided color instance and returns an HCL color.
487
+ * The color instance is converted to the RGB color space using color.rgb and then converted to HCL.
488
+ * (Colors already in the HCL color space skip the conversion to RGB,
489
+ * and colors in the Lab color space are converted directly to HCL.)
490
+ *
491
+ * @param color A permissible color space instance.
492
+ */
493
+ // tslint:disable-next-line:unified-signatures
494
+ (color: ColorSpaceObject | ColorCommonInstance): HCLColor;
495
+ /**
496
+ * Prototype of the factory, which can be used for instanceof testing
497
+ */
498
+ readonly prototype: HCLColor;
499
+ }
500
+
501
+ /**
502
+ * An LCH (CIELCH) color factory function to create an HCL color object.
503
+ */
504
+ export interface LCHColorFactory {
505
+ /**
506
+ * Constructs a new HCL color based on the specified channel values and opacity.
507
+ *
508
+ * @param l Luminance channel value typically in the range [0, 100].
509
+ * @param c Chroma channel value typically in [0, 230].
510
+ * @param h Hue channel value typically in [0, 360).
511
+ * @param opacity Optional opacity value, defaults to 1.
512
+ */
513
+ (l: number, c: number, h: number, opacity?: number): HCLColor;
514
+ /**
515
+ * Parses the specified CSS Color Module Level 3 specifier string, returning an HCL color.
516
+ * If the specifier was not valid, null is returned.
517
+ *
518
+ * @param cssColorSpecifier A CSS color Module Level 3 specifier string.
519
+ */
520
+ (cssColorSpecifier: string): HCLColor;
521
+ /**
522
+ * Converts the provided color instance and returns an HCL color.
523
+ * The color instance is converted to the RGB color space using color.rgb and then converted to HCL.
524
+ * (Colors already in the HCL color space skip the conversion to RGB,
525
+ * and colors in the Lab color space are converted directly to HCL.)
526
+ *
527
+ * @param color A permissible color space instance.
528
+ */
529
+ // tslint:disable-next-line:unified-signatures
530
+ (color: ColorSpaceObject | ColorCommonInstance): HCLColor;
531
+ }
532
+
533
+ /**
534
+ * Dave Green’s Cubehelix color object.
535
+ */
536
+ export interface CubehelixColor extends Color {
537
+ /**
538
+ * Hue channel value.
539
+ */
540
+ h: number;
541
+ /**
542
+ * Saturation channel value.
543
+ */
544
+ s: number;
545
+ /**
546
+ * Lightness channel value.
547
+ */
548
+ l: number;
549
+ /**
550
+ * Opacity value.
551
+ */
552
+ opacity: number;
553
+ /**
554
+ * Returns a brighter copy of this color. If k is specified, it controls how much brighter the returned color should be.
555
+ * If k is not specified, it defaults to 1.
556
+ *
557
+ * @param k A color space dependent number to determine, how much brighter the returned color should be.
558
+ */
559
+ brighter(k?: number): this;
560
+ /**
561
+ * Returns a darker copy of this color. If k is specified, it controls how much darker the returned color should be.
562
+ * If k is not specified, it defaults to 1.
563
+ *
564
+ * @param k A color space dependent number to determine, how much darker the returned color should be.
565
+ */
566
+ darker(k?: number): this;
567
+ /**
568
+ * Returns the RGB color equivalent of this color.
569
+ */
570
+ rgb(): RGBColor;
571
+ /**
572
+ * Returns a copy of this color.
573
+ *
574
+ * @param values If values is specified, any enumerable own properties of values are assigned to the new returned color.
575
+ */
576
+ copy(
577
+ values?: {
578
+ h?: number | undefined;
579
+ s?: number | undefined;
580
+ l?: number | undefined;
581
+ opacity?: number | undefined;
582
+ },
583
+ ): this;
584
+ }
585
+
586
+ /**
587
+ * A color factory object for Dave Green's Cubehelix colors, which may also be used with instanceof to test if an object
588
+ * is a Cubehelix color instance.
589
+ */
590
+ export interface CubehelixColorFactory extends Function {
591
+ /**
592
+ * Constructs a new Cubehelix color based on the specified channel values and opacity.
593
+ *
594
+ * @param h Hue channel value.
595
+ * @param s Saturation channel value.
596
+ * @param l Lightness channel value.
597
+ * @param opacity Optional opacity value, defaults to 1.
598
+ */
599
+ (h: number, s: number, l: number, opacity?: number): CubehelixColor;
600
+ /**
601
+ * Parses the specified CSS Color Module Level 3 specifier string, returning an Cubehelix color.
602
+ * If the specifier was not valid, null is returned.
603
+ *
604
+ * @param cssColorSpecifier A CSS Color Module Level 3 specifier string.
605
+ */
606
+ (cssColorSpecifier: string): CubehelixColor;
607
+ /**
608
+ * Converts the provided color instance and returns a Cubehelix color.
609
+ * The color instance is specified, it is converted to the RGB color space using color.rgb and then converted to Cubehelix.
610
+ * (Colors already in the Cubehelix color space skip the conversion to RGB.)
611
+ *
612
+ * @param color A permissible color space instance.
613
+ */
614
+ // tslint:disable-next-line:unified-signatures
615
+ (color: ColorSpaceObject | ColorCommonInstance): CubehelixColor;
616
+ /**
617
+ * Prototype of the factory, which can be used for instanceof testing
618
+ */
619
+ readonly prototype: CubehelixColor;
620
+ }
621
+
622
+ // --------------------------------------------------------------------------
623
+ // Color object factories
624
+ // --------------------------------------------------------------------------
625
+
626
+ /**
627
+ * A Color factory object, which may also be used with instanceof to test if an object is a color instance.
628
+ */
629
+ export const color: ColorFactory;
630
+
631
+ /**
632
+ * An RGB color factory object, which may also be used with instanceof to test if an object
633
+ * is an RGB color instance.
634
+ */
635
+ export const rgb: RGBColorFactory;
636
+
637
+ /**
638
+ * An HSL color factory object, which may also be used with instanceof to test if an object
639
+ * is an HSL color instance.
640
+ */
641
+ export const hsl: HSLColorFactory;
642
+
643
+ /**
644
+ * A Lab (CIELAB) color factory object, which may also be used with instanceof to test if an object
645
+ * is a Lab color instance.
646
+ */
647
+ export const lab: LabColorFactory;
648
+
649
+ /**
650
+ * A gray color factory for Lab (CIELAB) colors.
651
+ */
652
+ export const gray: GrayColorFactory;
653
+
654
+ /**
655
+ * An HCL (CIELCH) color factory object, which may also be used with instanceof to test if an object
656
+ * is an HCL color instance.
657
+ */
658
+ export const hcl: HCLColorFactory;
659
+
660
+ /**
661
+ * An LCH (CIELCH) color factory function to create an HCL color object.
662
+ */
663
+ export const lch: LCHColorFactory;
664
+
665
+ /**
666
+ * A color factory object for Dave Green's Cubehelix colors, which may also be used with instanceof to test if an object
667
+ * is a Cubehelix color instance.
668
+ */
669
+ export const cubehelix: CubehelixColorFactory;
node_modules/@types/d3-color/package.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "@types/d3-color",
3
+ "version": "3.1.3",
4
+ "description": "TypeScript definitions for d3-color",
5
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-color",
6
+ "license": "MIT",
7
+ "contributors": [
8
+ {
9
+ "name": "Tom Wanzek",
10
+ "githubUsername": "tomwanzek",
11
+ "url": "https://github.com/tomwanzek"
12
+ },
13
+ {
14
+ "name": "Alex Ford",
15
+ "githubUsername": "gustavderdrache",
16
+ "url": "https://github.com/gustavderdrache"
17
+ },
18
+ {
19
+ "name": "Boris Yankov",
20
+ "githubUsername": "borisyankov",
21
+ "url": "https://github.com/borisyankov"
22
+ },
23
+ {
24
+ "name": "denisname",
25
+ "githubUsername": "denisname",
26
+ "url": "https://github.com/denisname"
27
+ },
28
+ {
29
+ "name": "Hugues Stefanski",
30
+ "githubUsername": "ledragon",
31
+ "url": "https://github.com/ledragon"
32
+ },
33
+ {
34
+ "name": "Nathan Bierema",
35
+ "githubUsername": "Methuselah96",
36
+ "url": "https://github.com/Methuselah96"
37
+ },
38
+ {
39
+ "name": "Fil",
40
+ "githubUsername": "Fil",
41
+ "url": "https://github.com/Fil"
42
+ }
43
+ ],
44
+ "main": "",
45
+ "types": "index.d.ts",
46
+ "repository": {
47
+ "type": "git",
48
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
49
+ "directory": "types/d3-color"
50
+ },
51
+ "scripts": {},
52
+ "dependencies": {},
53
+ "typesPublisherContentHash": "89cf9357324cddaa31cfb539b1c33d118648ed55319f2a0d26f24b004975a947",
54
+ "typeScriptVersion": "4.5"
55
+ }
node_modules/@types/d3-ease/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
node_modules/@types/d3-ease/README.md ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Installation
2
+ > `npm install --save @types/d3-ease`
3
+
4
+ # Summary
5
+ This package contains type definitions for d3-ease (https://github.com/d3/d3-ease/).
6
+
7
+ # Details
8
+ Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-ease.
9
+
10
+ ### Additional Details
11
+ * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
12
+ * Dependencies: none
13
+
14
+ # Credits
15
+ These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), and [Nathan Bierema](https://github.com/Methuselah96).
node_modules/@types/d3-ease/index.d.ts ADDED
@@ -0,0 +1,316 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Last module patch version validated against: 3.0.1
2
+
3
+ // --------------------------------------------------------------------------
4
+ // Easing Functions
5
+ // --------------------------------------------------------------------------
6
+
7
+ /**
8
+ * Linear easing; the identity function; linear(t) returns t.
9
+ *
10
+ * @param normalizedTime Normalized time typically in the range [0, 1]
11
+ */
12
+ export function easeLinear(normalizedTime: number): number;
13
+
14
+ /**
15
+ * Symmetric quadratic easing; scales quadIn for t in [0, 0.5] and quadOut for t in [0.5, 1]. Also equivalent to poly.exponent(2).
16
+ *
17
+ * @param normalizedTime Normalized time typically in the range [0, 1]
18
+ */
19
+ export function easeQuad(normalizedTime: number): number;
20
+
21
+ /**
22
+ * Quadratic easing; equivalent to polyIn.exponent(2).
23
+ *
24
+ * @param normalizedTime Normalized time typically in the range [0, 1]
25
+ */
26
+ export function easeQuadIn(normalizedTime: number): number;
27
+
28
+ /**
29
+ * Reverse quadratic easing; equivalent to 1 - quadIn(1 - t). Also equivalent to polyOut.exponent(2).
30
+ *
31
+ * @param normalizedTime Normalized time typically in the range [0, 1]
32
+ */
33
+ export function easeQuadOut(normalizedTime: number): number;
34
+
35
+ /**
36
+ * Symmetric quadratic easing; scales quadIn for t in [0, 0.5] and quadOut for t in [0.5, 1]. Also equivalent to poly.exponent(2).
37
+ *
38
+ * @param normalizedTime Normalized time typically in the range [0, 1]
39
+ */
40
+ export function easeQuadInOut(normalizedTime: number): number;
41
+
42
+ /**
43
+ * Symmetric cubic easing; scales cubicIn for t in [0, 0.5] and cubicOut for t in [0.5, 1]. Also equivalent to poly.exponent(3).
44
+ *
45
+ * @param normalizedTime Normalized time typically in the range [0, 1]
46
+ */
47
+ export function easeCubic(normalizedTime: number): number;
48
+
49
+ /**
50
+ * Cubic easing; equivalent to polyIn.exponent(3).
51
+ *
52
+ * @param normalizedTime Normalized time typically in the range [0, 1]
53
+ */
54
+ export function easeCubicIn(normalizedTime: number): number;
55
+
56
+ /**
57
+ * Reverse cubic easing; equivalent to 1 - cubicIn(1 - t). Also equivalent to polyOut.exponent(3).
58
+ *
59
+ * @param normalizedTime Normalized time typically in the range [0, 1]
60
+ */
61
+ export function easeCubicOut(normalizedTime: number): number;
62
+
63
+ /**
64
+ * Symmetric cubic easing; scales cubicIn for t in [0, 0.5] and cubicOut for t in [0.5, 1]. Also equivalent to poly.exponent(3).
65
+ *
66
+ * @param normalizedTime Normalized time typically in the range [0, 1]
67
+ */
68
+ export function easeCubicInOut(normalizedTime: number): number;
69
+
70
+ /**
71
+ * Polynomial easing function factory
72
+ */
73
+ export interface PolynomialEasingFactory {
74
+ /**
75
+ * Calculate eased time.
76
+ * @param normalizedTime Normalized time typically in the range [0, 1]
77
+ */
78
+ (normalizedTime: number): number;
79
+ /**
80
+ * Returns a new polynomial easing with the specified exponent e.
81
+ * If the exponent is not specified, it defaults to 3, equivalent to cubic.
82
+ *
83
+ * @param e Exponent for polynomial easing.
84
+ */
85
+ exponent(e: number): PolynomialEasingFactory;
86
+ }
87
+
88
+ /**
89
+ * Symmetric polynomial easing/easing factory; scales polyIn for t in [0, 0.5] and polyOut for t in [0.5, 1].
90
+ * If the exponent is not specified, it defaults to 3, equivalent to cubic.
91
+ */
92
+ export const easePoly: PolynomialEasingFactory;
93
+ /**
94
+ * Polynomial easing/easing factory; raises t to the specified exponent.
95
+ * If the exponent is not specified, it defaults to 3, equivalent to cubicIn.
96
+ */
97
+ export const easePolyIn: PolynomialEasingFactory;
98
+
99
+ /**
100
+ * Reverse polynomial easing/easing factory; equivalent to 1 - polyIn(1 - t).
101
+ * If the exponent is not specified, it defaults to 3, equivalent to cubicOut.
102
+ */
103
+ export const easePolyOut: PolynomialEasingFactory;
104
+
105
+ /**
106
+ * Symmetric polynomial easing/easing factory; scales polyIn for t in [0, 0.5] and polyOut for t in [0.5, 1].
107
+ * If the exponent is not specified, it defaults to 3, equivalent to cubic.
108
+ */
109
+ export const easePolyInOut: PolynomialEasingFactory;
110
+
111
+ /**
112
+ * Symmetric sinusoidal easing; scales sinIn for t in [0, 0.5] and sinOut for t in [0.5, 1].
113
+ *
114
+ * @param normalizedTime Normalized time typically in the range [0, 1]
115
+ */
116
+ export function easeSin(normalizedTime: number): number;
117
+
118
+ /**
119
+ * Sinusoidal easing; returns sin(t).
120
+ *
121
+ * @param normalizedTime Normalized time typically in the range [0, 1]
122
+ */
123
+ export function easeSinIn(normalizedTime: number): number;
124
+
125
+ /**
126
+ * Reverse sinusoidal easing; equivalent to 1 - sinIn(1 - t).
127
+ *
128
+ * @param normalizedTime Normalized time typically in the range [0, 1]
129
+ */
130
+ export function easeSinOut(normalizedTime: number): number;
131
+
132
+ /**
133
+ * Symmetric sinusoidal easing; scales sinIn for t in [0, 0.5] and sinOut for t in [0.5, 1].
134
+ *
135
+ * @param normalizedTime Normalized time typically in the range [0, 1]
136
+ */
137
+ export function easeSinInOut(normalizedTime: number): number;
138
+
139
+ /**
140
+ * Symmetric exponential easing; scales expIn for t in [0, 0.5] and expOut for t in [0.5, 1].
141
+ *
142
+ * @param normalizedTime Normalized time typically in the range [0, 1]
143
+ */
144
+ export function easeExp(normalizedTime: number): number;
145
+
146
+ /**
147
+ * Exponential easing; raises 2 to the exponent 10 * (t - 1).
148
+ *
149
+ * @param normalizedTime Normalized time typically in the range [0, 1]
150
+ */
151
+ export function easeExpIn(normalizedTime: number): number;
152
+
153
+ /**
154
+ * Reverse exponential easing; equivalent to 1 - expIn(1 - t).
155
+ *
156
+ * @param normalizedTime Normalized time typically in the range [0, 1]
157
+ */
158
+ export function easeExpOut(normalizedTime: number): number;
159
+
160
+ /**
161
+ * Symmetric exponential easing; scales expIn for t in [0, 0.5] and expOut for t in [0.5, 1].
162
+ *
163
+ * @param normalizedTime Normalized time typically in the range [0, 1]
164
+ */
165
+ export function easeExpInOut(normalizedTime: number): number;
166
+
167
+ /**
168
+ * Symmetric circular easing; scales circleIn for t in [0, 0.5] and circleOut for t in [0.5, 1].
169
+ *
170
+ * @param normalizedTime Normalized time typically in the range [0, 1]
171
+ */
172
+ export function easeCircle(normalizedTime: number): number;
173
+
174
+ /**
175
+ * Circular easing.
176
+ *
177
+ * @param normalizedTime Normalized time typically in the range [0, 1]
178
+ */
179
+ export function easeCircleIn(normalizedTime: number): number;
180
+
181
+ /**
182
+ * Reverse circular easing; equivalent to 1 - circleIn(1 - t).
183
+ *
184
+ * @param normalizedTime Normalized time typically in the range [0, 1]
185
+ */
186
+ export function easeCircleOut(normalizedTime: number): number;
187
+
188
+ /**
189
+ * Symmetric circular easing; scales circleIn for t in [0, 0.5] and circleOut for t in [0.5, 1].
190
+ *
191
+ * @param normalizedTime Normalized time typically in the range [0, 1]
192
+ */
193
+ export function easeCircleInOut(normalizedTime: number): number;
194
+
195
+ /**
196
+ * Reverse bounce easing; equivalent to 1 - bounceIn(1 - t).
197
+ *
198
+ * @param normalizedTime Normalized time typically in the range [0, 1]
199
+ */
200
+ export function easeBounce(normalizedTime: number): number;
201
+
202
+ /**
203
+ * Bounce easing, like a rubber ball.
204
+ *
205
+ * @param normalizedTime Normalized time typically in the range [0, 1]
206
+ */
207
+ export function easeBounceIn(normalizedTime: number): number;
208
+
209
+ /**
210
+ * Reverse bounce easing; equivalent to 1 - bounceIn(1 - t).
211
+ *
212
+ * @param normalizedTime Normalized time typically in the range [0, 1]
213
+ */
214
+ export function easeBounceOut(normalizedTime: number): number;
215
+
216
+ /**
217
+ * Symmetric bounce easing; scales bounceIn for t in [0, 0.5] and bounceOut for t in [0.5, 1].
218
+ *
219
+ * @param normalizedTime Normalized time typically in the range [0, 1]
220
+ */
221
+ export function easeBounceInOut(normalizedTime: number): number;
222
+
223
+ /**
224
+ * Anticipatory easing function factory
225
+ */
226
+ export interface BackEasingFactory {
227
+ /**
228
+ * Calculate eased time.
229
+ * @param normalizedTime Normalized time typically in the range [0, 1]
230
+ */
231
+ (normalizedTime: number): number;
232
+ /**
233
+ * Returns a new back easing with the specified overshoot s.
234
+ * The degree of overshoot is configurable; if not specified, it defaults to 1.70158.
235
+ *
236
+ * @param s Overshoot parameter
237
+ */
238
+ overshoot(s: number): BackEasingFactory;
239
+ }
240
+
241
+ /**
242
+ * Symmetric anticipatory easing; scales backIn for t in [0, 0.5] and backOut for t in [0.5, 1].
243
+ * The degree of overshoot is configurable; it not specified, it defaults to 1.70158.
244
+ */
245
+ export const easeBack: BackEasingFactory;
246
+
247
+ /**
248
+ * Anticipatory easing, like a dancer bending their knees before jumping off the floor.
249
+ * The degree of overshoot is configurable; it not specified, it defaults to 1.70158.
250
+ */
251
+ export const easeBackIn: BackEasingFactory;
252
+
253
+ /**
254
+ * Reverse anticipatory easing; equivalent to 1 - backIn(1 - t).
255
+ * The degree of overshoot is configurable; it not specified, it defaults to 1.70158.
256
+ */
257
+ export const easeBackOut: BackEasingFactory;
258
+
259
+ /**
260
+ * Symmetric anticipatory easing; scales backIn for t in [0, 0.5] and backOut for t in [0.5, 1].
261
+ * The degree of overshoot is configurable; it not specified, it defaults to 1.70158.
262
+ */
263
+ export const easeBackInOut: BackEasingFactory;
264
+
265
+ /**
266
+ * Elastic easing function factory
267
+ */
268
+ export interface ElasticEasingFactory {
269
+ /**
270
+ * Calculate eased time.
271
+ * @param normalizedTime Normalized time typically in the range [0, 1]
272
+ */
273
+ (normalizedTime: number): number;
274
+ /**
275
+ * Returns a new elastic easing with the specified amplitude a.
276
+ * Defaults to 1,if not specified.
277
+ *
278
+ * @param a Amplitude for elastic easing.
279
+ */
280
+ amplitude(a: number): ElasticEasingFactory;
281
+ /**
282
+ * Returns a new elastic easing with the specified amplitude a.
283
+ * Defaults to 0.3,if not specified.
284
+ *
285
+ * @param p Period for elastic easing.
286
+ */
287
+ period(p: number): ElasticEasingFactory;
288
+ }
289
+
290
+ /**
291
+ * Reverse elastic easing; equivalent to 1 - elasticIn(1 - t).
292
+ * The amplitude and period of the oscillation are configurable;
293
+ * if not specified, they default to 1 and 0.3, respectively.
294
+ */
295
+ export const easeElastic: ElasticEasingFactory;
296
+
297
+ /**
298
+ * Elastic easing, like a rubber band.
299
+ * The amplitude and period of the oscillation are configurable;
300
+ * if not specified, they default to 1 and 0.3, respectively.
301
+ */
302
+ export const easeElasticIn: ElasticEasingFactory;
303
+
304
+ /**
305
+ * Reverse elastic easing; equivalent to 1 - elasticIn(1 - t).
306
+ * The amplitude and period of the oscillation are configurable;
307
+ * if not specified, they default to 1 and 0.3, respectively.
308
+ */
309
+ export const easeElasticOut: ElasticEasingFactory;
310
+
311
+ /**
312
+ * Symmetric elastic easing; scales elasticIn for t in [0, 0.5] and elasticOut for t in [0.5, 1].
313
+ * The amplitude and period of the oscillation are configurable;
314
+ * if not specified, they default to 1 and 0.3, respectively.
315
+ */
316
+ export const easeElasticInOut: ElasticEasingFactory;
node_modules/@types/d3-ease/package.json ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "@types/d3-ease",
3
+ "version": "3.0.2",
4
+ "description": "TypeScript definitions for d3-ease",
5
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-ease",
6
+ "license": "MIT",
7
+ "contributors": [
8
+ {
9
+ "name": "Tom Wanzek",
10
+ "githubUsername": "tomwanzek",
11
+ "url": "https://github.com/tomwanzek"
12
+ },
13
+ {
14
+ "name": "Alex Ford",
15
+ "githubUsername": "gustavderdrache",
16
+ "url": "https://github.com/gustavderdrache"
17
+ },
18
+ {
19
+ "name": "Boris Yankov",
20
+ "githubUsername": "borisyankov",
21
+ "url": "https://github.com/borisyankov"
22
+ },
23
+ {
24
+ "name": "Nathan Bierema",
25
+ "githubUsername": "Methuselah96",
26
+ "url": "https://github.com/Methuselah96"
27
+ }
28
+ ],
29
+ "main": "",
30
+ "types": "index.d.ts",
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
34
+ "directory": "types/d3-ease"
35
+ },
36
+ "scripts": {},
37
+ "dependencies": {},
38
+ "typesPublisherContentHash": "2995c518f8de4fa6f2abb2f13065cb4fe65acaea9422f9883b24414ef50cd1ab",
39
+ "typeScriptVersion": "4.5"
40
+ }
node_modules/@types/d3-interpolate/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
node_modules/@types/d3-interpolate/README.md ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Installation
2
+ > `npm install --save @types/d3-interpolate`
3
+
4
+ # Summary
5
+ This package contains type definitions for d3-interpolate (https://github.com/d3/d3-interpolate/).
6
+
7
+ # Details
8
+ Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-interpolate.
9
+
10
+ ### Additional Details
11
+ * Last updated: Tue, 07 Nov 2023 15:11:37 GMT
12
+ * Dependencies: [@types/d3-color](https://npmjs.com/package/@types/d3-color)
13
+
14
+ # Credits
15
+ These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), and [Nathan Bierema](https://github.com/Methuselah96).
node_modules/@types/d3-interpolate/index.d.ts ADDED
@@ -0,0 +1,387 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Last module patch version validated against: 3.0.1
2
+
3
+ import { ColorCommonInstance } from "d3-color";
4
+
5
+ // ---------------------------------------------------------------------------
6
+ // Shared Type Definitions and Interfaces
7
+ // ---------------------------------------------------------------------------
8
+
9
+ export interface ZoomInterpolator extends Function {
10
+ (t: number): ZoomView;
11
+ /**
12
+ * Recommended duration of zoom transition in milliseconds.
13
+ */
14
+ duration: number;
15
+
16
+ /**
17
+ * Given a zoom interpolator, returns a new zoom interpolator using the specified curvature rho.
18
+ * When rho is close to 0, the interpolator is almost linear.
19
+ * The default curvature is sqrt(2).
20
+ * @param rho
21
+ */
22
+ rho(rho: number): this;
23
+ }
24
+
25
+ export interface ColorGammaInterpolationFactory extends Function {
26
+ (a: string | ColorCommonInstance, b: string | ColorCommonInstance): (t: number) => string;
27
+ /**
28
+ * Returns a new interpolator factory of the same type using the specified *gamma*.
29
+ * For example, to interpolate from purple to orange with a gamma of 2.2 in RGB space: `d3.interpolateRgb.gamma(2.2)("purple", "orange")`.
30
+ * See Eric Brasseur’s article, [Gamma error in picture scaling](https://web.archive.org/web/20160112115812/http://www.4p8.com/eric.brasseur/gamma.html), for more on gamma correction.
31
+ */
32
+ gamma(g: number): ColorGammaInterpolationFactory;
33
+ }
34
+
35
+ /**
36
+ * Type zoomView is used to represent a numeric array with three elements.
37
+ * In order of appearance the elements correspond to:
38
+ * - cx: *x*-coordinate of the center of the viewport
39
+ * - cy: *y*-coordinate of the center of the viewport
40
+ * - width: size of the viewport
41
+ */
42
+ export type ZoomView = [number, number, number];
43
+
44
+ export type TypedArray =
45
+ | Int8Array
46
+ | Uint8Array
47
+ | Int16Array
48
+ | Uint16Array
49
+ | Int32Array
50
+ | Uint32Array
51
+ | Uint8ClampedArray
52
+ | Float32Array
53
+ | Float64Array;
54
+
55
+ export type NumberArray = TypedArray | DataView;
56
+
57
+ // ---------------------------------------------------------------------------
58
+ // Interpolation Function Factories
59
+ // ---------------------------------------------------------------------------
60
+
61
+ /**
62
+ * Returns an `null` constant interpolator.
63
+ */
64
+ export function interpolate(a: any, b: null): (t: number) => null;
65
+ /**
66
+ * Returns an boolean constant interpolator of value `b`.
67
+ */
68
+ export function interpolate(a: any, b: boolean): (t: number) => boolean;
69
+ /**
70
+ * Returns a `interpolateRgb` interpolator.
71
+ */
72
+ export function interpolate(a: string | ColorCommonInstance, b: ColorCommonInstance): (t: number) => string;
73
+ /**
74
+ * Returns a `interpolateDate` interpolator.
75
+ */
76
+ export function interpolate(a: Date, b: Date): (t: number) => Date;
77
+ /**
78
+ * Returns a `interpolateNumber` interpolator.
79
+ */
80
+ export function interpolate(
81
+ a: number | { valueOf(): number },
82
+ b: number | { valueOf(): number },
83
+ ): (t: number) => number;
84
+ /**
85
+ * Returns a `interpolateNumberArray` interpolator.
86
+ */
87
+ export function interpolate<T extends NumberArray>(a: NumberArray | number[], b: T): (t: number) => T;
88
+ /**
89
+ * Returns a `interpolateString` interpolator. If `b` is a string coercible to a color use use `interpolateRgb`.
90
+ */
91
+ export function interpolate(a: string | { toString(): string }, b: string): (t: number) => string;
92
+ /**
93
+ * Returns a `interpolateArray` interpolator.
94
+ */
95
+ export function interpolate<U extends any[]>(a: any[], b: U): (t: number) => U;
96
+ /**
97
+ * Returns a `interpolateObject` interpolator.
98
+ */
99
+ export function interpolate<U extends object>(a: any, b: U): (t: number) => U;
100
+
101
+ /**
102
+ * Returns an interpolator between the two numbers `a` and `b`.
103
+ * The returned interpolator is equivalent to: `(t) => a * (1 - t) + b * t`.
104
+ */
105
+ export function interpolateNumber(
106
+ a: number | { valueOf(): number },
107
+ b: number | { valueOf(): number },
108
+ ): (t: number) => number;
109
+
110
+ /**
111
+ * Returns an interpolator between the two numbers `a` and `b`; the interpolator is similar to `interpolateNumber`,
112
+ * except it will round the resulting value to the nearest integer.
113
+ */
114
+ export function interpolateRound(
115
+ a: number | { valueOf(): number },
116
+ b: number | { valueOf(): number },
117
+ ): (t: number) => number;
118
+
119
+ /**
120
+ * Returns an interpolator between the two strings `a` and `b`.
121
+ * The string interpolator finds numbers embedded in `a` and `b`, where each number is of the form understood by JavaScript.
122
+ * A few examples of numbers that will be detected within a string: `-1`, `42`, `3.14159`, and `6.0221413e+23`.
123
+ *
124
+ * For each number embedded in `b`, the interpolator will attempt to find a corresponding number in `a`.
125
+ * If a corresponding number is found, a numeric interpolator is created using `interpolateNumber`.
126
+ * The remaining parts of the string `b` are used as a template.
127
+ *
128
+ * For example, if `a` is `"300 12px sans-serif"`, and `b` is `"500 36px Comic-Sans"`, two embedded numbers are found.
129
+ * The remaining static parts (of string `b`) are a space between the two numbers (`" "`), and the suffix (`"px Comic-Sans"`).
130
+ * The result of the interpolator at `t` = 0.5 is `"400 24px Comic-Sans"`.
131
+ */
132
+ export function interpolateString(
133
+ a: string | { toString(): string },
134
+ b: string | { toString(): string },
135
+ ): (t: number) => string;
136
+
137
+ /**
138
+ * Returns an interpolator between the two dates `a` and `b`.
139
+ *
140
+ * Note: *no defensive copy* of the returned date is created; the same Date instance is returned for every evaluation of the interpolator.
141
+ * No copy is made for performance reasons; interpolators are often part of the inner loop of animated transitions.
142
+ */
143
+ export function interpolateDate(a: Date, b: Date): (t: number) => Date;
144
+
145
+ export type ArrayInterpolator<A extends any[]> = (t: number) => A;
146
+
147
+ /**
148
+ * Returns an interpolator between the two arrays `a` and `b`. Internally, an array template is created that is the same length in `b`.
149
+ * For each element in `b`, if there exists a corresponding element in `a`, a generic interpolator is created for the two elements using `interpolate`.
150
+ * If there is no such element, the static value from `b` is used in the template.
151
+ * Then, for the given parameter `t`, the template’s embedded interpolators are evaluated. The updated array template is then returned.
152
+ *
153
+ * For example, if `a` is the array `[0, 1]` and `b` is the array `[1, 10, 100]`, then the result of the interpolator for `t = 0.5` is the array `[0.5, 5.5, 100]`.
154
+ *
155
+ * Note: *no defensive copy* of the template array is created; modifications of the returned array may adversely affect subsequent evaluation of the interpolator.
156
+ * No copy is made for performance reasons; interpolators are often part of the inner loop of animated transitions.
157
+ */
158
+ export function interpolateArray<A extends any[]>(a: any[], b: A): ArrayInterpolator<A>;
159
+ /**
160
+ * interpolateNumberArray is called
161
+ */
162
+ export function interpolateArray<T extends NumberArray>(a: NumberArray | number[], b: T): (t: number) => T;
163
+
164
+ /**
165
+ * Returns an interpolator between the two arrays of numbers a and b.
166
+ * Internally, an array template is created that is the same type and length as b.
167
+ * For each element in b, if there exists a corresponding element in a, the values are directly interpolated in the array template.
168
+ * If there is no such element, the static value from b is copied.
169
+ * The updated array template is then returned.
170
+ *
171
+ * Note: For performance reasons, no defensive copy is made of the template array and the arguments a and b; modifications of these arrays may affect subsequent evaluation of the interpolator.
172
+ */
173
+ export function interpolateNumberArray<T extends NumberArray | number[]>(
174
+ a: NumberArray | number[],
175
+ b: T,
176
+ ): (t: number) => T;
177
+
178
+ /**
179
+ * Returns an interpolator between the two objects `a` and `b`. Internally, an object template is created that has the same properties as `b`.
180
+ * For each property in `b`, if there exists a corresponding property in `a`, a generic interpolator is created for the two elements using `interpolate`.
181
+ * If there is no such property, the static value from `b` is used in the template.
182
+ * Then, for the given parameter `t`, the template's embedded interpolators are evaluated and the updated object template is then returned.
183
+ *
184
+ * For example, if `a` is the object `{x: 0, y: 1}` and `b` is the object `{x: 1, y: 10, z: 100}`, the result of the interpolator for `t = 0.5` is the object `{x: 0.5, y: 5.5, z: 100}`.
185
+ *
186
+ * Note: *no defensive copy* of the template object is created; modifications of the returned object may adversely affect subsequent evaluation of the interpolator.
187
+ * No copy is made for performance reasons; interpolators are often part of the inner loop of animated transitions.
188
+ */
189
+ export function interpolateObject<U extends object>(a: any, b: U): (t: number) => U;
190
+
191
+ /**
192
+ * Returns an interpolator between the two 2D CSS transforms represented by `a` and `b`.
193
+ * Each transform is decomposed to a standard representation of translate, rotate, *x*-skew and scale; these component transformations are then interpolated.
194
+ * This behavior is standardized by CSS: see [matrix decomposition for animation](http://www.w3.org/TR/css3-2d-transforms/#matrix-decomposition).
195
+ */
196
+ export function interpolateTransformCss(a: string, b: string): (t: number) => string;
197
+
198
+ /**
199
+ * Returns an interpolator between the two 2D SVG transforms represented by `a` and `b`.
200
+ * Each transform is decomposed to a standard representation of translate, rotate, *x*-skew and scale; these component transformations are then interpolated.
201
+ * This behavior is standardized by CSS: see [matrix decomposition for animation](http://www.w3.org/TR/css3-2d-transforms/#matrix-decomposition).
202
+ */
203
+ export function interpolateTransformSvg(a: string, b: string): (t: number) => string;
204
+
205
+ /**
206
+ * Returns an interpolator between the two views `a` and `b` of a two-dimensional plane,
207
+ * based on [“Smooth and efficient zooming and panning”](http://www.win.tue.nl/~vanwijk/zoompan.pdf).
208
+ * Each view is defined as an array of three numbers: *cx*, *cy* and *width*.
209
+ * The first two coordinates *cx*, *cy* represent the center of the viewport; the last coordinate *width* represents the size of the viewport.
210
+ *
211
+ * The returned interpolator exposes a *duration* property which encodes the recommended transition duration in milliseconds.
212
+ * This duration is based on the path length of the curved trajectory through *x,y* space.
213
+ * If you want to a slower or faster transition, multiply this by an arbitrary scale factor (*V* as described in the original paper).
214
+ */
215
+ export function interpolateZoom(a: ZoomView, b: ZoomView): ZoomInterpolator;
216
+
217
+ /**
218
+ * Returns a discrete interpolator for the given array of values. The returned interpolator maps `t` in `[0, 1 / n)` to values[0],
219
+ * `t` in `[1 / n, 2 / n)` to `values[1]`, and so on, where `n = values.length`. In effect, this is a lightweight quantize scale with a fixed domain of [0, 1].
220
+ */
221
+ export function interpolateDiscrete<T>(values: T[]): (t: number) => T;
222
+
223
+ // Sampling ------------------------------------------------------------------
224
+
225
+ /**
226
+ * Returns `n` uniformly-spaced samples from the specified `interpolator`, where `n` is an integer greater than one.
227
+ * The first sample is always at `t = 0`, and the last sample is always at `t = 1`.
228
+ * This can be useful in generating a fixed number of samples from a given interpolator,
229
+ * such as to derive the range of a [quantize scale](https://github.com/d3/d3-scale#quantize-scales) from a [continuous interpolator](https://github.com/d3/d3-scale#interpolateWarm).
230
+ *
231
+ * Caution: this method will not work with interpolators that do not return defensive copies of their output,
232
+ * such as `d3.interpolateArray`, `d3.interpolateDate` and `d3.interpolateObject`. For those interpolators, you must wrap the interpolator and create a copy for each returned value.
233
+ */
234
+ export function quantize<T>(interpolator: (t: number) => T, n: number): T[];
235
+
236
+ // Color Spaces
237
+
238
+ /**
239
+ * Returns an RGB color space interpolator between the two colors `a` and `b` with a configurable gamma. If the gamma is not specified, it defaults to 1.0.
240
+ * The colors `a` and `b` need not be in RGB; they will be converted to RGB using [`d3.rgb`](https://github.com/d3/d3-color#rgb). The return value of the interpolator is an RGB string.
241
+ */
242
+ export const interpolateRgb: ColorGammaInterpolationFactory;
243
+
244
+ /**
245
+ * Returns a uniform nonrational B-spline interpolator through the specified array of *colors*, which are converted to RGB color space.
246
+ * Implicit control points are generated such that the interpolator returns `colors[0]` at `t = 0` and `colors[colors.length - 1]` at `t = 1`.
247
+ * Opacity interpolation is not currently supported. See also `d3.interpolateBasis`, and see [d3-scale-chromatic](https://github.com/d3/d3-scale-chromatic) for examples.
248
+ */
249
+ export function interpolateRgbBasis(colors: Array<string | ColorCommonInstance>): (t: number) => string;
250
+
251
+ /**
252
+ * Returns a uniform nonrational B-spline interpolator through the specified array of colors, which are converted to RGB color space.
253
+ * The control points are implicitly repeated such that the resulting spline has cyclical C² continuity when repeated around `t` in [0,1];
254
+ * this is useful, for example, to create cyclical color scales. Opacity interpolation is not currently supported.
255
+ * See also `d3.interpolateBasisClosed, and see [d3-scale-chromatic](https://github.com/d3/d3-scale-chromatic) for examples.
256
+ */
257
+ export function interpolateRgbBasisClosed(colors: Array<string | ColorCommonInstance>): (t: number) => string;
258
+
259
+ /**
260
+ * Returns an HSL color space interpolator between the two colors *a* and *b*. The colors *a* and *b* need not be in HSL;
261
+ * they will be converted to HSL using `d3.hsl`. If either color’s hue or saturation is NaN, the opposing color’s channel value is used.
262
+ * The shortest path between hues is used. The return value of the interpolator is an RGB string.
263
+ */
264
+ export function interpolateHsl(a: string | ColorCommonInstance, b: string | ColorCommonInstance): (t: number) => string;
265
+
266
+ /**
267
+ * Like `interpolateHsl`, but does not use the shortest path between hues.
268
+ */
269
+ export function interpolateHslLong(
270
+ a: string | ColorCommonInstance,
271
+ b: string | ColorCommonInstance,
272
+ ): (t: number) => string;
273
+
274
+ /**
275
+ * Returns a Lab color space interpolator between the two colors *a* and *b*. The colors *a* and *b* need not be in Lab;
276
+ * they will be converted to Lab using `d3.lab`. The return value of the interpolator is an RGB string.
277
+ */
278
+ export function interpolateLab(a: string | ColorCommonInstance, b: string | ColorCommonInstance): (t: number) => string;
279
+
280
+ /**
281
+ * Returns an HCL color space interpolator between the two colors `a` and `b`. The colors `a` and `b` need not be in HCL;
282
+ * they will be converted to HCL using `d3.hcl`. If either color’s hue or chroma is NaN, the opposing color’s channel value is used.
283
+ * The shortest path between hues is used. The return value of the interpolator is an RGB string.
284
+ */
285
+ export function interpolateHcl(a: string | ColorCommonInstance, b: string | ColorCommonInstance): (t: number) => string;
286
+
287
+ /**
288
+ * Like `interpolateHcl`, but does not use the shortest path between hues.
289
+ */
290
+ export function interpolateHclLong(
291
+ a: string | ColorCommonInstance,
292
+ b: string | ColorCommonInstance,
293
+ ): (t: number) => string;
294
+
295
+ /**
296
+ * Returns a Cubehelix color space interpolator between the two colors `a` and `b` using a configurable `gamma`.
297
+ * If the gamma is not specified, it defaults to 1.0. The colors `a` and `b` need not be in Cubehelix;
298
+ * they will be converted to Cubehelix using [`d3.cubehelix`](https://github.com/d3/d3-color#cubehelix).
299
+ * If either color’s hue or saturation is NaN, the opposing color’s channel value is used. The shortest path between hues is used. The return value of the interpolator is an RGB string.
300
+ */
301
+ export const interpolateCubehelix: ColorGammaInterpolationFactory;
302
+
303
+ /**
304
+ * Like `interpolateCubehelix`, but does not use the shortest path between hues.
305
+ */
306
+ export const interpolateCubehelixLong: ColorGammaInterpolationFactory;
307
+
308
+ /**
309
+ * Returns an interpolator between the two hue angles `a` and `b`. If either hue is NaN, the opposing value is used.
310
+ * The shortest path between hues is used. The return value of the interpolator is a number in `[0, 360)`.
311
+ */
312
+ export function interpolateHue(a: number, b: number): (t: number) => number;
313
+
314
+ // Splines -------------------------------------------------------------------
315
+
316
+ /**
317
+ * Returns a uniform nonrational B-spline interpolator through the specified array of `values`, which must be numbers.
318
+ * Implicit control points are generated such that the interpolator returns `values[0]` at `t` = 0 and `values[values.length - 1]` at `t` = 1.
319
+ * See also [`d3.curveBasis`](https://github.com/d3/d3-shape#curveBasis).
320
+ */
321
+ export function interpolateBasis(splineNodes: number[]): (t: number) => number;
322
+
323
+ /**
324
+ * Returns a uniform nonrational B-spline interpolator through the specified array of `values`, which must be numbers.
325
+ * The control points are implicitly repeated such that the resulting one-dimensional spline has cyclical C² continuity when repeated around `t` in [0,1].
326
+ * See also [`d3.curveBasisClosed`](https://github.com/d3/d3-shape#curveBasisClosed).
327
+ */
328
+ export function interpolateBasisClosed(splineNodes: number[]): (t: number) => number;
329
+
330
+ // Piecewise -----------------------------------------------------------------
331
+
332
+ /**
333
+ * Returns a piecewise zoom interpolator, composing zoom interpolators for each adjacent pair of zoom view.
334
+ * The returned interpolator maps `t` in `[0, 1 / (n - 1)]` to `interpolate(values[0], values[1])`, `t` in `[1 / (n - 1), 2 / (n - 1)]` to `interpolate(values[1], values[2])`,
335
+ * and so on, where `n = values.length`. In effect, this is a lightweight linear scale.
336
+ * For example, to blend through three different zoom views: `d3.piecewise(d3.interpolateZoom, [[0, 0, 1], [0, 0, 10], [0, 0, 15]])`.
337
+ *
338
+ * interpolate defaults to d3.interpolate.
339
+ */
340
+ export function piecewise(values: ZoomView[]): ZoomInterpolator;
341
+ /**
342
+ * Returns a piecewise zoom interpolator, composing zoom interpolators for each adjacent pair of zoom view.
343
+ * The returned interpolator maps `t` in `[0, 1 / (n - 1)]` to `interpolate(values[0], values[1])`, `t` in `[1 / (n - 1), 2 / (n - 1)]` to `interpolate(values[1], values[2])`,
344
+ * and so on, where `n = values.length`. In effect, this is a lightweight linear scale.
345
+ * For example, to blend through three different zoom views: `d3.piecewise(d3.interpolateZoom, [[0, 0, 1], [0, 0, 10], [0, 0, 15]])`.
346
+ */
347
+ export function piecewise(
348
+ interpolate: (a: ZoomView, b: ZoomView) => ZoomInterpolator,
349
+ values: ZoomView[],
350
+ ): ZoomInterpolator;
351
+
352
+ /**
353
+ * Returns a piecewise array interpolator, composing array interpolators for each adjacent pair of arrays.
354
+ * The returned interpolator maps `t` in `[0, 1 / (n - 1)]` to `interpolate(values[0], values[1])`, `t` in `[1 / (n - 1), 2 / (n - 1)]` to `interpolate(values[1], values[2])`,
355
+ * and so on, where `n = values.length`. In effect, this is a lightweight linear scale.
356
+ * For example, to blend through three different arrays: `d3.piecewise(d3.interpolateArray, [[0, 0, 1], [0, 0, 10], [0, 0, 15]])`.
357
+ *
358
+ * interpolate defaults to d3.interpolate.
359
+ */
360
+ export function piecewise<A extends any[]>(values: A[]): ArrayInterpolator<A>;
361
+ /**
362
+ * Returns a piecewise array interpolator, composing array interpolators for each adjacent pair of arrays.
363
+ * The returned interpolator maps `t` in `[0, 1 / (n - 1)]` to `interpolate(values[0], values[1])`, `t` in `[1 / (n - 1), 2 / (n - 1)]` to `interpolate(values[1], values[2])`,
364
+ * and so on, where `n = values.length`. In effect, this is a lightweight linear scale.
365
+ * For example, to blend through three different arrays: `d3.piecewise(d3.interpolateArray, [[0, 0, 1], [0, 0, 10], [0, 0, 15]])`.
366
+ */
367
+ export function piecewise<A extends any[]>(
368
+ interpolate: (a: any[], b: A) => ArrayInterpolator<A>,
369
+ values: A[],
370
+ ): ArrayInterpolator<A>;
371
+
372
+ /**
373
+ * Returns a piecewise interpolator, composing interpolators for each adjacent pair of values.
374
+ * The returned interpolator maps `t` in `[0, 1 / (n - 1)]` to `interpolate(values[0], values[1])`, `t` in `[1 / (n - 1), 2 / (n - 1)]` to `interpolate(values[1], values[2])`,
375
+ * and so on, where `n = values.length`. In effect, this is a lightweight linear scale.
376
+ * For example, to blend through red, green and blue: `d3.piecewise(d3.interpolateRgb.gamma(2.2), ["red", "green", "blue"])`.
377
+ *
378
+ * interpolate defaults to d3.interpolate.
379
+ */
380
+ export function piecewise(values: unknown[]): (t: number) => any;
381
+ /**
382
+ * Returns a piecewise interpolator, composing interpolators for each adjacent pair of values.
383
+ * The returned interpolator maps `t` in `[0, 1 / (n - 1)]` to `interpolate(values[0], values[1])`, `t` in `[1 / (n - 1), 2 / (n - 1)]` to `interpolate(values[1], values[2])`,
384
+ * and so on, where `n = values.length`. In effect, this is a lightweight linear scale.
385
+ * For example, to blend through red, green and blue: `d3.piecewise(d3.interpolateRgb.gamma(2.2), ["red", "green", "blue"])`.
386
+ */
387
+ export function piecewise<TData>(interpolate: (a: TData, b: TData) => unknown, values: TData[]): (t: number) => any;
node_modules/@types/d3-interpolate/package.json ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "@types/d3-interpolate",
3
+ "version": "3.0.4",
4
+ "description": "TypeScript definitions for d3-interpolate",
5
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-interpolate",
6
+ "license": "MIT",
7
+ "contributors": [
8
+ {
9
+ "name": "Tom Wanzek",
10
+ "githubUsername": "tomwanzek",
11
+ "url": "https://github.com/tomwanzek"
12
+ },
13
+ {
14
+ "name": "Alex Ford",
15
+ "githubUsername": "gustavderdrache",
16
+ "url": "https://github.com/gustavderdrache"
17
+ },
18
+ {
19
+ "name": "Boris Yankov",
20
+ "githubUsername": "borisyankov",
21
+ "url": "https://github.com/borisyankov"
22
+ },
23
+ {
24
+ "name": "denisname",
25
+ "githubUsername": "denisname",
26
+ "url": "https://github.com/denisname"
27
+ },
28
+ {
29
+ "name": "Nathan Bierema",
30
+ "githubUsername": "Methuselah96",
31
+ "url": "https://github.com/Methuselah96"
32
+ }
33
+ ],
34
+ "main": "",
35
+ "types": "index.d.ts",
36
+ "repository": {
37
+ "type": "git",
38
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
39
+ "directory": "types/d3-interpolate"
40
+ },
41
+ "scripts": {},
42
+ "dependencies": {
43
+ "@types/d3-color": "*"
44
+ },
45
+ "typesPublisherContentHash": "d315fc677144695b44f1447ef7429c9ff248886716c2e9f742d031abcb319115",
46
+ "typeScriptVersion": "4.5"
47
+ }
node_modules/@types/d3-path/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
node_modules/@types/d3-path/README.md ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Installation
2
+ > `npm install --save @types/d3-path`
3
+
4
+ # Summary
5
+ This package contains type definitions for d3-path (https://github.com/d3/d3-path/).
6
+
7
+ # Details
8
+ Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-path.
9
+
10
+ ### Additional Details
11
+ * Last updated: Tue, 04 Feb 2025 22:02:37 GMT
12
+ * Dependencies: none
13
+
14
+ # Credits
15
+ These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), and [Nathan Bierema](https://github.com/Methuselah96).
node_modules/@types/d3-path/index.d.ts ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Last module patch version validated against: 3.1.0
2
+
3
+ /**
4
+ * A D3 path serializer implementing CanvasPathMethods
5
+ */
6
+ export interface Path {
7
+ /**
8
+ * Move to the specified point ⟨x, y⟩. Equivalent to context.moveTo and SVG’s “moveto” command.
9
+ *
10
+ * @param x x-Coordinate of point to move to
11
+ * @param y y-Coordinate of point to move to
12
+ */
13
+ moveTo(x: number, y: number): void;
14
+
15
+ /**
16
+ * Ends the current subpath and causes an automatic straight line to be drawn from the current point to the initial point of the current subpath.
17
+ * Equivalent to context.closePath and SVG’s “closepath” command.
18
+ */
19
+ closePath(): void;
20
+
21
+ /**
22
+ * Draws a straight line from the current point to the specified point ⟨x, y⟩.
23
+ * Equivalent to context.lineTo and SVG’s “lineto” command.
24
+ *
25
+ * @param x x-Coordinate of point to draw the line to
26
+ * @param y y-Coordinate of point to draw the line to
27
+ */
28
+ lineTo(x: number, y: number): void;
29
+
30
+ /**
31
+ * Draws a quadratic Bézier segment from the current point to the specified point ⟨x, y⟩, with the specified control point ⟨cpx, cpy⟩.
32
+ * Equivalent to context.quadraticCurveTo and SVG’s quadratic Bézier curve commands.
33
+ *
34
+ * @param cpx x-Coordinate of the control point for the quadratic Bézier curve
35
+ * @param cpy y-Coordinate of the control point for the quadratic Bézier curve
36
+ * @param x x-Coordinate of point to draw the curve to
37
+ * @param y y-Coordinate of point to draw the curve to
38
+ */
39
+ quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
40
+
41
+ /**
42
+ * Draws a cubic Bézier segment from the current point to the specified point ⟨x, y⟩, with the specified control points ⟨cpx1, cpy1⟩ and ⟨cpx2, cpy2⟩.
43
+ * Equivalent to context.bezierCurveTo and SVG’s cubic Bézier curve commands.
44
+ *
45
+ * @param cpx1 x-Coordinate of the first control point for the Bézier curve
46
+ * @param cpy1 y-Coordinate of the first control point for the Bézier curve
47
+ * @param cpx2 x-Coordinate of the second control point for the Bézier curve
48
+ * @param cpy2 y-Coordinate of the second control point for the Bézier curve
49
+ * @param x x-Coordinate of point to draw the curve to
50
+ * @param y y-Coordinate of point to draw the curve to
51
+ */
52
+ bezierCurveTo(cpx1: number, cpy1: number, cpx2: number, cpy2: number, x: number, y: number): void;
53
+
54
+ /**
55
+ * Draws a circular arc segment with the specified radius that starts tangent to the line between the current point and the specified point ⟨x1, y1⟩
56
+ * and ends tangent to the line between the specified points ⟨x1, y1⟩ and ⟨x2, y2⟩. If the first tangent point is not equal to the current point,
57
+ * a straight line is drawn between the current point and the first tangent point. Equivalent to context.arcTo and uses SVG’s elliptical arc curve commands.
58
+ *
59
+ * @param x1 x-Coordinate of the first tangent point
60
+ * @param y1 y-Coordinate of the first tangent point
61
+ * @param x2 x-Coordinate of the second tangent point
62
+ * @param y2 y-Coordinate of the second tangent point
63
+ * @param radius Radius of the arc segment
64
+ */
65
+ arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;
66
+
67
+ /**
68
+ * Draws a circular arc segment with the specified center ⟨x, y⟩, radius, startAngle and endAngle. If anticlockwise is true,
69
+ * the arc is drawn in the anticlockwise direction; otherwise, it is drawn in the clockwise direction.
70
+ * If the current point is not equal to the starting point of the arc, a straight line is drawn from the current point to the start of the arc.
71
+ * Equivalent to context.arc and uses SVG’s elliptical arc curve commands.
72
+ *
73
+ * @param x x-Coordinate of the center point of the arc segment
74
+ * @param y y-Coordinate of the center point of the arc segment
75
+ * @param radius Radius of the arc segment
76
+ * @param startAngle Start angle of arc segment
77
+ * @param endAngle End angle of arc segment
78
+ * @param anticlockwise Flag indicating directionality (true = anti-clockwise, false = clockwise)
79
+ */
80
+ arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;
81
+
82
+ /**
83
+ * Creates a new subpath containing just the four points ⟨x, y⟩, ⟨x + w, y⟩, ⟨x + w, y + h⟩, ⟨x, y + h⟩,
84
+ * with those four points connected by straight lines, and then marks the subpath as closed. Equivalent to context.rect and uses SVG’s “lineto” commands.
85
+ *
86
+ * @param x x-Coordinate of starting point for drawing the rectangle
87
+ * @param y y-Coordinate of starting point for drawing the rectangle
88
+ * @param w Width of rectangle
89
+ * @param h Height of rectangle
90
+ */
91
+ rect(x: number, y: number, w: number, h: number): void;
92
+
93
+ /**
94
+ * Returns the string representation of this path according to SVG’s path data specification.
95
+ */
96
+ toString(): string;
97
+ }
98
+
99
+ /**
100
+ * Construct a D3 Path serializer
101
+ */
102
+ export function path(): Path;
103
+
104
+ /**
105
+ * Like {@link path}, except limits the digits after the decimal to the specified number of digits.
106
+ * Useful for reducing the size of generated SVG path data.
107
+ */
108
+ export function pathRound(digits?: number): Path;
node_modules/@types/d3-path/package.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "@types/d3-path",
3
+ "version": "3.1.1",
4
+ "description": "TypeScript definitions for d3-path",
5
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-path",
6
+ "license": "MIT",
7
+ "contributors": [
8
+ {
9
+ "name": "Tom Wanzek",
10
+ "githubUsername": "tomwanzek",
11
+ "url": "https://github.com/tomwanzek"
12
+ },
13
+ {
14
+ "name": "Alex Ford",
15
+ "githubUsername": "gustavderdrache",
16
+ "url": "https://github.com/gustavderdrache"
17
+ },
18
+ {
19
+ "name": "Boris Yankov",
20
+ "githubUsername": "borisyankov",
21
+ "url": "https://github.com/borisyankov"
22
+ },
23
+ {
24
+ "name": "Nathan Bierema",
25
+ "githubUsername": "Methuselah96",
26
+ "url": "https://github.com/Methuselah96"
27
+ }
28
+ ],
29
+ "main": "",
30
+ "types": "index.d.ts",
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
34
+ "directory": "types/d3-path"
35
+ },
36
+ "scripts": {},
37
+ "dependencies": {},
38
+ "peerDependencies": {},
39
+ "typesPublisherContentHash": "a49fc946781c1138c0dd932ed2a34ea60587bcc0b39790e4eb9a51cb32aaa90b",
40
+ "typeScriptVersion": "5.0"
41
+ }
node_modules/@types/d3-scale/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
node_modules/@types/d3-scale/README.md ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Installation
2
+ > `npm install --save @types/d3-scale`
3
+
4
+ # Summary
5
+ This package contains type definitions for d3-scale (https://github.com/d3/d3-scale/).
6
+
7
+ # Details
8
+ Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-scale.
9
+
10
+ ### Additional Details
11
+ * Last updated: Wed, 05 Feb 2025 00:46:59 GMT
12
+ * Dependencies: [@types/d3-time](https://npmjs.com/package/@types/d3-time)
13
+
14
+ # Credits
15
+ These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), [rulonder](https://github.com/rulonder), and [Nathan Bierema](https://github.com/Methuselah96).
node_modules/@types/d3-scale/index.d.ts ADDED
The diff for this file is too large to render. See raw diff
 
node_modules/@types/d3-scale/package.json ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "@types/d3-scale",
3
+ "version": "4.0.9",
4
+ "description": "TypeScript definitions for d3-scale",
5
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-scale",
6
+ "license": "MIT",
7
+ "contributors": [
8
+ {
9
+ "name": "Tom Wanzek",
10
+ "githubUsername": "tomwanzek",
11
+ "url": "https://github.com/tomwanzek"
12
+ },
13
+ {
14
+ "name": "Alex Ford",
15
+ "githubUsername": "gustavderdrache",
16
+ "url": "https://github.com/gustavderdrache"
17
+ },
18
+ {
19
+ "name": "Boris Yankov",
20
+ "githubUsername": "borisyankov",
21
+ "url": "https://github.com/borisyankov"
22
+ },
23
+ {
24
+ "name": "denisname",
25
+ "githubUsername": "denisname",
26
+ "url": "https://github.com/denisname"
27
+ },
28
+ {
29
+ "name": "rulonder",
30
+ "githubUsername": "rulonder",
31
+ "url": "https://github.com/rulonder"
32
+ },
33
+ {
34
+ "name": "Nathan Bierema",
35
+ "githubUsername": "Methuselah96",
36
+ "url": "https://github.com/Methuselah96"
37
+ }
38
+ ],
39
+ "main": "",
40
+ "types": "index.d.ts",
41
+ "repository": {
42
+ "type": "git",
43
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
44
+ "directory": "types/d3-scale"
45
+ },
46
+ "scripts": {},
47
+ "dependencies": {
48
+ "@types/d3-time": "*"
49
+ },
50
+ "peerDependencies": {},
51
+ "typesPublisherContentHash": "c7eb4d63d0dfb659f0f8e359a4de33ed1f690bdea8051641bffa941f06a92f4d",
52
+ "typeScriptVersion": "5.0"
53
+ }
node_modules/@types/d3-shape/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
node_modules/@types/d3-shape/README.md ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Installation
2
+ > `npm install --save @types/d3-shape`
3
+
4
+ # Summary
5
+ This package contains type definitions for d3-shape (https://github.com/d3/d3-shape/).
6
+
7
+ # Details
8
+ Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-shape.
9
+
10
+ ### Additional Details
11
+ * Last updated: Mon, 12 Jan 2026 09:42:37 GMT
12
+ * Dependencies: [@types/d3-path](https://npmjs.com/package/@types/d3-path)
13
+
14
+ # Credits
15
+ These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), [Nathan Bierema](https://github.com/Methuselah96), and [Fil](https://github.com/Fil).
node_modules/@types/d3-shape/index.d.ts ADDED
The diff for this file is too large to render. See raw diff
 
node_modules/@types/d3-shape/package.json ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "@types/d3-shape",
3
+ "version": "3.1.8",
4
+ "description": "TypeScript definitions for d3-shape",
5
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-shape",
6
+ "license": "MIT",
7
+ "contributors": [
8
+ {
9
+ "name": "Tom Wanzek",
10
+ "githubUsername": "tomwanzek",
11
+ "url": "https://github.com/tomwanzek"
12
+ },
13
+ {
14
+ "name": "Alex Ford",
15
+ "githubUsername": "gustavderdrache",
16
+ "url": "https://github.com/gustavderdrache"
17
+ },
18
+ {
19
+ "name": "Boris Yankov",
20
+ "githubUsername": "borisyankov",
21
+ "url": "https://github.com/borisyankov"
22
+ },
23
+ {
24
+ "name": "denisname",
25
+ "githubUsername": "denisname",
26
+ "url": "https://github.com/denisname"
27
+ },
28
+ {
29
+ "name": "Nathan Bierema",
30
+ "githubUsername": "Methuselah96",
31
+ "url": "https://github.com/Methuselah96"
32
+ },
33
+ {
34
+ "name": "Fil",
35
+ "githubUsername": "Fil",
36
+ "url": "https://github.com/Fil"
37
+ }
38
+ ],
39
+ "main": "",
40
+ "types": "index.d.ts",
41
+ "repository": {
42
+ "type": "git",
43
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
44
+ "directory": "types/d3-shape"
45
+ },
46
+ "scripts": {},
47
+ "dependencies": {
48
+ "@types/d3-path": "*"
49
+ },
50
+ "peerDependencies": {},
51
+ "typesPublisherContentHash": "c63f7faa7fd70d5689095623946e70f1369c54cb6490949c7f581beabbfd61e6",
52
+ "typeScriptVersion": "5.2"
53
+ }
node_modules/@types/d3-time/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
node_modules/@types/d3-time/README.md ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Installation
2
+ > `npm install --save @types/d3-time`
3
+
4
+ # Summary
5
+ This package contains type definitions for d3-time (https://github.com/d3/d3-time/).
6
+
7
+ # Details
8
+ Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-time.
9
+
10
+ ### Additional Details
11
+ * Last updated: Mon, 25 Nov 2024 10:02:27 GMT
12
+ * Dependencies: none
13
+
14
+ # Credits
15
+ These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), and [Nathan Bierema](https://github.com/Methuselah96).
node_modules/@types/d3-time/index.d.ts ADDED
@@ -0,0 +1,697 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Last module patch version validated against: 3.0.0
2
+
3
+ // ---------------------------------------------------------------
4
+ // Interfaces
5
+ // ---------------------------------------------------------------
6
+
7
+ /**
8
+ * A D3 Time Interval
9
+ */
10
+ export interface TimeInterval {
11
+ /**
12
+ * Returns a new date representing the latest interval boundary date before or equal to date.
13
+ * Equivalent to interval.floor, except it date is not specified, it defaults to the current time.
14
+ * For example, d3.timeYear(date) and d3.timeYear.floor(date) are equivalent.
15
+ *
16
+ * For example, timeDay(date) typically returns 12:00 AM local time on the given date.
17
+ *
18
+ * This function is idempotent: if the specified date is already floored to the current interval,
19
+ * a new date with an identical time is returned.
20
+ * Furthermore, the returned date is the minimum expressible value of the associated interval,
21
+ * such that interval.floor(interval.floor(date) - 1) returns the preceding interval boundary date.
22
+ *
23
+ * Note that the == and === operators do not compare by value with Date objects,
24
+ * and thus you cannot use them to tell whether the specified date has already been floored.
25
+ * Instead, coerce to a number and then compare.
26
+ *
27
+ * This is more reliable than testing whether the time is 12:00 AM, as in some time zones midnight may not exist due to daylight saving.
28
+ *
29
+ * @param date A date object.
30
+ */
31
+ (date?: Date): Date;
32
+
33
+ /**
34
+ * Returns a new date representing the latest interval boundary date before or equal to date.
35
+ *
36
+ * For example, timeDay.floor(date) typically returns 12:00 AM local time on the given date.
37
+ *
38
+ * This method is idempotent: if the specified date is already floored to the current interval,
39
+ * a new date with an identical time is returned.
40
+ * Furthermore, the returned date is the minimum expressible value of the associated interval,
41
+ * such that interval.floor(interval.floor(date) - 1) returns the preceding interval boundary date.
42
+ *
43
+ * Note that the == and === operators do not compare by value with Date objects,
44
+ * and thus you cannot use them to tell whether the specified date has already been floored.
45
+ * Instead, coerce to a number and then compare.
46
+ *
47
+ * This is more reliable than testing whether the time is 12:00 AM, as in some time zones midnight may not exist due to daylight saving.
48
+ *
49
+ * @param date A date object.
50
+ */
51
+ floor(date: Date): Date;
52
+
53
+ /**
54
+ * Returns a new date representing the closest interval boundary date to date.
55
+ *
56
+ * For example, timeDay.round(date) typically returns 12:00 AM local time on the given date if it is on or before noon,
57
+ * and 12:00 AM of the following day if it is after noon.
58
+ *
59
+ * This method is idempotent: if the specified date is already rounded to the current interval, a new date with an identical time is returned.
60
+ *
61
+ * @param date A date object.
62
+ */
63
+ round(date: Date): Date;
64
+
65
+ /**
66
+ * Returns a new date representing the earliest interval boundary date after or equal to date.
67
+ *
68
+ * For example, timeDay.ceil(date) typically returns 12:00 AM local time on the date following the given date.
69
+ *
70
+ * This method is idempotent: if the specified date is already ceilinged to the current interval,
71
+ * a new date with an identical time is returned. Furthermore,
72
+ * the returned date is the maximum expressible value of the associated interval,
73
+ * such that interval.ceil(interval.ceil(date) + 1) returns the following interval boundary date.
74
+ *
75
+ * @param date A date object.
76
+ */
77
+ ceil(date: Date): Date;
78
+
79
+ /**
80
+ * Returns a new date equal to date plus step intervals.
81
+ *
82
+ * If step is not specified it defaults to 1.
83
+ *
84
+ * This method does not round the specified date to the interval. For example, if date is today at 5:34 PM,
85
+ * then timeDay.offset(date, 1) returns 5:34 PM tomorrow (even if daylight saving changes!).
86
+ *
87
+ * @param date A date object.
88
+ * @param step An optional number of steps to apply when calculating the offset date.
89
+ * If step is negative, then the returned date will be before the specified date;
90
+ * if step is zero, then a copy of the specified date is returned; if step is not an integer, it is floored.
91
+ */
92
+ offset(date: Date, step?: number): Date;
93
+
94
+ /**
95
+ * Returns an array of dates representing every interval boundary after or equal to start (inclusive) and before stop (exclusive).
96
+ *
97
+ * If step is specified, then every step-th boundary will be returned; for example,
98
+ * for the timeDay interval a step of 2 will return every other day.
99
+ * If step is not an integer, it is floored.
100
+ *
101
+ * The first date in the returned array is the earliest boundary after or equal to start;
102
+ * subsequent dates are offset by step intervals and floored.
103
+ * Thus, two overlapping ranges may be inconsistent.
104
+ *
105
+ * To make ranges consistent when a step is specified, use CountableInterval.every instead.
106
+ *
107
+ * @param start A start date object for the range.
108
+ * @param stop A stop date object for the range.
109
+ * @param step An optional number of steps to apply when calculating the dates in the range.
110
+ */
111
+ range(start: Date, stop: Date, step?: number): Date[];
112
+
113
+ /**
114
+ * Returns a new interval that is a filtered subset of this interval using the specified test function.
115
+ *
116
+ * @param test A test function which is passed a date and should return true if and only if
117
+ * the specified date should be considered part of the interval.
118
+ */
119
+ filter(test: (date: Date) => boolean): TimeInterval;
120
+ }
121
+
122
+ /**
123
+ * A D3 Countable Time Interval
124
+ */
125
+ export interface CountableTimeInterval extends TimeInterval {
126
+ /**
127
+ * Returns the number of interval boundaries after start (exclusive) and before or equal to end (inclusive).
128
+ *
129
+ * Note that this behavior is slightly different than interval.range,
130
+ * because its purpose is to return the zero-based number of the specified end date relative to the specified start date.
131
+ *
132
+ * @param start A start date object.
133
+ * @param end An end date object.
134
+ */
135
+ count(start: Date, end: Date): number;
136
+ /**
137
+ * Returns a filtered view of this interval representing every stepth date.
138
+ *
139
+ * The meaning of step is dependent on this interval’s parent interval as defined by the field function.
140
+ *
141
+ * For example, timeMinute.every(15) returns an interval representing every fifteen minutes,
142
+ * starting on the hour: :00, :15, :30, :45, etc. Note that for some intervals,
143
+ * the resulting dates may not be uniformly-spaced;
144
+ * timeDay’s parent interval is timeMonth, and thus the interval number resets at the start of each month.
145
+ *
146
+ * If step is not valid, returns null. If step is one, returns this interval.
147
+ *
148
+ * This method can be used in conjunction with interval.range to ensure that two overlapping ranges are consistent.
149
+ *
150
+ * The returned filtered interval does not support interval.count. See also interval.filter.
151
+ *
152
+ * @param step Number of steps.
153
+ */
154
+ every(step: number): TimeInterval | null;
155
+ }
156
+
157
+ // ---------------------------------------------------------------
158
+ // Custom (Countable)Interval Factories
159
+ // ---------------------------------------------------------------
160
+
161
+ /**
162
+ * Constructs a new custom interval given the specified floor and offset functions.
163
+ *
164
+ * The returned custom interval is not countable, i.e. does not expose the methods "count(..)" and "every(...)".
165
+ *
166
+ * @param floor A floor function which takes a single date as an argument and rounds it down to the nearest interval boundary.
167
+ * @param offset An offset function which takes a date and an integer step as arguments and advances
168
+ * the specified date by the specified number of boundaries; the step may be positive, negative or zero.
169
+ */
170
+ export function timeInterval(
171
+ floor: (date: Date) => void,
172
+ offset: (date: Date, step: number) => void,
173
+ ): TimeInterval;
174
+ /**
175
+ * Constructs a new custom interval given the specified floor, offset and count functions.
176
+ *
177
+ * The returned custom interval is countable and exposes the methods "count(..)" and "every(...)".
178
+ *
179
+ * Note: due to an internal optimization, the specified count function must not invoke interval.count on other time intervals.
180
+ *
181
+ * @param floor A floor function which takes a single date as an argument and rounds it down to the nearest interval boundary.
182
+ * @param offset An offset function which takes a date and an integer step as arguments and advances
183
+ * the specified date by the specified number of boundaries; the step may be positive, negative or zero.
184
+ * @param count A count function which takes a start date and an end date, already floored to the current interval,
185
+ * and returns the number of boundaries between the start (exclusive) and end (inclusive).
186
+ * Note: due to an internal optimization, the specified count function must not invoke interval.count on other time intervals.
187
+ * @param field An optional field function which takes a date, already floored to the current interval,
188
+ * and returns the field value of the specified date,
189
+ * corresponding to the number of boundaries between this date (exclusive) and the latest previous parent boundary.
190
+ * For example, for the timeDay interval, this returns the number of days since the start of the month.
191
+ * If a field function is not specified, it defaults to counting the number of interval boundaries since
192
+ * the UNIX epoch of January 1, 1970 UTC. The field function defines the behavior of interval.every.
193
+ */
194
+ export function timeInterval(
195
+ floor: (date: Date) => void,
196
+ offset: (date: Date, step: number) => void,
197
+ count: (start: Date, end: Date) => number,
198
+ field?: (date: Date) => number,
199
+ ): CountableTimeInterval;
200
+
201
+ // ---------------------------------------------------------------
202
+ // Built-In Factories and Date Array Creators
203
+ // ---------------------------------------------------------------
204
+
205
+ // local time ----------------------------------------------------------
206
+
207
+ /**
208
+ * Milliseconds Interval in Local Time; the shortest available time unit.
209
+ */
210
+ export const timeMillisecond: CountableTimeInterval;
211
+
212
+ /**
213
+ * This is a convenience alias for timeMillisecond.range(...).
214
+ *
215
+ * @param start A start date object for the range.
216
+ * @param stop A stop date object for the range.
217
+ * @param step An optional number of steps to apply when calculating the dates in the range.
218
+ */
219
+ export function timeMilliseconds(start: Date, stop: Date, step?: number): Date[];
220
+
221
+ /**
222
+ * Seconds Interval in Local Time; seconds (e.g., 01:23:45.0000 AM); 1,000 milliseconds.
223
+ */
224
+ export const timeSecond: CountableTimeInterval;
225
+
226
+ /**
227
+ * This is a convenience alias for timeSecond.range(...).
228
+ *
229
+ * @param start A start date object for the range.
230
+ * @param stop A stop date object for the range.
231
+ * @param step An optional number of steps to apply when calculating the dates in the range.
232
+ */
233
+ export function timeSeconds(start: Date, stop: Date, step?: number): Date[];
234
+
235
+ /**
236
+ * Minutes Interval in Local Time; minutes (e.g., 01:02:00 AM); 60 seconds. Note that ECMAScript ignores leap seconds.
237
+ */
238
+ export const timeMinute: CountableTimeInterval;
239
+
240
+ /**
241
+ * This is a convenience alias for timeMinute.range(...).
242
+ *
243
+ * @param start A start date object for the range.
244
+ * @param stop A stop date object for the range.
245
+ * @param step An optional number of steps to apply when calculating the dates in the range.
246
+ */
247
+ export function timeMinutes(start: Date, stop: Date, step?: number): Date[];
248
+
249
+ /**
250
+ * Hours Interval in Local Time; Hours (e.g., 01:00 AM); 60 minutes.
251
+ *
252
+ * Note that advancing time by one hour in local time can return the same hour or skip an hour due to daylight saving.
253
+ */
254
+ export const timeHour: CountableTimeInterval;
255
+
256
+ /**
257
+ * This is a convenience alias for timeHour.range(...).
258
+ *
259
+ * @param start A start date object for the range.
260
+ * @param stop A stop date object for the range.
261
+ * @param step An optional number of steps to apply when calculating the dates in the range.
262
+ */
263
+ export function timeHours(start: Date, stop: Date, step?: number): Date[];
264
+
265
+ /**
266
+ * Days Interval in Local Time; days (e.g., February 7, 2012 at 12:00 AM); typically 24 hours.
267
+ * Days in local time may range from 23 to 25 hours due to daylight saving.
268
+ */
269
+ export const timeDay: CountableTimeInterval;
270
+
271
+ /**
272
+ * This is a convenience alias for timeDay.range(...).
273
+ *
274
+ * @param start A start date object for the range.
275
+ * @param stop A stop date object for the range.
276
+ * @param step An optional number of steps to apply when calculating the dates in the range.
277
+ */
278
+ export function timeDays(start: Date, stop: Date, step?: number): Date[];
279
+
280
+ /**
281
+ * Week Interval in Local Time. Alias for sunday; 7 days and typically 168 hours.
282
+ *
283
+ * Weeks in local time may range from 167 to 169 hours due on daylight saving.
284
+ */
285
+ export const timeWeek: CountableTimeInterval;
286
+
287
+ /**
288
+ * This is a convenience alias for timeWeek.range(...).
289
+ *
290
+ * @param start A start date object for the range.
291
+ * @param stop A stop date object for the range.
292
+ * @param step An optional number of steps to apply when calculating the dates in the range.
293
+ */
294
+ export function timeWeeks(start: Date, stop: Date, step?: number): Date[];
295
+
296
+ /**
297
+ * Week Interval for Sunday-based weeks in Local Time (e.g., February 5, 2012 at 12:00 AM).
298
+ * 7 days and typically 168 hours.
299
+ *
300
+ * Weeks in local time may range from 167 to 169 hours due on daylight saving.
301
+ */
302
+ export const timeSunday: CountableTimeInterval;
303
+
304
+ /**
305
+ * This is a convenience alias for timeSunday.range(...).
306
+ *
307
+ * @param start A start date object for the range.
308
+ * @param stop A stop date object for the range.
309
+ * @param step An optional number of steps to apply when calculating the dates in the range.
310
+ */
311
+ export function timeSundays(start: Date, stop: Date, step?: number): Date[];
312
+
313
+ /**
314
+ * Week Interval for Monday-based weeks in Local Time (e.g., February 6, 2012 at 12:00 AM).
315
+ * 7 days and typically 168 hours.
316
+ *
317
+ * Weeks in local time may range from 167 to 169 hours due on daylight saving.
318
+ */
319
+ export const timeMonday: CountableTimeInterval;
320
+
321
+ /**
322
+ * This is a convenience alias for timeMonday.range(...).
323
+ *
324
+ * @param start A start date object for the range.
325
+ * @param stop A stop date object for the range.
326
+ * @param step An optional number of steps to apply when calculating the dates in the range.
327
+ */
328
+ export function timeMondays(start: Date, stop: Date, step?: number): Date[];
329
+
330
+ /**
331
+ * Week Interval for Tuesday-based weeks in Local Time (e.g., February 7, 2012 at 12:00 AM).
332
+ * 7 days and typically 168 hours.
333
+ *
334
+ * Weeks in local time may range from 167 to 169 hours due on daylight saving.
335
+ */
336
+ export const timeTuesday: CountableTimeInterval;
337
+
338
+ /**
339
+ * This is a convenience alias for timeTuesday.range(...).
340
+ *
341
+ * @param start A start date object for the range.
342
+ * @param stop A stop date object for the range.
343
+ * @param step An optional number of steps to apply when calculating the dates in the range.
344
+ */
345
+ export function timeTuesdays(start: Date, stop: Date, step?: number): Date[];
346
+
347
+ /**
348
+ * Week Interval for Wednesday-based weeks in Local Time (e.g., February 8, 2012 at 12:00 AM).
349
+ * 7 days and typically 168 hours.
350
+ *
351
+ * Weeks in local time may range from 167 to 169 hours due on daylight saving.
352
+ */
353
+ export const timeWednesday: CountableTimeInterval;
354
+
355
+ /**
356
+ * This is a convenience alias for timeWednesday.range(...).
357
+ *
358
+ * @param start A start date object for the range.
359
+ * @param stop A stop date object for the range.
360
+ * @param step An optional number of steps to apply when calculating the dates in the range.
361
+ */
362
+ export function timeWednesdays(start: Date, stop: Date, step?: number): Date[];
363
+
364
+ /**
365
+ * Week Interval for Thursday-based weeks in Local Time (e.g., February 9, 2012 at 12:00 AM).
366
+ * 7 days and typically 168 hours.
367
+ *
368
+ * Weeks in local time may range from 167 to 169 hours due on daylight saving.
369
+ */
370
+ export const timeThursday: CountableTimeInterval;
371
+
372
+ /**
373
+ * This is a convenience alias for timeThursday.range(...).
374
+ *
375
+ * @param start A start date object for the range.
376
+ * @param stop A stop date object for the range.
377
+ * @param step An optional number of steps to apply when calculating the dates in the range.
378
+ */
379
+ export function timeThursdays(start: Date, stop: Date, step?: number): Date[];
380
+
381
+ /**
382
+ * Week Interval for Friday-based weeks in Local Time (e.g., February 10, 2012 at 12:00 AM).
383
+ * 7 days and typically 168 hours.
384
+ *
385
+ * Weeks in local time may range from 167 to 169 hours due on daylight saving.
386
+ */
387
+ export const timeFriday: CountableTimeInterval;
388
+
389
+ /**
390
+ * This is a convenience alias for timeFriday.range(...).
391
+ *
392
+ * @param start A start date object for the range.
393
+ * @param stop A stop date object for the range.
394
+ * @param step An optional number of steps to apply when calculating the dates in the range.
395
+ */
396
+ export function timeFridays(start: Date, stop: Date, step?: number): Date[];
397
+
398
+ /**
399
+ * Week Interval for Saturday-based weeks in Local Time (e.g., February 11, 2012 at 12:00 AM).
400
+ * 7 days and typically 168 hours.
401
+ *
402
+ * Weeks in local time may range from 167 to 169 hours due on daylight saving.
403
+ */
404
+ export const timeSaturday: CountableTimeInterval;
405
+
406
+ /**
407
+ * This is a convenience alias for timeSaturday.range(...).
408
+ *
409
+ * @param start A start date object for the range.
410
+ * @param stop A stop date object for the range.
411
+ * @param step An optional number of steps to apply when calculating the dates in the range.
412
+ */
413
+ export function timeSaturdays(start: Date, stop: Date, step?: number): Date[];
414
+
415
+ /**
416
+ * Month Interval in Local Time; months (e.g., February 1, 2012 at 12:00 AM); ranges from 28 to 31 days.
417
+ */
418
+ export const timeMonth: CountableTimeInterval;
419
+
420
+ /**
421
+ * This is a convenience alias for timeMonth.range(...).
422
+ *
423
+ * @param start A start date object for the range.
424
+ * @param stop A stop date object for the range.
425
+ * @param step An optional number of steps to apply when calculating the dates in the range.
426
+ */
427
+ export function timeMonths(start: Date, stop: Date, step?: number): Date[];
428
+
429
+ /**
430
+ * Year Interval in Local Time; years (e.g., January 1, 2012 at 12:00 AM); ranges from 365 to 366 days.
431
+ */
432
+ export const timeYear: CountableTimeInterval;
433
+
434
+ /**
435
+ * This is a convenience alias for timeYear.range(...).
436
+ *
437
+ * @param start A start date object for the range.
438
+ * @param stop A stop date object for the range.
439
+ * @param step An optional number of steps to apply when calculating the dates in the range.
440
+ */
441
+ export function timeYears(start: Date, stop: Date, step?: number): Date[];
442
+
443
+ // utc Coordinated Universal Time ----------------------------------------------------------
444
+
445
+ /**
446
+ * Milliseconds Interval in Coordinated Universal Time (UTC); the shortest available time unit.
447
+ */
448
+ export const utcMillisecond: CountableTimeInterval;
449
+
450
+ /**
451
+ * This is a convenience alias for utcMillisecond.range(...).
452
+ *
453
+ * @param start A start date object for the range.
454
+ * @param stop A stop date object for the range.
455
+ * @param step An optional number of steps to apply when calculating the dates in the range.
456
+ */
457
+ export function utcMilliseconds(start: Date, stop: Date, step?: number): Date[];
458
+
459
+ /**
460
+ * Seconds Interval in Coordinated Universal Time (UTC); seconds (e.g., 01:23:45.0000 AM); 1,000 milliseconds.
461
+ */
462
+ export const utcSecond: CountableTimeInterval;
463
+
464
+ /**
465
+ * This is a convenience alias for utcSecond.range(...).
466
+ *
467
+ * @param start A start date object for the range.
468
+ * @param stop A stop date object for the range.
469
+ * @param step An optional number of steps to apply when calculating the dates in the range.
470
+ */
471
+ export function utcSeconds(start: Date, stop: Date, step?: number): Date[];
472
+
473
+ /**
474
+ * Minutes Interval in Coordinated Universal Time (UTC); minutes (e.g., 01:02:00 AM); 60 seconds.
475
+ * Note that ECMAScript ignores leap seconds.
476
+ */
477
+ export const utcMinute: CountableTimeInterval;
478
+
479
+ /**
480
+ * This is a convenience alias for utcMinute.range(...).
481
+ *
482
+ * @param start A start date object for the range.
483
+ * @param stop A stop date object for the range.
484
+ * @param step An optional number of steps to apply when calculating the dates in the range.
485
+ */
486
+ export function utcMinutes(start: Date, stop: Date, step?: number): Date[];
487
+
488
+ /**
489
+ * Hours Interval in Coordinated Universal Time (UTC); Hours (e.g., 01:00 AM); 60 minutes.
490
+ */
491
+ export const utcHour: CountableTimeInterval;
492
+
493
+ /**
494
+ * This is a convenience alias for utcHour.range(...).
495
+ *
496
+ * @param start A start date object for the range.
497
+ * @param stop A stop date object for the range.
498
+ * @param step An optional number of steps to apply when calculating the dates in the range.
499
+ */
500
+ export function utcHours(start: Date, stop: Date, step?: number): Date[];
501
+
502
+ /**
503
+ * Days Interval in Coordinated Universal Time (UTC); days (e.g., February 7, 2012 at 12:00 AM); 24 hours.
504
+ */
505
+ export const utcDay: CountableTimeInterval;
506
+
507
+ /**
508
+ * This is a convenience alias for utcDay.range(...).
509
+ *
510
+ * @param start A start date object for the range.
511
+ * @param stop A stop date object for the range.
512
+ * @param step An optional number of steps to apply when calculating the dates in the range.
513
+ */
514
+ export function utcDays(start: Date, stop: Date, step?: number): Date[];
515
+
516
+ /**
517
+ * Week Interval in Local Time. Alias for sunday; 7 days and 168 hours.
518
+ */
519
+ export const utcWeek: CountableTimeInterval;
520
+
521
+ /**
522
+ * This is a convenience alias for utcWeek.range(...).
523
+ *
524
+ * @param start A start date object for the range.
525
+ * @param stop A stop date object for the range.
526
+ * @param step An optional number of steps to apply when calculating the dates in the range.
527
+ */
528
+ export function utcWeeks(start: Date, stop: Date, step?: number): Date[];
529
+
530
+ /**
531
+ * Week Interval for Sunday-based weeks in Coordinated Universal Time (UTC) (e.g., February 5, 2012 at 12:00 AM).
532
+ * 7 days and 168 hours.
533
+ */
534
+ export const utcSunday: CountableTimeInterval;
535
+
536
+ /**
537
+ * This is a convenience alias for utcSunday.range(...).
538
+ *
539
+ * @param start A start date object for the range.
540
+ * @param stop A stop date object for the range.
541
+ * @param step An optional number of steps to apply when calculating the dates in the range.
542
+ */
543
+ export function utcSundays(start: Date, stop: Date, step?: number): Date[];
544
+
545
+ /**
546
+ * Week Interval for Monday-based weeks in Coordinated Universal Time (UTC) (e.g., February 6, 2012 at 12:00 AM).
547
+ * 7 days and 168 hours.
548
+ */
549
+ export const utcMonday: CountableTimeInterval;
550
+
551
+ /**
552
+ * This is a convenience alias for utcMonday.range(...).
553
+ *
554
+ * @param start A start date object for the range.
555
+ * @param stop A stop date object for the range.
556
+ * @param step An optional number of steps to apply when calculating the dates in the range.
557
+ */
558
+ export function utcMondays(start: Date, stop: Date, step?: number): Date[];
559
+
560
+ /**
561
+ * Week Interval for Tuesday-based weeks in Coordinated Universal Time (UTC) (e.g., February 7, 2012 at 12:00 AM).
562
+ * 7 days and 168 hours.
563
+ */
564
+ export const utcTuesday: CountableTimeInterval;
565
+
566
+ /**
567
+ * This is a convenience alias for utcTuesday.range(...).
568
+ *
569
+ * @param start A start date object for the range.
570
+ * @param stop A stop date object for the range.
571
+ * @param step An optional number of steps to apply when calculating the dates in the range.
572
+ */
573
+ export function utcTuesdays(start: Date, stop: Date, step?: number): Date[];
574
+
575
+ /**
576
+ * Week Interval for Wednesday-based weeks in Coordinated Universal Time (UTC) (e.g., February 8, 2012 at 12:00 AM).
577
+ * 7 days and 168 hours.
578
+ */
579
+ export const utcWednesday: CountableTimeInterval;
580
+
581
+ /**
582
+ * This is a convenience alias for utcWednesday.range(...).
583
+ *
584
+ * @param start A start date object for the range.
585
+ * @param stop A stop date object for the range.
586
+ * @param step An optional number of steps to apply when calculating the dates in the range.
587
+ */
588
+ export function utcWednesdays(start: Date, stop: Date, step?: number): Date[];
589
+
590
+ /**
591
+ * Week Interval for Thursday-based weeks in Coordinated Universal Time (UTC) (e.g., February 9, 2012 at 12:00 AM).
592
+ * 7 days and 168 hours.
593
+ */
594
+ export const utcThursday: CountableTimeInterval;
595
+
596
+ /**
597
+ * This is a convenience alias for utcThursday.range(...).
598
+ *
599
+ * @param start A start date object for the range.
600
+ * @param stop A stop date object for the range.
601
+ * @param step An optional number of steps to apply when calculating the dates in the range.
602
+ */
603
+ export function utcThursdays(start: Date, stop: Date, step?: number): Date[];
604
+
605
+ /**
606
+ * Week Interval for Friday-based weeks in Coordinated Universal Time (UTC) (e.g., February 10, 2012 at 12:00 AM).
607
+ * 7 days and 168 hours.
608
+ */
609
+ export const utcFriday: CountableTimeInterval;
610
+
611
+ /**
612
+ * This is a convenience alias for utcFriday.range(...).
613
+ *
614
+ * @param start A start date object for the range.
615
+ * @param stop A stop date object for the range.
616
+ * @param step An optional number of steps to apply when calculating the dates in the range.
617
+ */
618
+ export function utcFridays(start: Date, stop: Date, step?: number): Date[];
619
+
620
+ /**
621
+ * Week Interval for Saturday-based weeks in Coordinated Universal Time (UTC) (e.g., February 11, 2012 at 12:00 AM).
622
+ * 7 days and 168 hours.
623
+ */
624
+ export const utcSaturday: CountableTimeInterval;
625
+
626
+ /**
627
+ * This is a convenience alias for utcSaturday.range(...).
628
+ *
629
+ * @param start A start date object for the range.
630
+ * @param stop A stop date object for the range.
631
+ * @param step An optional number of steps to apply when calculating the dates in the range.
632
+ */
633
+ export function utcSaturdays(start: Date, stop: Date, step?: number): Date[];
634
+
635
+ /**
636
+ * Month Interval in Coordinated Universal Time (UTC); months (e.g., February 1, 2012 at 12:00 AM); ranges from 28 to 31 days.
637
+ */
638
+ export const utcMonth: CountableTimeInterval;
639
+
640
+ /**
641
+ * This is a convenience alias for utcMonth.range(...).
642
+ *
643
+ * @param start A start date object for the range.
644
+ * @param stop A stop date object for the range.
645
+ * @param step An optional number of steps to apply when calculating the dates in the range.
646
+ */
647
+ export function utcMonths(start: Date, stop: Date, step?: number): Date[];
648
+
649
+ /**
650
+ * Year Interval in Coordinated Universal Time (UTC); years (e.g., January 1, 2012 at 12:00 AM); ranges from 365 to 366 days.
651
+ */
652
+ export const utcYear: CountableTimeInterval;
653
+
654
+ /**
655
+ * This is a convenience alias for utcYear.range(...).
656
+ *
657
+ * @param start A start date object for the range.
658
+ * @param stop A stop date object for the range.
659
+ * @param step An optional number of steps to apply when calculating the dates in the range.
660
+ */
661
+ export function utcYears(start: Date, stop: Date, step?: number): Date[];
662
+
663
+ /**
664
+ * Like d3.utcDay, except it counts days since the UNIX epoch (January 1, 1970) such that interval.every returns uniformly-spaced dates rather than varying based on day-of-month.
665
+ */
666
+ export const unixDay: CountableTimeInterval;
667
+
668
+ /**
669
+ * This is a convenience alias for unixDay.range(...).
670
+ *
671
+ * @param start A start date object for the range.
672
+ * @param stop A stop date object for the range.
673
+ * @param step An optional number of steps to apply when calculating the dates in the range.
674
+ */
675
+ export function unixDays(start: Date, stop: Date, step?: number): Date[];
676
+
677
+ /**
678
+ * Equivalent to d3.utcTicks, but in local time.
679
+ */
680
+ export function timeTicks(start: Date, stop: Date, count: number): Date[];
681
+
682
+ /**
683
+ * Returns the time interval that would be used by d3.timeTicks given the same arguments.
684
+ */
685
+ export function timeTickInterval(start: Date, stop: Date, count: number): TimeInterval | null;
686
+
687
+ /**
688
+ * Returns an array of approximately count dates at regular intervals between start and stop (inclusive).
689
+ * If stop is before start, dates are returned in reverse chronological order; otherwise dates are returned in chronological order.
690
+ */
691
+ export function utcTicks(start: Date, stop: Date, count: number): Date[];
692
+
693
+ /**
694
+ * Returns the time interval that would be used by d3.utcTicks given the same arguments.
695
+ * If there is no associated interval, such as when start or stop is invalid, returns null.
696
+ */
697
+ export function utcTickInterval(start: Date, stop: Date, count: number): TimeInterval | null;
node_modules/@types/d3-time/package.json ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "@types/d3-time",
3
+ "version": "3.0.4",
4
+ "description": "TypeScript definitions for d3-time",
5
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-time",
6
+ "license": "MIT",
7
+ "contributors": [
8
+ {
9
+ "name": "Tom Wanzek",
10
+ "githubUsername": "tomwanzek",
11
+ "url": "https://github.com/tomwanzek"
12
+ },
13
+ {
14
+ "name": "Alex Ford",
15
+ "githubUsername": "gustavderdrache",
16
+ "url": "https://github.com/gustavderdrache"
17
+ },
18
+ {
19
+ "name": "Boris Yankov",
20
+ "githubUsername": "borisyankov",
21
+ "url": "https://github.com/borisyankov"
22
+ },
23
+ {
24
+ "name": "denisname",
25
+ "githubUsername": "denisname",
26
+ "url": "https://github.com/denisname"
27
+ },
28
+ {
29
+ "name": "Nathan Bierema",
30
+ "githubUsername": "Methuselah96",
31
+ "url": "https://github.com/Methuselah96"
32
+ }
33
+ ],
34
+ "main": "",
35
+ "types": "index.d.ts",
36
+ "repository": {
37
+ "type": "git",
38
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
39
+ "directory": "types/d3-time"
40
+ },
41
+ "scripts": {},
42
+ "dependencies": {},
43
+ "peerDependencies": {},
44
+ "typesPublisherContentHash": "995c6a7a1f21328f5dceb32804c5f3d92ab20a98694246d9c8f213f4eef298ed",
45
+ "typeScriptVersion": "4.9"
46
+ }
node_modules/@types/d3-timer/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
node_modules/@types/d3-timer/README.md ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Installation
2
+ > `npm install --save @types/d3-timer`
3
+
4
+ # Summary
5
+ This package contains type definitions for d3-timer (https://github.com/d3/d3-timer/).
6
+
7
+ # Details
8
+ Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-timer.
9
+
10
+ ### Additional Details
11
+ * Last updated: Tue, 07 Nov 2023 15:11:37 GMT
12
+ * Dependencies: none
13
+
14
+ # Credits
15
+ These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), and [Nathan Bierema](https://github.com/Methuselah96).
node_modules/@types/d3-timer/index.d.ts ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Last module patch version validated against: 3.0.1
2
+
3
+ /**
4
+ * Returns the current time as defined by performance.now if available, and Date.now if not.
5
+ * The current time is updated at the start of a frame; it is thus consistent during the frame, and any timers scheduled during the same frame will be synchronized.
6
+ * If this method is called outside of a frame, such as in response to a user event, the current time is calculated and then fixed until the next frame,
7
+ * again ensuring consistent timing during event handling.
8
+ */
9
+ export function now(): number;
10
+
11
+ export interface Timer {
12
+ /**
13
+ * Restart a timer with the specified callback and optional delay and time.
14
+ * This is equivalent to stopping this timer and creating a new timer with the specified arguments,
15
+ * although this timer retains the original invocation priority.
16
+ *
17
+ * @param callback A callback function to be invoked and passed in the apparent
18
+ * elapsed time since the timer became active in milliseconds.
19
+ * @param delay An optional numeric delay in milliseconds (default = 0) relative to time.
20
+ * @param time An optional time in milliseconds relative to which the delay is calculated (default = now).
21
+ */
22
+ restart(callbackFn: (elapsed: number) => void, delay?: number, time?: number): void;
23
+
24
+ /**
25
+ * Stop the timer.
26
+ */
27
+ stop(): void;
28
+ }
29
+
30
+ /**
31
+ * Schedules and returns a new timer, invoking the specified callback repeatedly until the timer is stopped.
32
+ * The callback is passed the (apparent) elapsed time since the timer became active.
33
+ *
34
+ * @param callback A callback function to be invoked and passed in the apparent
35
+ * elapsed time since the timer became active in milliseconds.
36
+ * @param delay An optional numeric delay in milliseconds (default = 0) relative to time.
37
+ * @param time An optional time in milliseconds relative to which the delay is calculated (default = now).
38
+ */
39
+ export function timer(callback: (elapsed: number) => void, delay?: number, time?: number): Timer;
40
+
41
+ /**
42
+ * Immediately invoke any eligible timer callbacks.
43
+ */
44
+ export function timerFlush(): void;
45
+
46
+ /**
47
+ * Schedules and returns a new timer, invoking the specified callback. The timer is stopped automatically
48
+ * on its first callback. The callback is passed the (apparent) elapsed time since the timer became active.
49
+ *
50
+ * @param callback A callback function to be invoked and passed in the apparent
51
+ * elapsed time since the timer became active in milliseconds.
52
+ * @param delay An optional numeric delay in milliseconds (default = 0) relative to time.
53
+ * @param time An optional time in milliseconds relative to which the delay is calculated (default = now).
54
+ */
55
+ export function timeout(callback: (elapsed: number) => void, delay?: number, time?: number): Timer;
56
+
57
+ /**
58
+ * Schedules and returns a new timer, invoking the specified callback repeatedly every 'delay' milliseconds
59
+ * until the timer is stopped.
60
+ * The callback is passed the (apparent) elapsed time since the timer became active.
61
+ *
62
+ * @param callback A callback function to be invoked and passed in the apparent
63
+ * elapsed time since the timer became active in milliseconds.
64
+ * @param delay An optional numeric delay in milliseconds between repeat invocations of the callback.
65
+ * If not specified, the interval timer behaves like the regular timer.
66
+ * @param time An optional time in milliseconds relative to which the initial delay is calculated (default = now).
67
+ */
68
+ export function interval(callback: (elapsed: number) => void, delay?: number, time?: number): Timer;
node_modules/@types/d3-timer/package.json ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "@types/d3-timer",
3
+ "version": "3.0.2",
4
+ "description": "TypeScript definitions for d3-timer",
5
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-timer",
6
+ "license": "MIT",
7
+ "contributors": [
8
+ {
9
+ "name": "Tom Wanzek",
10
+ "githubUsername": "tomwanzek",
11
+ "url": "https://github.com/tomwanzek"
12
+ },
13
+ {
14
+ "name": "Alex Ford",
15
+ "githubUsername": "gustavderdrache",
16
+ "url": "https://github.com/gustavderdrache"
17
+ },
18
+ {
19
+ "name": "Boris Yankov",
20
+ "githubUsername": "borisyankov",
21
+ "url": "https://github.com/borisyankov"
22
+ },
23
+ {
24
+ "name": "denisname",
25
+ "githubUsername": "denisname",
26
+ "url": "https://github.com/denisname"
27
+ },
28
+ {
29
+ "name": "Nathan Bierema",
30
+ "githubUsername": "Methuselah96",
31
+ "url": "https://github.com/Methuselah96"
32
+ }
33
+ ],
34
+ "main": "",
35
+ "types": "index.d.ts",
36
+ "repository": {
37
+ "type": "git",
38
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
39
+ "directory": "types/d3-timer"
40
+ },
41
+ "scripts": {},
42
+ "dependencies": {},
43
+ "typesPublisherContentHash": "a51fc6981e6d12715fd052f7e598dd291c354465025cbb33ece1895bdab4109c",
44
+ "typeScriptVersion": "4.5"
45
+ }
node_modules/@types/estree/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
node_modules/@types/estree/README.md ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Installation
2
+ > `npm install --save @types/estree`
3
+
4
+ # Summary
5
+ This package contains type definitions for estree (https://github.com/estree/estree).
6
+
7
+ # Details
8
+ Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree.
9
+
10
+ ### Additional Details
11
+ * Last updated: Fri, 06 Jun 2025 00:04:33 GMT
12
+ * Dependencies: none
13
+
14
+ # Credits
15
+ These definitions were written by [RReverser](https://github.com/RReverser).
node_modules/@types/estree/flow.d.ts ADDED
@@ -0,0 +1,167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ declare namespace ESTree {
2
+ interface FlowTypeAnnotation extends Node {}
3
+
4
+ interface FlowBaseTypeAnnotation extends FlowTypeAnnotation {}
5
+
6
+ interface FlowLiteralTypeAnnotation extends FlowTypeAnnotation, Literal {}
7
+
8
+ interface FlowDeclaration extends Declaration {}
9
+
10
+ interface AnyTypeAnnotation extends FlowBaseTypeAnnotation {}
11
+
12
+ interface ArrayTypeAnnotation extends FlowTypeAnnotation {
13
+ elementType: FlowTypeAnnotation;
14
+ }
15
+
16
+ interface BooleanLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {}
17
+
18
+ interface BooleanTypeAnnotation extends FlowBaseTypeAnnotation {}
19
+
20
+ interface ClassImplements extends Node {
21
+ id: Identifier;
22
+ typeParameters?: TypeParameterInstantiation | null;
23
+ }
24
+
25
+ interface ClassProperty {
26
+ key: Expression;
27
+ value?: Expression | null;
28
+ typeAnnotation?: TypeAnnotation | null;
29
+ computed: boolean;
30
+ static: boolean;
31
+ }
32
+
33
+ interface DeclareClass extends FlowDeclaration {
34
+ id: Identifier;
35
+ typeParameters?: TypeParameterDeclaration | null;
36
+ body: ObjectTypeAnnotation;
37
+ extends: InterfaceExtends[];
38
+ }
39
+
40
+ interface DeclareFunction extends FlowDeclaration {
41
+ id: Identifier;
42
+ }
43
+
44
+ interface DeclareModule extends FlowDeclaration {
45
+ id: Literal | Identifier;
46
+ body: BlockStatement;
47
+ }
48
+
49
+ interface DeclareVariable extends FlowDeclaration {
50
+ id: Identifier;
51
+ }
52
+
53
+ interface FunctionTypeAnnotation extends FlowTypeAnnotation {
54
+ params: FunctionTypeParam[];
55
+ returnType: FlowTypeAnnotation;
56
+ rest?: FunctionTypeParam | null;
57
+ typeParameters?: TypeParameterDeclaration | null;
58
+ }
59
+
60
+ interface FunctionTypeParam {
61
+ name: Identifier;
62
+ typeAnnotation: FlowTypeAnnotation;
63
+ optional: boolean;
64
+ }
65
+
66
+ interface GenericTypeAnnotation extends FlowTypeAnnotation {
67
+ id: Identifier | QualifiedTypeIdentifier;
68
+ typeParameters?: TypeParameterInstantiation | null;
69
+ }
70
+
71
+ interface InterfaceExtends extends Node {
72
+ id: Identifier | QualifiedTypeIdentifier;
73
+ typeParameters?: TypeParameterInstantiation | null;
74
+ }
75
+
76
+ interface InterfaceDeclaration extends FlowDeclaration {
77
+ id: Identifier;
78
+ typeParameters?: TypeParameterDeclaration | null;
79
+ extends: InterfaceExtends[];
80
+ body: ObjectTypeAnnotation;
81
+ }
82
+
83
+ interface IntersectionTypeAnnotation extends FlowTypeAnnotation {
84
+ types: FlowTypeAnnotation[];
85
+ }
86
+
87
+ interface MixedTypeAnnotation extends FlowBaseTypeAnnotation {}
88
+
89
+ interface NullableTypeAnnotation extends FlowTypeAnnotation {
90
+ typeAnnotation: TypeAnnotation;
91
+ }
92
+
93
+ interface NumberLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {}
94
+
95
+ interface NumberTypeAnnotation extends FlowBaseTypeAnnotation {}
96
+
97
+ interface StringLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {}
98
+
99
+ interface StringTypeAnnotation extends FlowBaseTypeAnnotation {}
100
+
101
+ interface TupleTypeAnnotation extends FlowTypeAnnotation {
102
+ types: FlowTypeAnnotation[];
103
+ }
104
+
105
+ interface TypeofTypeAnnotation extends FlowTypeAnnotation {
106
+ argument: FlowTypeAnnotation;
107
+ }
108
+
109
+ interface TypeAlias extends FlowDeclaration {
110
+ id: Identifier;
111
+ typeParameters?: TypeParameterDeclaration | null;
112
+ right: FlowTypeAnnotation;
113
+ }
114
+
115
+ interface TypeAnnotation extends Node {
116
+ typeAnnotation: FlowTypeAnnotation;
117
+ }
118
+
119
+ interface TypeCastExpression extends Expression {
120
+ expression: Expression;
121
+ typeAnnotation: TypeAnnotation;
122
+ }
123
+
124
+ interface TypeParameterDeclaration extends Node {
125
+ params: Identifier[];
126
+ }
127
+
128
+ interface TypeParameterInstantiation extends Node {
129
+ params: FlowTypeAnnotation[];
130
+ }
131
+
132
+ interface ObjectTypeAnnotation extends FlowTypeAnnotation {
133
+ properties: ObjectTypeProperty[];
134
+ indexers: ObjectTypeIndexer[];
135
+ callProperties: ObjectTypeCallProperty[];
136
+ }
137
+
138
+ interface ObjectTypeCallProperty extends Node {
139
+ value: FunctionTypeAnnotation;
140
+ static: boolean;
141
+ }
142
+
143
+ interface ObjectTypeIndexer extends Node {
144
+ id: Identifier;
145
+ key: FlowTypeAnnotation;
146
+ value: FlowTypeAnnotation;
147
+ static: boolean;
148
+ }
149
+
150
+ interface ObjectTypeProperty extends Node {
151
+ key: Expression;
152
+ value: FlowTypeAnnotation;
153
+ optional: boolean;
154
+ static: boolean;
155
+ }
156
+
157
+ interface QualifiedTypeIdentifier extends Node {
158
+ qualification: Identifier | QualifiedTypeIdentifier;
159
+ id: Identifier;
160
+ }
161
+
162
+ interface UnionTypeAnnotation extends FlowTypeAnnotation {
163
+ types: FlowTypeAnnotation[];
164
+ }
165
+
166
+ interface VoidTypeAnnotation extends FlowBaseTypeAnnotation {}
167
+ }
node_modules/@types/estree/index.d.ts ADDED
@@ -0,0 +1,694 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This definition file follows a somewhat unusual format. ESTree allows
2
+ // runtime type checks based on the `type` parameter. In order to explain this
3
+ // to typescript we want to use discriminated union types:
4
+ // https://github.com/Microsoft/TypeScript/pull/9163
5
+ //
6
+ // For ESTree this is a bit tricky because the high level interfaces like
7
+ // Node or Function are pulling double duty. We want to pass common fields down
8
+ // to the interfaces that extend them (like Identifier or
9
+ // ArrowFunctionExpression), but you can't extend a type union or enforce
10
+ // common fields on them. So we've split the high level interfaces into two
11
+ // types, a base type which passes down inherited fields, and a type union of
12
+ // all types which extend the base type. Only the type union is exported, and
13
+ // the union is how other types refer to the collection of inheriting types.
14
+ //
15
+ // This makes the definitions file here somewhat more difficult to maintain,
16
+ // but it has the notable advantage of making ESTree much easier to use as
17
+ // an end user.
18
+
19
+ export interface BaseNodeWithoutComments {
20
+ // Every leaf interface that extends BaseNode must specify a type property.
21
+ // The type property should be a string literal. For example, Identifier
22
+ // has: `type: "Identifier"`
23
+ type: string;
24
+ loc?: SourceLocation | null | undefined;
25
+ range?: [number, number] | undefined;
26
+ }
27
+
28
+ export interface BaseNode extends BaseNodeWithoutComments {
29
+ leadingComments?: Comment[] | undefined;
30
+ trailingComments?: Comment[] | undefined;
31
+ }
32
+
33
+ export interface NodeMap {
34
+ AssignmentProperty: AssignmentProperty;
35
+ CatchClause: CatchClause;
36
+ Class: Class;
37
+ ClassBody: ClassBody;
38
+ Expression: Expression;
39
+ Function: Function;
40
+ Identifier: Identifier;
41
+ Literal: Literal;
42
+ MethodDefinition: MethodDefinition;
43
+ ModuleDeclaration: ModuleDeclaration;
44
+ ModuleSpecifier: ModuleSpecifier;
45
+ Pattern: Pattern;
46
+ PrivateIdentifier: PrivateIdentifier;
47
+ Program: Program;
48
+ Property: Property;
49
+ PropertyDefinition: PropertyDefinition;
50
+ SpreadElement: SpreadElement;
51
+ Statement: Statement;
52
+ Super: Super;
53
+ SwitchCase: SwitchCase;
54
+ TemplateElement: TemplateElement;
55
+ VariableDeclarator: VariableDeclarator;
56
+ }
57
+
58
+ export type Node = NodeMap[keyof NodeMap];
59
+
60
+ export interface Comment extends BaseNodeWithoutComments {
61
+ type: "Line" | "Block";
62
+ value: string;
63
+ }
64
+
65
+ export interface SourceLocation {
66
+ source?: string | null | undefined;
67
+ start: Position;
68
+ end: Position;
69
+ }
70
+
71
+ export interface Position {
72
+ /** >= 1 */
73
+ line: number;
74
+ /** >= 0 */
75
+ column: number;
76
+ }
77
+
78
+ export interface Program extends BaseNode {
79
+ type: "Program";
80
+ sourceType: "script" | "module";
81
+ body: Array<Directive | Statement | ModuleDeclaration>;
82
+ comments?: Comment[] | undefined;
83
+ }
84
+
85
+ export interface Directive extends BaseNode {
86
+ type: "ExpressionStatement";
87
+ expression: Literal;
88
+ directive: string;
89
+ }
90
+
91
+ export interface BaseFunction extends BaseNode {
92
+ params: Pattern[];
93
+ generator?: boolean | undefined;
94
+ async?: boolean | undefined;
95
+ // The body is either BlockStatement or Expression because arrow functions
96
+ // can have a body that's either. FunctionDeclarations and
97
+ // FunctionExpressions have only BlockStatement bodies.
98
+ body: BlockStatement | Expression;
99
+ }
100
+
101
+ export type Function = FunctionDeclaration | FunctionExpression | ArrowFunctionExpression;
102
+
103
+ export type Statement =
104
+ | ExpressionStatement
105
+ | BlockStatement
106
+ | StaticBlock
107
+ | EmptyStatement
108
+ | DebuggerStatement
109
+ | WithStatement
110
+ | ReturnStatement
111
+ | LabeledStatement
112
+ | BreakStatement
113
+ | ContinueStatement
114
+ | IfStatement
115
+ | SwitchStatement
116
+ | ThrowStatement
117
+ | TryStatement
118
+ | WhileStatement
119
+ | DoWhileStatement
120
+ | ForStatement
121
+ | ForInStatement
122
+ | ForOfStatement
123
+ | Declaration;
124
+
125
+ export interface BaseStatement extends BaseNode {}
126
+
127
+ export interface EmptyStatement extends BaseStatement {
128
+ type: "EmptyStatement";
129
+ }
130
+
131
+ export interface BlockStatement extends BaseStatement {
132
+ type: "BlockStatement";
133
+ body: Statement[];
134
+ innerComments?: Comment[] | undefined;
135
+ }
136
+
137
+ export interface StaticBlock extends Omit<BlockStatement, "type"> {
138
+ type: "StaticBlock";
139
+ }
140
+
141
+ export interface ExpressionStatement extends BaseStatement {
142
+ type: "ExpressionStatement";
143
+ expression: Expression;
144
+ }
145
+
146
+ export interface IfStatement extends BaseStatement {
147
+ type: "IfStatement";
148
+ test: Expression;
149
+ consequent: Statement;
150
+ alternate?: Statement | null | undefined;
151
+ }
152
+
153
+ export interface LabeledStatement extends BaseStatement {
154
+ type: "LabeledStatement";
155
+ label: Identifier;
156
+ body: Statement;
157
+ }
158
+
159
+ export interface BreakStatement extends BaseStatement {
160
+ type: "BreakStatement";
161
+ label?: Identifier | null | undefined;
162
+ }
163
+
164
+ export interface ContinueStatement extends BaseStatement {
165
+ type: "ContinueStatement";
166
+ label?: Identifier | null | undefined;
167
+ }
168
+
169
+ export interface WithStatement extends BaseStatement {
170
+ type: "WithStatement";
171
+ object: Expression;
172
+ body: Statement;
173
+ }
174
+
175
+ export interface SwitchStatement extends BaseStatement {
176
+ type: "SwitchStatement";
177
+ discriminant: Expression;
178
+ cases: SwitchCase[];
179
+ }
180
+
181
+ export interface ReturnStatement extends BaseStatement {
182
+ type: "ReturnStatement";
183
+ argument?: Expression | null | undefined;
184
+ }
185
+
186
+ export interface ThrowStatement extends BaseStatement {
187
+ type: "ThrowStatement";
188
+ argument: Expression;
189
+ }
190
+
191
+ export interface TryStatement extends BaseStatement {
192
+ type: "TryStatement";
193
+ block: BlockStatement;
194
+ handler?: CatchClause | null | undefined;
195
+ finalizer?: BlockStatement | null | undefined;
196
+ }
197
+
198
+ export interface WhileStatement extends BaseStatement {
199
+ type: "WhileStatement";
200
+ test: Expression;
201
+ body: Statement;
202
+ }
203
+
204
+ export interface DoWhileStatement extends BaseStatement {
205
+ type: "DoWhileStatement";
206
+ body: Statement;
207
+ test: Expression;
208
+ }
209
+
210
+ export interface ForStatement extends BaseStatement {
211
+ type: "ForStatement";
212
+ init?: VariableDeclaration | Expression | null | undefined;
213
+ test?: Expression | null | undefined;
214
+ update?: Expression | null | undefined;
215
+ body: Statement;
216
+ }
217
+
218
+ export interface BaseForXStatement extends BaseStatement {
219
+ left: VariableDeclaration | Pattern;
220
+ right: Expression;
221
+ body: Statement;
222
+ }
223
+
224
+ export interface ForInStatement extends BaseForXStatement {
225
+ type: "ForInStatement";
226
+ }
227
+
228
+ export interface DebuggerStatement extends BaseStatement {
229
+ type: "DebuggerStatement";
230
+ }
231
+
232
+ export type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration;
233
+
234
+ export interface BaseDeclaration extends BaseStatement {}
235
+
236
+ export interface MaybeNamedFunctionDeclaration extends BaseFunction, BaseDeclaration {
237
+ type: "FunctionDeclaration";
238
+ /** It is null when a function declaration is a part of the `export default function` statement */
239
+ id: Identifier | null;
240
+ body: BlockStatement;
241
+ }
242
+
243
+ export interface FunctionDeclaration extends MaybeNamedFunctionDeclaration {
244
+ id: Identifier;
245
+ }
246
+
247
+ export interface VariableDeclaration extends BaseDeclaration {
248
+ type: "VariableDeclaration";
249
+ declarations: VariableDeclarator[];
250
+ kind: "var" | "let" | "const" | "using" | "await using";
251
+ }
252
+
253
+ export interface VariableDeclarator extends BaseNode {
254
+ type: "VariableDeclarator";
255
+ id: Pattern;
256
+ init?: Expression | null | undefined;
257
+ }
258
+
259
+ export interface ExpressionMap {
260
+ ArrayExpression: ArrayExpression;
261
+ ArrowFunctionExpression: ArrowFunctionExpression;
262
+ AssignmentExpression: AssignmentExpression;
263
+ AwaitExpression: AwaitExpression;
264
+ BinaryExpression: BinaryExpression;
265
+ CallExpression: CallExpression;
266
+ ChainExpression: ChainExpression;
267
+ ClassExpression: ClassExpression;
268
+ ConditionalExpression: ConditionalExpression;
269
+ FunctionExpression: FunctionExpression;
270
+ Identifier: Identifier;
271
+ ImportExpression: ImportExpression;
272
+ Literal: Literal;
273
+ LogicalExpression: LogicalExpression;
274
+ MemberExpression: MemberExpression;
275
+ MetaProperty: MetaProperty;
276
+ NewExpression: NewExpression;
277
+ ObjectExpression: ObjectExpression;
278
+ SequenceExpression: SequenceExpression;
279
+ TaggedTemplateExpression: TaggedTemplateExpression;
280
+ TemplateLiteral: TemplateLiteral;
281
+ ThisExpression: ThisExpression;
282
+ UnaryExpression: UnaryExpression;
283
+ UpdateExpression: UpdateExpression;
284
+ YieldExpression: YieldExpression;
285
+ }
286
+
287
+ export type Expression = ExpressionMap[keyof ExpressionMap];
288
+
289
+ export interface BaseExpression extends BaseNode {}
290
+
291
+ export type ChainElement = SimpleCallExpression | MemberExpression;
292
+
293
+ export interface ChainExpression extends BaseExpression {
294
+ type: "ChainExpression";
295
+ expression: ChainElement;
296
+ }
297
+
298
+ export interface ThisExpression extends BaseExpression {
299
+ type: "ThisExpression";
300
+ }
301
+
302
+ export interface ArrayExpression extends BaseExpression {
303
+ type: "ArrayExpression";
304
+ elements: Array<Expression | SpreadElement | null>;
305
+ }
306
+
307
+ export interface ObjectExpression extends BaseExpression {
308
+ type: "ObjectExpression";
309
+ properties: Array<Property | SpreadElement>;
310
+ }
311
+
312
+ export interface PrivateIdentifier extends BaseNode {
313
+ type: "PrivateIdentifier";
314
+ name: string;
315
+ }
316
+
317
+ export interface Property extends BaseNode {
318
+ type: "Property";
319
+ key: Expression | PrivateIdentifier;
320
+ value: Expression | Pattern; // Could be an AssignmentProperty
321
+ kind: "init" | "get" | "set";
322
+ method: boolean;
323
+ shorthand: boolean;
324
+ computed: boolean;
325
+ }
326
+
327
+ export interface PropertyDefinition extends BaseNode {
328
+ type: "PropertyDefinition";
329
+ key: Expression | PrivateIdentifier;
330
+ value?: Expression | null | undefined;
331
+ computed: boolean;
332
+ static: boolean;
333
+ }
334
+
335
+ export interface FunctionExpression extends BaseFunction, BaseExpression {
336
+ id?: Identifier | null | undefined;
337
+ type: "FunctionExpression";
338
+ body: BlockStatement;
339
+ }
340
+
341
+ export interface SequenceExpression extends BaseExpression {
342
+ type: "SequenceExpression";
343
+ expressions: Expression[];
344
+ }
345
+
346
+ export interface UnaryExpression extends BaseExpression {
347
+ type: "UnaryExpression";
348
+ operator: UnaryOperator;
349
+ prefix: true;
350
+ argument: Expression;
351
+ }
352
+
353
+ export interface BinaryExpression extends BaseExpression {
354
+ type: "BinaryExpression";
355
+ operator: BinaryOperator;
356
+ left: Expression | PrivateIdentifier;
357
+ right: Expression;
358
+ }
359
+
360
+ export interface AssignmentExpression extends BaseExpression {
361
+ type: "AssignmentExpression";
362
+ operator: AssignmentOperator;
363
+ left: Pattern | MemberExpression;
364
+ right: Expression;
365
+ }
366
+
367
+ export interface UpdateExpression extends BaseExpression {
368
+ type: "UpdateExpression";
369
+ operator: UpdateOperator;
370
+ argument: Expression;
371
+ prefix: boolean;
372
+ }
373
+
374
+ export interface LogicalExpression extends BaseExpression {
375
+ type: "LogicalExpression";
376
+ operator: LogicalOperator;
377
+ left: Expression;
378
+ right: Expression;
379
+ }
380
+
381
+ export interface ConditionalExpression extends BaseExpression {
382
+ type: "ConditionalExpression";
383
+ test: Expression;
384
+ alternate: Expression;
385
+ consequent: Expression;
386
+ }
387
+
388
+ export interface BaseCallExpression extends BaseExpression {
389
+ callee: Expression | Super;
390
+ arguments: Array<Expression | SpreadElement>;
391
+ }
392
+ export type CallExpression = SimpleCallExpression | NewExpression;
393
+
394
+ export interface SimpleCallExpression extends BaseCallExpression {
395
+ type: "CallExpression";
396
+ optional: boolean;
397
+ }
398
+
399
+ export interface NewExpression extends BaseCallExpression {
400
+ type: "NewExpression";
401
+ }
402
+
403
+ export interface MemberExpression extends BaseExpression, BasePattern {
404
+ type: "MemberExpression";
405
+ object: Expression | Super;
406
+ property: Expression | PrivateIdentifier;
407
+ computed: boolean;
408
+ optional: boolean;
409
+ }
410
+
411
+ export type Pattern = Identifier | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | MemberExpression;
412
+
413
+ export interface BasePattern extends BaseNode {}
414
+
415
+ export interface SwitchCase extends BaseNode {
416
+ type: "SwitchCase";
417
+ test?: Expression | null | undefined;
418
+ consequent: Statement[];
419
+ }
420
+
421
+ export interface CatchClause extends BaseNode {
422
+ type: "CatchClause";
423
+ param: Pattern | null;
424
+ body: BlockStatement;
425
+ }
426
+
427
+ export interface Identifier extends BaseNode, BaseExpression, BasePattern {
428
+ type: "Identifier";
429
+ name: string;
430
+ }
431
+
432
+ export type Literal = SimpleLiteral | RegExpLiteral | BigIntLiteral;
433
+
434
+ export interface SimpleLiteral extends BaseNode, BaseExpression {
435
+ type: "Literal";
436
+ value: string | boolean | number | null;
437
+ raw?: string | undefined;
438
+ }
439
+
440
+ export interface RegExpLiteral extends BaseNode, BaseExpression {
441
+ type: "Literal";
442
+ value?: RegExp | null | undefined;
443
+ regex: {
444
+ pattern: string;
445
+ flags: string;
446
+ };
447
+ raw?: string | undefined;
448
+ }
449
+
450
+ export interface BigIntLiteral extends BaseNode, BaseExpression {
451
+ type: "Literal";
452
+ value?: bigint | null | undefined;
453
+ bigint: string;
454
+ raw?: string | undefined;
455
+ }
456
+
457
+ export type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete";
458
+
459
+ export type BinaryOperator =
460
+ | "=="
461
+ | "!="
462
+ | "==="
463
+ | "!=="
464
+ | "<"
465
+ | "<="
466
+ | ">"
467
+ | ">="
468
+ | "<<"
469
+ | ">>"
470
+ | ">>>"
471
+ | "+"
472
+ | "-"
473
+ | "*"
474
+ | "/"
475
+ | "%"
476
+ | "**"
477
+ | "|"
478
+ | "^"
479
+ | "&"
480
+ | "in"
481
+ | "instanceof";
482
+
483
+ export type LogicalOperator = "||" | "&&" | "??";
484
+
485
+ export type AssignmentOperator =
486
+ | "="
487
+ | "+="
488
+ | "-="
489
+ | "*="
490
+ | "/="
491
+ | "%="
492
+ | "**="
493
+ | "<<="
494
+ | ">>="
495
+ | ">>>="
496
+ | "|="
497
+ | "^="
498
+ | "&="
499
+ | "||="
500
+ | "&&="
501
+ | "??=";
502
+
503
+ export type UpdateOperator = "++" | "--";
504
+
505
+ export interface ForOfStatement extends BaseForXStatement {
506
+ type: "ForOfStatement";
507
+ await: boolean;
508
+ }
509
+
510
+ export interface Super extends BaseNode {
511
+ type: "Super";
512
+ }
513
+
514
+ export interface SpreadElement extends BaseNode {
515
+ type: "SpreadElement";
516
+ argument: Expression;
517
+ }
518
+
519
+ export interface ArrowFunctionExpression extends BaseExpression, BaseFunction {
520
+ type: "ArrowFunctionExpression";
521
+ expression: boolean;
522
+ body: BlockStatement | Expression;
523
+ }
524
+
525
+ export interface YieldExpression extends BaseExpression {
526
+ type: "YieldExpression";
527
+ argument?: Expression | null | undefined;
528
+ delegate: boolean;
529
+ }
530
+
531
+ export interface TemplateLiteral extends BaseExpression {
532
+ type: "TemplateLiteral";
533
+ quasis: TemplateElement[];
534
+ expressions: Expression[];
535
+ }
536
+
537
+ export interface TaggedTemplateExpression extends BaseExpression {
538
+ type: "TaggedTemplateExpression";
539
+ tag: Expression;
540
+ quasi: TemplateLiteral;
541
+ }
542
+
543
+ export interface TemplateElement extends BaseNode {
544
+ type: "TemplateElement";
545
+ tail: boolean;
546
+ value: {
547
+ /** It is null when the template literal is tagged and the text has an invalid escape (e.g. - tag`\unicode and \u{55}`) */
548
+ cooked?: string | null | undefined;
549
+ raw: string;
550
+ };
551
+ }
552
+
553
+ export interface AssignmentProperty extends Property {
554
+ value: Pattern;
555
+ kind: "init";
556
+ method: boolean; // false
557
+ }
558
+
559
+ export interface ObjectPattern extends BasePattern {
560
+ type: "ObjectPattern";
561
+ properties: Array<AssignmentProperty | RestElement>;
562
+ }
563
+
564
+ export interface ArrayPattern extends BasePattern {
565
+ type: "ArrayPattern";
566
+ elements: Array<Pattern | null>;
567
+ }
568
+
569
+ export interface RestElement extends BasePattern {
570
+ type: "RestElement";
571
+ argument: Pattern;
572
+ }
573
+
574
+ export interface AssignmentPattern extends BasePattern {
575
+ type: "AssignmentPattern";
576
+ left: Pattern;
577
+ right: Expression;
578
+ }
579
+
580
+ export type Class = ClassDeclaration | ClassExpression;
581
+ export interface BaseClass extends BaseNode {
582
+ superClass?: Expression | null | undefined;
583
+ body: ClassBody;
584
+ }
585
+
586
+ export interface ClassBody extends BaseNode {
587
+ type: "ClassBody";
588
+ body: Array<MethodDefinition | PropertyDefinition | StaticBlock>;
589
+ }
590
+
591
+ export interface MethodDefinition extends BaseNode {
592
+ type: "MethodDefinition";
593
+ key: Expression | PrivateIdentifier;
594
+ value: FunctionExpression;
595
+ kind: "constructor" | "method" | "get" | "set";
596
+ computed: boolean;
597
+ static: boolean;
598
+ }
599
+
600
+ export interface MaybeNamedClassDeclaration extends BaseClass, BaseDeclaration {
601
+ type: "ClassDeclaration";
602
+ /** It is null when a class declaration is a part of the `export default class` statement */
603
+ id: Identifier | null;
604
+ }
605
+
606
+ export interface ClassDeclaration extends MaybeNamedClassDeclaration {
607
+ id: Identifier;
608
+ }
609
+
610
+ export interface ClassExpression extends BaseClass, BaseExpression {
611
+ type: "ClassExpression";
612
+ id?: Identifier | null | undefined;
613
+ }
614
+
615
+ export interface MetaProperty extends BaseExpression {
616
+ type: "MetaProperty";
617
+ meta: Identifier;
618
+ property: Identifier;
619
+ }
620
+
621
+ export type ModuleDeclaration =
622
+ | ImportDeclaration
623
+ | ExportNamedDeclaration
624
+ | ExportDefaultDeclaration
625
+ | ExportAllDeclaration;
626
+ export interface BaseModuleDeclaration extends BaseNode {}
627
+
628
+ export type ModuleSpecifier = ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier;
629
+ export interface BaseModuleSpecifier extends BaseNode {
630
+ local: Identifier;
631
+ }
632
+
633
+ export interface ImportDeclaration extends BaseModuleDeclaration {
634
+ type: "ImportDeclaration";
635
+ specifiers: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>;
636
+ attributes: ImportAttribute[];
637
+ source: Literal;
638
+ }
639
+
640
+ export interface ImportSpecifier extends BaseModuleSpecifier {
641
+ type: "ImportSpecifier";
642
+ imported: Identifier | Literal;
643
+ }
644
+
645
+ export interface ImportAttribute extends BaseNode {
646
+ type: "ImportAttribute";
647
+ key: Identifier | Literal;
648
+ value: Literal;
649
+ }
650
+
651
+ export interface ImportExpression extends BaseExpression {
652
+ type: "ImportExpression";
653
+ source: Expression;
654
+ options?: Expression | null | undefined;
655
+ }
656
+
657
+ export interface ImportDefaultSpecifier extends BaseModuleSpecifier {
658
+ type: "ImportDefaultSpecifier";
659
+ }
660
+
661
+ export interface ImportNamespaceSpecifier extends BaseModuleSpecifier {
662
+ type: "ImportNamespaceSpecifier";
663
+ }
664
+
665
+ export interface ExportNamedDeclaration extends BaseModuleDeclaration {
666
+ type: "ExportNamedDeclaration";
667
+ declaration?: Declaration | null | undefined;
668
+ specifiers: ExportSpecifier[];
669
+ attributes: ImportAttribute[];
670
+ source?: Literal | null | undefined;
671
+ }
672
+
673
+ export interface ExportSpecifier extends Omit<BaseModuleSpecifier, "local"> {
674
+ type: "ExportSpecifier";
675
+ local: Identifier | Literal;
676
+ exported: Identifier | Literal;
677
+ }
678
+
679
+ export interface ExportDefaultDeclaration extends BaseModuleDeclaration {
680
+ type: "ExportDefaultDeclaration";
681
+ declaration: MaybeNamedFunctionDeclaration | MaybeNamedClassDeclaration | Expression;
682
+ }
683
+
684
+ export interface ExportAllDeclaration extends BaseModuleDeclaration {
685
+ type: "ExportAllDeclaration";
686
+ exported: Identifier | Literal | null;
687
+ attributes: ImportAttribute[];
688
+ source: Literal;
689
+ }
690
+
691
+ export interface AwaitExpression extends BaseExpression {
692
+ type: "AwaitExpression";
693
+ argument: Expression;
694
+ }
node_modules/@types/estree/package.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "@types/estree",
3
+ "version": "1.0.8",
4
+ "description": "TypeScript definitions for estree",
5
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree",
6
+ "license": "MIT",
7
+ "contributors": [
8
+ {
9
+ "name": "RReverser",
10
+ "githubUsername": "RReverser",
11
+ "url": "https://github.com/RReverser"
12
+ }
13
+ ],
14
+ "main": "",
15
+ "types": "index.d.ts",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
19
+ "directory": "types/estree"
20
+ },
21
+ "scripts": {},
22
+ "dependencies": {},
23
+ "peerDependencies": {},
24
+ "typesPublisherContentHash": "7a167b6e4a4d9f6e9a2cb9fd3fc45c885f89cbdeb44b3e5961bb057a45c082fd",
25
+ "typeScriptVersion": "5.1",
26
+ "nonNpm": true
27
+ }
node_modules/@types/node/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
node_modules/@types/node/README.md ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Installation
2
+ > `npm install --save @types/node`
3
+
4
+ # Summary
5
+ This package contains type definitions for node (https://nodejs.org/).
6
+
7
+ # Details
8
+ Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v22.
9
+
10
+ ### Additional Details
11
+ * Last updated: Tue, 10 Feb 2026 14:48:58 GMT
12
+ * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
+
14
+ # Credits
15
+ These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [David Junger](https://github.com/touffy), [Mohsen Azimi](https://github.com/mohsen1), [Nikita Galkin](https://github.com/galkin), [Sebastian Silbermann](https://github.com/eps1lon), [Wilco Bakker](https://github.com/WilcoBakker), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), [Dmitry Semigradsky](https://github.com/Semigradsky), and [René](https://github.com/Renegade334).
node_modules/@types/node/assert.d.ts ADDED
@@ -0,0 +1,1078 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * The `node:assert` module provides a set of assertion functions for verifying
3
+ * invariants.
4
+ * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/assert.js)
5
+ */
6
+ declare module "assert" {
7
+ import strict = require("assert/strict");
8
+ /**
9
+ * An alias of {@link assert.ok}.
10
+ * @since v0.5.9
11
+ * @param value The input that is checked for being truthy.
12
+ */
13
+ function assert(value: unknown, message?: string | Error): asserts value;
14
+ const kOptions: unique symbol;
15
+ namespace assert {
16
+ type AssertMethodNames =
17
+ | "deepEqual"
18
+ | "deepStrictEqual"
19
+ | "doesNotMatch"
20
+ | "doesNotReject"
21
+ | "doesNotThrow"
22
+ | "equal"
23
+ | "fail"
24
+ | "ifError"
25
+ | "match"
26
+ | "notDeepEqual"
27
+ | "notDeepStrictEqual"
28
+ | "notEqual"
29
+ | "notStrictEqual"
30
+ | "ok"
31
+ | "partialDeepStrictEqual"
32
+ | "rejects"
33
+ | "strictEqual"
34
+ | "throws";
35
+ interface AssertOptions {
36
+ /**
37
+ * If set to `'full'`, shows the full diff in assertion errors.
38
+ * @default 'simple'
39
+ */
40
+ diff?: "simple" | "full" | undefined;
41
+ /**
42
+ * If set to `true`, non-strict methods behave like their
43
+ * corresponding strict methods.
44
+ * @default true
45
+ */
46
+ strict?: boolean | undefined;
47
+ }
48
+ interface Assert extends Pick<typeof assert, AssertMethodNames> {
49
+ readonly [kOptions]: AssertOptions & { strict: false };
50
+ }
51
+ interface AssertStrict extends Pick<typeof strict, AssertMethodNames> {
52
+ readonly [kOptions]: AssertOptions & { strict: true };
53
+ }
54
+ /**
55
+ * The `Assert` class allows creating independent assertion instances with custom options.
56
+ * @since v22.19.0
57
+ */
58
+ var Assert: {
59
+ /**
60
+ * Creates a new assertion instance. The `diff` option controls the verbosity of diffs in assertion error messages.
61
+ *
62
+ * ```js
63
+ * const { Assert } = require('node:assert');
64
+ * const assertInstance = new Assert({ diff: 'full' });
65
+ * assertInstance.deepStrictEqual({ a: 1 }, { a: 2 });
66
+ * // Shows a full diff in the error message.
67
+ * ```
68
+ *
69
+ * **Important**: When destructuring assertion methods from an `Assert` instance,
70
+ * the methods lose their connection to the instance's configuration options (such as `diff` and `strict` settings).
71
+ * The destructured methods will fall back to default behavior instead.
72
+ *
73
+ * ```js
74
+ * const myAssert = new Assert({ diff: 'full' });
75
+ *
76
+ * // This works as expected - uses 'full' diff
77
+ * myAssert.strictEqual({ a: 1 }, { b: { c: 1 } });
78
+ *
79
+ * // This loses the 'full' diff setting - falls back to default 'simple' diff
80
+ * const { strictEqual } = myAssert;
81
+ * strictEqual({ a: 1 }, { b: { c: 1 } });
82
+ * ```
83
+ *
84
+ * When destructured, methods lose access to the instance's `this` context and revert to default assertion behavior
85
+ * (diff: 'simple', non-strict mode).
86
+ * To maintain custom options when using destructured methods, avoid
87
+ * destructuring and call methods directly on the instance.
88
+ * @since v22.19.0
89
+ */
90
+ new(
91
+ options?: AssertOptions & { strict?: true },
92
+ ): AssertStrict;
93
+ new(
94
+ options: AssertOptions,
95
+ ): Assert;
96
+ };
97
+ interface AssertionErrorOptions {
98
+ /**
99
+ * If provided, the error message is set to this value.
100
+ */
101
+ message?: string | undefined;
102
+ /**
103
+ * The `actual` property on the error instance.
104
+ */
105
+ actual?: unknown;
106
+ /**
107
+ * The `expected` property on the error instance.
108
+ */
109
+ expected?: unknown;
110
+ /**
111
+ * The `operator` property on the error instance.
112
+ */
113
+ operator?: string | undefined;
114
+ /**
115
+ * If provided, the generated stack trace omits frames before this function.
116
+ */
117
+ stackStartFn?: Function | undefined;
118
+ /**
119
+ * If set to `'full'`, shows the full diff in assertion errors.
120
+ * @default 'simple'
121
+ */
122
+ diff?: "simple" | "full" | undefined;
123
+ }
124
+ /**
125
+ * Indicates the failure of an assertion. All errors thrown by the `node:assert` module will be instances of the `AssertionError` class.
126
+ */
127
+ class AssertionError extends Error {
128
+ constructor(options: AssertionErrorOptions);
129
+ /**
130
+ * Set to the `actual` argument for methods such as {@link assert.strictEqual()}.
131
+ */
132
+ actual: unknown;
133
+ /**
134
+ * Set to the `expected` argument for methods such as {@link assert.strictEqual()}.
135
+ */
136
+ expected: unknown;
137
+ /**
138
+ * Indicates if the message was auto-generated (`true`) or not.
139
+ */
140
+ generatedMessage: boolean;
141
+ /**
142
+ * Value is always `ERR_ASSERTION` to show that the error is an assertion error.
143
+ */
144
+ code: "ERR_ASSERTION";
145
+ /**
146
+ * Set to the passed in operator value.
147
+ */
148
+ operator: string;
149
+ }
150
+ /**
151
+ * This feature is deprecated and will be removed in a future version.
152
+ * Please consider using alternatives such as the `mock` helper function.
153
+ * @since v14.2.0, v12.19.0
154
+ * @deprecated Deprecated
155
+ */
156
+ class CallTracker {
157
+ /**
158
+ * The wrapper function is expected to be called exactly `exact` times. If the
159
+ * function has not been called exactly `exact` times when `tracker.verify()` is called, then `tracker.verify()` will throw an
160
+ * error.
161
+ *
162
+ * ```js
163
+ * import assert from 'node:assert';
164
+ *
165
+ * // Creates call tracker.
166
+ * const tracker = new assert.CallTracker();
167
+ *
168
+ * function func() {}
169
+ *
170
+ * // Returns a function that wraps func() that must be called exact times
171
+ * // before tracker.verify().
172
+ * const callsfunc = tracker.calls(func);
173
+ * ```
174
+ * @since v14.2.0, v12.19.0
175
+ * @param [fn='A no-op function']
176
+ * @param [exact=1]
177
+ * @return A function that wraps `fn`.
178
+ */
179
+ calls(exact?: number): () => void;
180
+ calls<Func extends (...args: any[]) => any>(fn?: Func, exact?: number): Func;
181
+ /**
182
+ * Example:
183
+ *
184
+ * ```js
185
+ * import assert from 'node:assert';
186
+ *
187
+ * const tracker = new assert.CallTracker();
188
+ *
189
+ * function func() {}
190
+ * const callsfunc = tracker.calls(func);
191
+ * callsfunc(1, 2, 3);
192
+ *
193
+ * assert.deepStrictEqual(tracker.getCalls(callsfunc),
194
+ * [{ thisArg: undefined, arguments: [1, 2, 3] }]);
195
+ * ```
196
+ * @since v18.8.0, v16.18.0
197
+ * @return An array with all the calls to a tracked function.
198
+ */
199
+ getCalls(fn: Function): CallTrackerCall[];
200
+ /**
201
+ * The arrays contains information about the expected and actual number of calls of
202
+ * the functions that have not been called the expected number of times.
203
+ *
204
+ * ```js
205
+ * import assert from 'node:assert';
206
+ *
207
+ * // Creates call tracker.
208
+ * const tracker = new assert.CallTracker();
209
+ *
210
+ * function func() {}
211
+ *
212
+ * // Returns a function that wraps func() that must be called exact times
213
+ * // before tracker.verify().
214
+ * const callsfunc = tracker.calls(func, 2);
215
+ *
216
+ * // Returns an array containing information on callsfunc()
217
+ * console.log(tracker.report());
218
+ * // [
219
+ * // {
220
+ * // message: 'Expected the func function to be executed 2 time(s) but was
221
+ * // executed 0 time(s).',
222
+ * // actual: 0,
223
+ * // expected: 2,
224
+ * // operator: 'func',
225
+ * // stack: stack trace
226
+ * // }
227
+ * // ]
228
+ * ```
229
+ * @since v14.2.0, v12.19.0
230
+ * @return An array of objects containing information about the wrapper functions returned by {@link tracker.calls()}.
231
+ */
232
+ report(): CallTrackerReportInformation[];
233
+ /**
234
+ * Reset calls of the call tracker. If a tracked function is passed as an argument, the calls will be reset for it.
235
+ * If no arguments are passed, all tracked functions will be reset.
236
+ *
237
+ * ```js
238
+ * import assert from 'node:assert';
239
+ *
240
+ * const tracker = new assert.CallTracker();
241
+ *
242
+ * function func() {}
243
+ * const callsfunc = tracker.calls(func);
244
+ *
245
+ * callsfunc();
246
+ * // Tracker was called once
247
+ * assert.strictEqual(tracker.getCalls(callsfunc).length, 1);
248
+ *
249
+ * tracker.reset(callsfunc);
250
+ * assert.strictEqual(tracker.getCalls(callsfunc).length, 0);
251
+ * ```
252
+ * @since v18.8.0, v16.18.0
253
+ * @param fn a tracked function to reset.
254
+ */
255
+ reset(fn?: Function): void;
256
+ /**
257
+ * Iterates through the list of functions passed to {@link tracker.calls()} and will throw an error for functions that
258
+ * have not been called the expected number of times.
259
+ *
260
+ * ```js
261
+ * import assert from 'node:assert';
262
+ *
263
+ * // Creates call tracker.
264
+ * const tracker = new assert.CallTracker();
265
+ *
266
+ * function func() {}
267
+ *
268
+ * // Returns a function that wraps func() that must be called exact times
269
+ * // before tracker.verify().
270
+ * const callsfunc = tracker.calls(func, 2);
271
+ *
272
+ * callsfunc();
273
+ *
274
+ * // Will throw an error since callsfunc() was only called once.
275
+ * tracker.verify();
276
+ * ```
277
+ * @since v14.2.0, v12.19.0
278
+ */
279
+ verify(): void;
280
+ }
281
+ interface CallTrackerCall {
282
+ thisArg: object;
283
+ arguments: unknown[];
284
+ }
285
+ interface CallTrackerReportInformation {
286
+ message: string;
287
+ /** The actual number of times the function was called. */
288
+ actual: number;
289
+ /** The number of times the function was expected to be called. */
290
+ expected: number;
291
+ /** The name of the function that is wrapped. */
292
+ operator: string;
293
+ /** A stack trace of the function. */
294
+ stack: object;
295
+ }
296
+ type AssertPredicate = RegExp | (new() => object) | ((thrown: unknown) => boolean) | object | Error;
297
+ /**
298
+ * Throws an `AssertionError` with the provided error message or a default
299
+ * error message. If the `message` parameter is an instance of an `Error` then
300
+ * it will be thrown instead of the `AssertionError`.
301
+ *
302
+ * ```js
303
+ * import assert from 'node:assert/strict';
304
+ *
305
+ * assert.fail();
306
+ * // AssertionError [ERR_ASSERTION]: Failed
307
+ *
308
+ * assert.fail('boom');
309
+ * // AssertionError [ERR_ASSERTION]: boom
310
+ *
311
+ * assert.fail(new TypeError('need array'));
312
+ * // TypeError: need array
313
+ * ```
314
+ *
315
+ * Using `assert.fail()` with more than two arguments is possible but deprecated.
316
+ * See below for further details.
317
+ * @since v0.1.21
318
+ * @param [message='Failed']
319
+ */
320
+ function fail(message?: string | Error): never;
321
+ /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
322
+ function fail(
323
+ actual: unknown,
324
+ expected: unknown,
325
+ message?: string | Error,
326
+ operator?: string,
327
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
328
+ stackStartFn?: Function,
329
+ ): never;
330
+ /**
331
+ * Tests if `value` is truthy. It is equivalent to `assert.equal(!!value, true, message)`.
332
+ *
333
+ * If `value` is not truthy, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is `undefined`, a default
334
+ * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`.
335
+ * If no arguments are passed in at all `message` will be set to the string:`` 'No value argument passed to `assert.ok()`' ``.
336
+ *
337
+ * Be aware that in the `repl` the error message will be different to the one
338
+ * thrown in a file! See below for further details.
339
+ *
340
+ * ```js
341
+ * import assert from 'node:assert/strict';
342
+ *
343
+ * assert.ok(true);
344
+ * // OK
345
+ * assert.ok(1);
346
+ * // OK
347
+ *
348
+ * assert.ok();
349
+ * // AssertionError: No value argument passed to `assert.ok()`
350
+ *
351
+ * assert.ok(false, 'it\'s false');
352
+ * // AssertionError: it's false
353
+ *
354
+ * // In the repl:
355
+ * assert.ok(typeof 123 === 'string');
356
+ * // AssertionError: false == true
357
+ *
358
+ * // In a file (e.g. test.js):
359
+ * assert.ok(typeof 123 === 'string');
360
+ * // AssertionError: The expression evaluated to a falsy value:
361
+ * //
362
+ * // assert.ok(typeof 123 === 'string')
363
+ *
364
+ * assert.ok(false);
365
+ * // AssertionError: The expression evaluated to a falsy value:
366
+ * //
367
+ * // assert.ok(false)
368
+ *
369
+ * assert.ok(0);
370
+ * // AssertionError: The expression evaluated to a falsy value:
371
+ * //
372
+ * // assert.ok(0)
373
+ * ```
374
+ *
375
+ * ```js
376
+ * import assert from 'node:assert/strict';
377
+ *
378
+ * // Using `assert()` works the same:
379
+ * assert(0);
380
+ * // AssertionError: The expression evaluated to a falsy value:
381
+ * //
382
+ * // assert(0)
383
+ * ```
384
+ * @since v0.1.21
385
+ */
386
+ function ok(value: unknown, message?: string | Error): asserts value;
387
+ /**
388
+ * **Strict assertion mode**
389
+ *
390
+ * An alias of {@link strictEqual}.
391
+ *
392
+ * **Legacy assertion mode**
393
+ *
394
+ * > Stability: 3 - Legacy: Use {@link strictEqual} instead.
395
+ *
396
+ * Tests shallow, coercive equality between the `actual` and `expected` parameters
397
+ * using the [`==` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Equality). `NaN` is specially handled
398
+ * and treated as being identical if both sides are `NaN`.
399
+ *
400
+ * ```js
401
+ * import assert from 'node:assert';
402
+ *
403
+ * assert.equal(1, 1);
404
+ * // OK, 1 == 1
405
+ * assert.equal(1, '1');
406
+ * // OK, 1 == '1'
407
+ * assert.equal(NaN, NaN);
408
+ * // OK
409
+ *
410
+ * assert.equal(1, 2);
411
+ * // AssertionError: 1 == 2
412
+ * assert.equal({ a: { b: 1 } }, { a: { b: 1 } });
413
+ * // AssertionError: { a: { b: 1 } } == { a: { b: 1 } }
414
+ * ```
415
+ *
416
+ * If the values are not equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default
417
+ * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`.
418
+ * @since v0.1.21
419
+ */
420
+ function equal(actual: unknown, expected: unknown, message?: string | Error): void;
421
+ /**
422
+ * **Strict assertion mode**
423
+ *
424
+ * An alias of {@link notStrictEqual}.
425
+ *
426
+ * **Legacy assertion mode**
427
+ *
428
+ * > Stability: 3 - Legacy: Use {@link notStrictEqual} instead.
429
+ *
430
+ * Tests shallow, coercive inequality with the [`!=` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Inequality). `NaN` is
431
+ * specially handled and treated as being identical if both sides are `NaN`.
432
+ *
433
+ * ```js
434
+ * import assert from 'node:assert';
435
+ *
436
+ * assert.notEqual(1, 2);
437
+ * // OK
438
+ *
439
+ * assert.notEqual(1, 1);
440
+ * // AssertionError: 1 != 1
441
+ *
442
+ * assert.notEqual(1, '1');
443
+ * // AssertionError: 1 != '1'
444
+ * ```
445
+ *
446
+ * If the values are equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default error
447
+ * message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`.
448
+ * @since v0.1.21
449
+ */
450
+ function notEqual(actual: unknown, expected: unknown, message?: string | Error): void;
451
+ /**
452
+ * **Strict assertion mode**
453
+ *
454
+ * An alias of {@link deepStrictEqual}.
455
+ *
456
+ * **Legacy assertion mode**
457
+ *
458
+ * > Stability: 3 - Legacy: Use {@link deepStrictEqual} instead.
459
+ *
460
+ * Tests for deep equality between the `actual` and `expected` parameters. Consider
461
+ * using {@link deepStrictEqual} instead. {@link deepEqual} can have
462
+ * surprising results.
463
+ *
464
+ * _Deep equality_ means that the enumerable "own" properties of child objects
465
+ * are also recursively evaluated by the following rules.
466
+ * @since v0.1.21
467
+ */
468
+ function deepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
469
+ /**
470
+ * **Strict assertion mode**
471
+ *
472
+ * An alias of {@link notDeepStrictEqual}.
473
+ *
474
+ * **Legacy assertion mode**
475
+ *
476
+ * > Stability: 3 - Legacy: Use {@link notDeepStrictEqual} instead.
477
+ *
478
+ * Tests for any deep inequality. Opposite of {@link deepEqual}.
479
+ *
480
+ * ```js
481
+ * import assert from 'node:assert';
482
+ *
483
+ * const obj1 = {
484
+ * a: {
485
+ * b: 1,
486
+ * },
487
+ * };
488
+ * const obj2 = {
489
+ * a: {
490
+ * b: 2,
491
+ * },
492
+ * };
493
+ * const obj3 = {
494
+ * a: {
495
+ * b: 1,
496
+ * },
497
+ * };
498
+ * const obj4 = { __proto__: obj1 };
499
+ *
500
+ * assert.notDeepEqual(obj1, obj1);
501
+ * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
502
+ *
503
+ * assert.notDeepEqual(obj1, obj2);
504
+ * // OK
505
+ *
506
+ * assert.notDeepEqual(obj1, obj3);
507
+ * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
508
+ *
509
+ * assert.notDeepEqual(obj1, obj4);
510
+ * // OK
511
+ * ```
512
+ *
513
+ * If the values are deeply equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default
514
+ * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown
515
+ * instead of the `AssertionError`.
516
+ * @since v0.1.21
517
+ */
518
+ function notDeepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
519
+ /**
520
+ * Tests strict equality between the `actual` and `expected` parameters as
521
+ * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
522
+ *
523
+ * ```js
524
+ * import assert from 'node:assert/strict';
525
+ *
526
+ * assert.strictEqual(1, 2);
527
+ * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
528
+ * //
529
+ * // 1 !== 2
530
+ *
531
+ * assert.strictEqual(1, 1);
532
+ * // OK
533
+ *
534
+ * assert.strictEqual('Hello foobar', 'Hello World!');
535
+ * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
536
+ * // + actual - expected
537
+ * //
538
+ * // + 'Hello foobar'
539
+ * // - 'Hello World!'
540
+ * // ^
541
+ *
542
+ * const apples = 1;
543
+ * const oranges = 2;
544
+ * assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`);
545
+ * // AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2
546
+ *
547
+ * assert.strictEqual(1, '1', new TypeError('Inputs are not identical'));
548
+ * // TypeError: Inputs are not identical
549
+ * ```
550
+ *
551
+ * If the values are not strictly equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a
552
+ * default error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown
553
+ * instead of the `AssertionError`.
554
+ * @since v0.1.21
555
+ */
556
+ function strictEqual<T>(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
557
+ /**
558
+ * Tests strict inequality between the `actual` and `expected` parameters as
559
+ * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
560
+ *
561
+ * ```js
562
+ * import assert from 'node:assert/strict';
563
+ *
564
+ * assert.notStrictEqual(1, 2);
565
+ * // OK
566
+ *
567
+ * assert.notStrictEqual(1, 1);
568
+ * // AssertionError [ERR_ASSERTION]: Expected "actual" to be strictly unequal to:
569
+ * //
570
+ * // 1
571
+ *
572
+ * assert.notStrictEqual(1, '1');
573
+ * // OK
574
+ * ```
575
+ *
576
+ * If the values are strictly equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a
577
+ * default error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown
578
+ * instead of the `AssertionError`.
579
+ * @since v0.1.21
580
+ */
581
+ function notStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
582
+ /**
583
+ * Tests for deep equality between the `actual` and `expected` parameters.
584
+ * "Deep" equality means that the enumerable "own" properties of child objects
585
+ * are recursively evaluated also by the following rules.
586
+ * @since v1.2.0
587
+ */
588
+ function deepStrictEqual<T>(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
589
+ /**
590
+ * Tests for deep strict inequality. Opposite of {@link deepStrictEqual}.
591
+ *
592
+ * ```js
593
+ * import assert from 'node:assert/strict';
594
+ *
595
+ * assert.notDeepStrictEqual({ a: 1 }, { a: '1' });
596
+ * // OK
597
+ * ```
598
+ *
599
+ * If the values are deeply and strictly equal, an `AssertionError` is thrown
600
+ * with a `message` property set equal to the value of the `message` parameter. If
601
+ * the `message` parameter is undefined, a default error message is assigned. If
602
+ * the `message` parameter is an instance of an `Error` then it will be thrown
603
+ * instead of the `AssertionError`.
604
+ * @since v1.2.0
605
+ */
606
+ function notDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
607
+ /**
608
+ * Expects the function `fn` to throw an error.
609
+ *
610
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
611
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function,
612
+ * a validation object where each property will be tested for strict deep equality,
613
+ * or an instance of error where each property will be tested for strict deep
614
+ * equality including the non-enumerable `message` and `name` properties. When
615
+ * using an object, it is also possible to use a regular expression, when
616
+ * validating against a string property. See below for examples.
617
+ *
618
+ * If specified, `message` will be appended to the message provided by the `AssertionError` if the `fn` call fails to throw or in case the error validation
619
+ * fails.
620
+ *
621
+ * Custom validation object/error instance:
622
+ *
623
+ * ```js
624
+ * import assert from 'node:assert/strict';
625
+ *
626
+ * const err = new TypeError('Wrong value');
627
+ * err.code = 404;
628
+ * err.foo = 'bar';
629
+ * err.info = {
630
+ * nested: true,
631
+ * baz: 'text',
632
+ * };
633
+ * err.reg = /abc/i;
634
+ *
635
+ * assert.throws(
636
+ * () => {
637
+ * throw err;
638
+ * },
639
+ * {
640
+ * name: 'TypeError',
641
+ * message: 'Wrong value',
642
+ * info: {
643
+ * nested: true,
644
+ * baz: 'text',
645
+ * },
646
+ * // Only properties on the validation object will be tested for.
647
+ * // Using nested objects requires all properties to be present. Otherwise
648
+ * // the validation is going to fail.
649
+ * },
650
+ * );
651
+ *
652
+ * // Using regular expressions to validate error properties:
653
+ * assert.throws(
654
+ * () => {
655
+ * throw err;
656
+ * },
657
+ * {
658
+ * // The `name` and `message` properties are strings and using regular
659
+ * // expressions on those will match against the string. If they fail, an
660
+ * // error is thrown.
661
+ * name: /^TypeError$/,
662
+ * message: /Wrong/,
663
+ * foo: 'bar',
664
+ * info: {
665
+ * nested: true,
666
+ * // It is not possible to use regular expressions for nested properties!
667
+ * baz: 'text',
668
+ * },
669
+ * // The `reg` property contains a regular expression and only if the
670
+ * // validation object contains an identical regular expression, it is going
671
+ * // to pass.
672
+ * reg: /abc/i,
673
+ * },
674
+ * );
675
+ *
676
+ * // Fails due to the different `message` and `name` properties:
677
+ * assert.throws(
678
+ * () => {
679
+ * const otherErr = new Error('Not found');
680
+ * // Copy all enumerable properties from `err` to `otherErr`.
681
+ * for (const [key, value] of Object.entries(err)) {
682
+ * otherErr[key] = value;
683
+ * }
684
+ * throw otherErr;
685
+ * },
686
+ * // The error's `message` and `name` properties will also be checked when using
687
+ * // an error as validation object.
688
+ * err,
689
+ * );
690
+ * ```
691
+ *
692
+ * Validate instanceof using constructor:
693
+ *
694
+ * ```js
695
+ * import assert from 'node:assert/strict';
696
+ *
697
+ * assert.throws(
698
+ * () => {
699
+ * throw new Error('Wrong value');
700
+ * },
701
+ * Error,
702
+ * );
703
+ * ```
704
+ *
705
+ * Validate error message using [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions):
706
+ *
707
+ * Using a regular expression runs `.toString` on the error object, and will
708
+ * therefore also include the error name.
709
+ *
710
+ * ```js
711
+ * import assert from 'node:assert/strict';
712
+ *
713
+ * assert.throws(
714
+ * () => {
715
+ * throw new Error('Wrong value');
716
+ * },
717
+ * /^Error: Wrong value$/,
718
+ * );
719
+ * ```
720
+ *
721
+ * Custom error validation:
722
+ *
723
+ * The function must return `true` to indicate all internal validations passed.
724
+ * It will otherwise fail with an `AssertionError`.
725
+ *
726
+ * ```js
727
+ * import assert from 'node:assert/strict';
728
+ *
729
+ * assert.throws(
730
+ * () => {
731
+ * throw new Error('Wrong value');
732
+ * },
733
+ * (err) => {
734
+ * assert(err instanceof Error);
735
+ * assert(/value/.test(err));
736
+ * // Avoid returning anything from validation functions besides `true`.
737
+ * // Otherwise, it's not clear what part of the validation failed. Instead,
738
+ * // throw an error about the specific validation that failed (as done in this
739
+ * // example) and add as much helpful debugging information to that error as
740
+ * // possible.
741
+ * return true;
742
+ * },
743
+ * 'unexpected error',
744
+ * );
745
+ * ```
746
+ *
747
+ * `error` cannot be a string. If a string is provided as the second
748
+ * argument, then `error` is assumed to be omitted and the string will be used for `message` instead. This can lead to easy-to-miss mistakes. Using the same
749
+ * message as the thrown error message is going to result in an `ERR_AMBIGUOUS_ARGUMENT` error. Please read the example below carefully if using
750
+ * a string as the second argument gets considered:
751
+ *
752
+ * ```js
753
+ * import assert from 'node:assert/strict';
754
+ *
755
+ * function throwingFirst() {
756
+ * throw new Error('First');
757
+ * }
758
+ *
759
+ * function throwingSecond() {
760
+ * throw new Error('Second');
761
+ * }
762
+ *
763
+ * function notThrowing() {}
764
+ *
765
+ * // The second argument is a string and the input function threw an Error.
766
+ * // The first case will not throw as it does not match for the error message
767
+ * // thrown by the input function!
768
+ * assert.throws(throwingFirst, 'Second');
769
+ * // In the next example the message has no benefit over the message from the
770
+ * // error and since it is not clear if the user intended to actually match
771
+ * // against the error message, Node.js throws an `ERR_AMBIGUOUS_ARGUMENT` error.
772
+ * assert.throws(throwingSecond, 'Second');
773
+ * // TypeError [ERR_AMBIGUOUS_ARGUMENT]
774
+ *
775
+ * // The string is only used (as message) in case the function does not throw:
776
+ * assert.throws(notThrowing, 'Second');
777
+ * // AssertionError [ERR_ASSERTION]: Missing expected exception: Second
778
+ *
779
+ * // If it was intended to match for the error message do this instead:
780
+ * // It does not throw because the error messages match.
781
+ * assert.throws(throwingSecond, /Second$/);
782
+ *
783
+ * // If the error message does not match, an AssertionError is thrown.
784
+ * assert.throws(throwingFirst, /Second$/);
785
+ * // AssertionError [ERR_ASSERTION]
786
+ * ```
787
+ *
788
+ * Due to the confusing error-prone notation, avoid a string as the second
789
+ * argument.
790
+ * @since v0.1.21
791
+ */
792
+ function throws(block: () => unknown, message?: string | Error): void;
793
+ function throws(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
794
+ /**
795
+ * Asserts that the function `fn` does not throw an error.
796
+ *
797
+ * Using `assert.doesNotThrow()` is actually not useful because there
798
+ * is no benefit in catching an error and then rethrowing it. Instead, consider
799
+ * adding a comment next to the specific code path that should not throw and keep
800
+ * error messages as expressive as possible.
801
+ *
802
+ * When `assert.doesNotThrow()` is called, it will immediately call the `fn` function.
803
+ *
804
+ * If an error is thrown and it is the same type as that specified by the `error` parameter, then an `AssertionError` is thrown. If the error is of a
805
+ * different type, or if the `error` parameter is undefined, the error is
806
+ * propagated back to the caller.
807
+ *
808
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
809
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation
810
+ * function. See {@link throws} for more details.
811
+ *
812
+ * The following, for instance, will throw the `TypeError` because there is no
813
+ * matching error type in the assertion:
814
+ *
815
+ * ```js
816
+ * import assert from 'node:assert/strict';
817
+ *
818
+ * assert.doesNotThrow(
819
+ * () => {
820
+ * throw new TypeError('Wrong value');
821
+ * },
822
+ * SyntaxError,
823
+ * );
824
+ * ```
825
+ *
826
+ * However, the following will result in an `AssertionError` with the message
827
+ * 'Got unwanted exception...':
828
+ *
829
+ * ```js
830
+ * import assert from 'node:assert/strict';
831
+ *
832
+ * assert.doesNotThrow(
833
+ * () => {
834
+ * throw new TypeError('Wrong value');
835
+ * },
836
+ * TypeError,
837
+ * );
838
+ * ```
839
+ *
840
+ * If an `AssertionError` is thrown and a value is provided for the `message` parameter, the value of `message` will be appended to the `AssertionError` message:
841
+ *
842
+ * ```js
843
+ * import assert from 'node:assert/strict';
844
+ *
845
+ * assert.doesNotThrow(
846
+ * () => {
847
+ * throw new TypeError('Wrong value');
848
+ * },
849
+ * /Wrong value/,
850
+ * 'Whoops',
851
+ * );
852
+ * // Throws: AssertionError: Got unwanted exception: Whoops
853
+ * ```
854
+ * @since v0.1.21
855
+ */
856
+ function doesNotThrow(block: () => unknown, message?: string | Error): void;
857
+ function doesNotThrow(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
858
+ /**
859
+ * Throws `value` if `value` is not `undefined` or `null`. This is useful when
860
+ * testing the `error` argument in callbacks. The stack trace contains all frames
861
+ * from the error passed to `ifError()` including the potential new frames for `ifError()` itself.
862
+ *
863
+ * ```js
864
+ * import assert from 'node:assert/strict';
865
+ *
866
+ * assert.ifError(null);
867
+ * // OK
868
+ * assert.ifError(0);
869
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 0
870
+ * assert.ifError('error');
871
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 'error'
872
+ * assert.ifError(new Error());
873
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Error
874
+ *
875
+ * // Create some random error frames.
876
+ * let err;
877
+ * (function errorFrame() {
878
+ * err = new Error('test error');
879
+ * })();
880
+ *
881
+ * (function ifErrorFrame() {
882
+ * assert.ifError(err);
883
+ * })();
884
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: test error
885
+ * // at ifErrorFrame
886
+ * // at errorFrame
887
+ * ```
888
+ * @since v0.1.97
889
+ */
890
+ function ifError(value: unknown): asserts value is null | undefined;
891
+ /**
892
+ * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
893
+ * calls the function and awaits the returned promise to complete. It will then
894
+ * check that the promise is rejected.
895
+ *
896
+ * If `asyncFn` is a function and it throws an error synchronously, `assert.rejects()` will return a rejected `Promise` with that error. If the
897
+ * function does not return a promise, `assert.rejects()` will return a rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v22.x/api/errors.html#err_invalid_return_value)
898
+ * error. In both cases the error handler is skipped.
899
+ *
900
+ * Besides the async nature to await the completion behaves identically to {@link throws}.
901
+ *
902
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
903
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function,
904
+ * an object where each property will be tested for, or an instance of error where
905
+ * each property will be tested for including the non-enumerable `message` and `name` properties.
906
+ *
907
+ * If specified, `message` will be the message provided by the `{@link AssertionError}` if the `asyncFn` fails to reject.
908
+ *
909
+ * ```js
910
+ * import assert from 'node:assert/strict';
911
+ *
912
+ * await assert.rejects(
913
+ * async () => {
914
+ * throw new TypeError('Wrong value');
915
+ * },
916
+ * {
917
+ * name: 'TypeError',
918
+ * message: 'Wrong value',
919
+ * },
920
+ * );
921
+ * ```
922
+ *
923
+ * ```js
924
+ * import assert from 'node:assert/strict';
925
+ *
926
+ * await assert.rejects(
927
+ * async () => {
928
+ * throw new TypeError('Wrong value');
929
+ * },
930
+ * (err) => {
931
+ * assert.strictEqual(err.name, 'TypeError');
932
+ * assert.strictEqual(err.message, 'Wrong value');
933
+ * return true;
934
+ * },
935
+ * );
936
+ * ```
937
+ *
938
+ * ```js
939
+ * import assert from 'node:assert/strict';
940
+ *
941
+ * assert.rejects(
942
+ * Promise.reject(new Error('Wrong value')),
943
+ * Error,
944
+ * ).then(() => {
945
+ * // ...
946
+ * });
947
+ * ```
948
+ *
949
+ * `error` cannot be a string. If a string is provided as the second argument, then `error` is assumed to
950
+ * be omitted and the string will be used for `message` instead. This can lead to easy-to-miss mistakes. Please read the
951
+ * example in {@link throws} carefully if using a string as the second argument gets considered.
952
+ * @since v10.0.0
953
+ */
954
+ function rejects(block: (() => Promise<unknown>) | Promise<unknown>, message?: string | Error): Promise<void>;
955
+ function rejects(
956
+ block: (() => Promise<unknown>) | Promise<unknown>,
957
+ error: AssertPredicate,
958
+ message?: string | Error,
959
+ ): Promise<void>;
960
+ /**
961
+ * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
962
+ * calls the function and awaits the returned promise to complete. It will then
963
+ * check that the promise is not rejected.
964
+ *
965
+ * If `asyncFn` is a function and it throws an error synchronously, `assert.doesNotReject()` will return a rejected `Promise` with that error. If
966
+ * the function does not return a promise, `assert.doesNotReject()` will return a
967
+ * rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v22.x/api/errors.html#err_invalid_return_value) error. In both cases
968
+ * the error handler is skipped.
969
+ *
970
+ * Using `assert.doesNotReject()` is actually not useful because there is little
971
+ * benefit in catching a rejection and then rejecting it again. Instead, consider
972
+ * adding a comment next to the specific code path that should not reject and keep
973
+ * error messages as expressive as possible.
974
+ *
975
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
976
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation
977
+ * function. See {@link throws} for more details.
978
+ *
979
+ * Besides the async nature to await the completion behaves identically to {@link doesNotThrow}.
980
+ *
981
+ * ```js
982
+ * import assert from 'node:assert/strict';
983
+ *
984
+ * await assert.doesNotReject(
985
+ * async () => {
986
+ * throw new TypeError('Wrong value');
987
+ * },
988
+ * SyntaxError,
989
+ * );
990
+ * ```
991
+ *
992
+ * ```js
993
+ * import assert from 'node:assert/strict';
994
+ *
995
+ * assert.doesNotReject(Promise.reject(new TypeError('Wrong value')))
996
+ * .then(() => {
997
+ * // ...
998
+ * });
999
+ * ```
1000
+ * @since v10.0.0
1001
+ */
1002
+ function doesNotReject(
1003
+ block: (() => Promise<unknown>) | Promise<unknown>,
1004
+ message?: string | Error,
1005
+ ): Promise<void>;
1006
+ function doesNotReject(
1007
+ block: (() => Promise<unknown>) | Promise<unknown>,
1008
+ error: AssertPredicate,
1009
+ message?: string | Error,
1010
+ ): Promise<void>;
1011
+ /**
1012
+ * Expects the `string` input to match the regular expression.
1013
+ *
1014
+ * ```js
1015
+ * import assert from 'node:assert/strict';
1016
+ *
1017
+ * assert.match('I will fail', /pass/);
1018
+ * // AssertionError [ERR_ASSERTION]: The input did not match the regular ...
1019
+ *
1020
+ * assert.match(123, /pass/);
1021
+ * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string.
1022
+ *
1023
+ * assert.match('I will pass', /pass/);
1024
+ * // OK
1025
+ * ```
1026
+ *
1027
+ * If the values do not match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal
1028
+ * to the value of the `message` parameter. If the `message` parameter is
1029
+ * undefined, a default error message is assigned. If the `message` parameter is an
1030
+ * instance of an [Error](https://nodejs.org/docs/latest-v22.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`.
1031
+ * @since v13.6.0, v12.16.0
1032
+ */
1033
+ function match(value: string, regExp: RegExp, message?: string | Error): void;
1034
+ /**
1035
+ * Expects the `string` input not to match the regular expression.
1036
+ *
1037
+ * ```js
1038
+ * import assert from 'node:assert/strict';
1039
+ *
1040
+ * assert.doesNotMatch('I will fail', /fail/);
1041
+ * // AssertionError [ERR_ASSERTION]: The input was expected to not match the ...
1042
+ *
1043
+ * assert.doesNotMatch(123, /pass/);
1044
+ * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string.
1045
+ *
1046
+ * assert.doesNotMatch('I will pass', /different/);
1047
+ * // OK
1048
+ * ```
1049
+ *
1050
+ * If the values do match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal
1051
+ * to the value of the `message` parameter. If the `message` parameter is
1052
+ * undefined, a default error message is assigned. If the `message` parameter is an
1053
+ * instance of an [Error](https://nodejs.org/docs/latest-v22.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`.
1054
+ * @since v13.6.0, v12.16.0
1055
+ */
1056
+ function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
1057
+ /**
1058
+ * Tests for partial deep equality between the `actual` and `expected` parameters.
1059
+ * "Deep" equality means that the enumerable "own" properties of child objects
1060
+ * are recursively evaluated also by the following rules. "Partial" equality means
1061
+ * that only properties that exist on the `expected` parameter are going to be
1062
+ * compared.
1063
+ *
1064
+ * This method always passes the same test cases as `assert.deepStrictEqual()`,
1065
+ * behaving as a super set of it.
1066
+ * @since v22.13.0
1067
+ */
1068
+ function partialDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
1069
+ }
1070
+ namespace assert {
1071
+ export { strict };
1072
+ }
1073
+ export = assert;
1074
+ }
1075
+ declare module "node:assert" {
1076
+ import assert = require("assert");
1077
+ export = assert;
1078
+ }
node_modules/@types/node/assert/strict.d.ts ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * In strict assertion mode, non-strict methods behave like their corresponding
3
+ * strict methods. For example, `assert.deepEqual()` will behave like
4
+ * `assert.deepStrictEqual()`.
5
+ *
6
+ * In strict assertion mode, error messages for objects display a diff. In legacy
7
+ * assertion mode, error messages for objects display the objects, often truncated.
8
+ *
9
+ * To use strict assertion mode:
10
+ *
11
+ * ```js
12
+ * import { strict as assert } from 'node:assert';
13
+ * ```
14
+ *
15
+ * ```js
16
+ * import assert from 'node:assert/strict';
17
+ * ```
18
+ *
19
+ * Example error diff:
20
+ *
21
+ * ```js
22
+ * import { strict as assert } from 'node:assert';
23
+ *
24
+ * assert.deepEqual([[[1, 2, 3]], 4, 5], [[[1, 2, '3']], 4, 5]);
25
+ * // AssertionError: Expected inputs to be strictly deep-equal:
26
+ * // + actual - expected ... Lines skipped
27
+ * //
28
+ * // [
29
+ * // [
30
+ * // ...
31
+ * // 2,
32
+ * // + 3
33
+ * // - '3'
34
+ * // ],
35
+ * // ...
36
+ * // 5
37
+ * // ]
38
+ * ```
39
+ *
40
+ * To deactivate the colors, use the `NO_COLOR` or `NODE_DISABLE_COLORS`
41
+ * environment variables. This will also deactivate the colors in the REPL. For
42
+ * more on color support in terminal environments, read the tty
43
+ * [`getColorDepth()`](https://nodejs.org/docs/latest-v22.x/api/tty.html#writestreamgetcolordepthenv) documentation.
44
+ * @since v15.0.0
45
+ * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/assert/strict.js)
46
+ */
47
+ declare module "assert/strict" {
48
+ import {
49
+ Assert,
50
+ AssertionError,
51
+ AssertionErrorOptions,
52
+ AssertOptions,
53
+ AssertPredicate,
54
+ AssertStrict,
55
+ CallTracker,
56
+ CallTrackerCall,
57
+ CallTrackerReportInformation,
58
+ deepStrictEqual,
59
+ doesNotMatch,
60
+ doesNotReject,
61
+ doesNotThrow,
62
+ fail,
63
+ ifError,
64
+ match,
65
+ notDeepStrictEqual,
66
+ notStrictEqual,
67
+ ok,
68
+ partialDeepStrictEqual,
69
+ rejects,
70
+ strictEqual,
71
+ throws,
72
+ } from "node:assert";
73
+ function strict(value: unknown, message?: string | Error): asserts value;
74
+ namespace strict {
75
+ export {
76
+ Assert,
77
+ AssertionError,
78
+ AssertionErrorOptions,
79
+ AssertOptions,
80
+ AssertPredicate,
81
+ AssertStrict,
82
+ CallTracker,
83
+ CallTrackerCall,
84
+ CallTrackerReportInformation,
85
+ deepStrictEqual,
86
+ deepStrictEqual as deepEqual,
87
+ doesNotMatch,
88
+ doesNotReject,
89
+ doesNotThrow,
90
+ fail,
91
+ ifError,
92
+ match,
93
+ notDeepStrictEqual,
94
+ notDeepStrictEqual as notDeepEqual,
95
+ notStrictEqual,
96
+ notStrictEqual as notEqual,
97
+ ok,
98
+ partialDeepStrictEqual,
99
+ rejects,
100
+ strict,
101
+ strictEqual,
102
+ strictEqual as equal,
103
+ throws,
104
+ };
105
+ }
106
+ export = strict;
107
+ }
108
+ declare module "node:assert/strict" {
109
+ import strict = require("assert/strict");
110
+ export = strict;
111
+ }
node_modules/@types/node/async_hooks.d.ts ADDED
@@ -0,0 +1,603 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * We strongly discourage the use of the `async_hooks` API.
3
+ * Other APIs that can cover most of its use cases include:
4
+ *
5
+ * * [`AsyncLocalStorage`](https://nodejs.org/docs/latest-v22.x/api/async_context.html#class-asynclocalstorage) tracks async context
6
+ * * [`process.getActiveResourcesInfo()`](https://nodejs.org/docs/latest-v22.x/api/process.html#processgetactiveresourcesinfo) tracks active resources
7
+ *
8
+ * The `node:async_hooks` module provides an API to track asynchronous resources.
9
+ * It can be accessed using:
10
+ *
11
+ * ```js
12
+ * import async_hooks from 'node:async_hooks';
13
+ * ```
14
+ * @experimental
15
+ * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/async_hooks.js)
16
+ */
17
+ declare module "async_hooks" {
18
+ /**
19
+ * ```js
20
+ * import { executionAsyncId } from 'node:async_hooks';
21
+ * import fs from 'node:fs';
22
+ *
23
+ * console.log(executionAsyncId()); // 1 - bootstrap
24
+ * const path = '.';
25
+ * fs.open(path, 'r', (err, fd) => {
26
+ * console.log(executionAsyncId()); // 6 - open()
27
+ * });
28
+ * ```
29
+ *
30
+ * The ID returned from `executionAsyncId()` is related to execution timing, not
31
+ * causality (which is covered by `triggerAsyncId()`):
32
+ *
33
+ * ```js
34
+ * const server = net.createServer((conn) => {
35
+ * // Returns the ID of the server, not of the new connection, because the
36
+ * // callback runs in the execution scope of the server's MakeCallback().
37
+ * async_hooks.executionAsyncId();
38
+ *
39
+ * }).listen(port, () => {
40
+ * // Returns the ID of a TickObject (process.nextTick()) because all
41
+ * // callbacks passed to .listen() are wrapped in a nextTick().
42
+ * async_hooks.executionAsyncId();
43
+ * });
44
+ * ```
45
+ *
46
+ * Promise contexts may not get precise `executionAsyncIds` by default.
47
+ * See the section on [promise execution tracking](https://nodejs.org/docs/latest-v22.x/api/async_hooks.html#promise-execution-tracking).
48
+ * @since v8.1.0
49
+ * @return The `asyncId` of the current execution context. Useful to track when something calls.
50
+ */
51
+ function executionAsyncId(): number;
52
+ /**
53
+ * Resource objects returned by `executionAsyncResource()` are most often internal
54
+ * Node.js handle objects with undocumented APIs. Using any functions or properties
55
+ * on the object is likely to crash your application and should be avoided.
56
+ *
57
+ * Using `executionAsyncResource()` in the top-level execution context will
58
+ * return an empty object as there is no handle or request object to use,
59
+ * but having an object representing the top-level can be helpful.
60
+ *
61
+ * ```js
62
+ * import { open } from 'node:fs';
63
+ * import { executionAsyncId, executionAsyncResource } from 'node:async_hooks';
64
+ *
65
+ * console.log(executionAsyncId(), executionAsyncResource()); // 1 {}
66
+ * open(new URL(import.meta.url), 'r', (err, fd) => {
67
+ * console.log(executionAsyncId(), executionAsyncResource()); // 7 FSReqWrap
68
+ * });
69
+ * ```
70
+ *
71
+ * This can be used to implement continuation local storage without the
72
+ * use of a tracking `Map` to store the metadata:
73
+ *
74
+ * ```js
75
+ * import { createServer } from 'node:http';
76
+ * import {
77
+ * executionAsyncId,
78
+ * executionAsyncResource,
79
+ * createHook,
80
+ * } from 'node:async_hooks';
81
+ * const sym = Symbol('state'); // Private symbol to avoid pollution
82
+ *
83
+ * createHook({
84
+ * init(asyncId, type, triggerAsyncId, resource) {
85
+ * const cr = executionAsyncResource();
86
+ * if (cr) {
87
+ * resource[sym] = cr[sym];
88
+ * }
89
+ * },
90
+ * }).enable();
91
+ *
92
+ * const server = createServer((req, res) => {
93
+ * executionAsyncResource()[sym] = { state: req.url };
94
+ * setTimeout(function() {
95
+ * res.end(JSON.stringify(executionAsyncResource()[sym]));
96
+ * }, 100);
97
+ * }).listen(3000);
98
+ * ```
99
+ * @since v13.9.0, v12.17.0
100
+ * @return The resource representing the current execution. Useful to store data within the resource.
101
+ */
102
+ function executionAsyncResource(): object;
103
+ /**
104
+ * ```js
105
+ * const server = net.createServer((conn) => {
106
+ * // The resource that caused (or triggered) this callback to be called
107
+ * // was that of the new connection. Thus the return value of triggerAsyncId()
108
+ * // is the asyncId of "conn".
109
+ * async_hooks.triggerAsyncId();
110
+ *
111
+ * }).listen(port, () => {
112
+ * // Even though all callbacks passed to .listen() are wrapped in a nextTick()
113
+ * // the callback itself exists because the call to the server's .listen()
114
+ * // was made. So the return value would be the ID of the server.
115
+ * async_hooks.triggerAsyncId();
116
+ * });
117
+ * ```
118
+ *
119
+ * Promise contexts may not get valid `triggerAsyncId`s by default. See
120
+ * the section on [promise execution tracking](https://nodejs.org/docs/latest-v22.x/api/async_hooks.html#promise-execution-tracking).
121
+ * @return The ID of the resource responsible for calling the callback that is currently being executed.
122
+ */
123
+ function triggerAsyncId(): number;
124
+ interface HookCallbacks {
125
+ /**
126
+ * Called when a class is constructed that has the possibility to emit an asynchronous event.
127
+ * @param asyncId A unique ID for the async resource
128
+ * @param type The type of the async resource
129
+ * @param triggerAsyncId The unique ID of the async resource in whose execution context this async resource was created
130
+ * @param resource Reference to the resource representing the async operation, needs to be released during destroy
131
+ */
132
+ init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void;
133
+ /**
134
+ * When an asynchronous operation is initiated or completes a callback is called to notify the user.
135
+ * The before callback is called just before said callback is executed.
136
+ * @param asyncId the unique identifier assigned to the resource about to execute the callback.
137
+ */
138
+ before?(asyncId: number): void;
139
+ /**
140
+ * Called immediately after the callback specified in `before` is completed.
141
+ *
142
+ * If an uncaught exception occurs during execution of the callback, then `after` will run after the `'uncaughtException'` event is emitted or a `domain`'s handler runs.
143
+ * @param asyncId the unique identifier assigned to the resource which has executed the callback.
144
+ */
145
+ after?(asyncId: number): void;
146
+ /**
147
+ * Called when a promise has resolve() called. This may not be in the same execution id
148
+ * as the promise itself.
149
+ * @param asyncId the unique id for the promise that was resolve()d.
150
+ */
151
+ promiseResolve?(asyncId: number): void;
152
+ /**
153
+ * Called after the resource corresponding to asyncId is destroyed
154
+ * @param asyncId a unique ID for the async resource
155
+ */
156
+ destroy?(asyncId: number): void;
157
+ }
158
+ interface AsyncHook {
159
+ /**
160
+ * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop.
161
+ */
162
+ enable(): this;
163
+ /**
164
+ * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled.
165
+ */
166
+ disable(): this;
167
+ }
168
+ /**
169
+ * Registers functions to be called for different lifetime events of each async
170
+ * operation.
171
+ *
172
+ * The callbacks `init()`/`before()`/`after()`/`destroy()` are called for the
173
+ * respective asynchronous event during a resource's lifetime.
174
+ *
175
+ * All callbacks are optional. For example, if only resource cleanup needs to
176
+ * be tracked, then only the `destroy` callback needs to be passed. The
177
+ * specifics of all functions that can be passed to `callbacks` is in the `Hook Callbacks` section.
178
+ *
179
+ * ```js
180
+ * import { createHook } from 'node:async_hooks';
181
+ *
182
+ * const asyncHook = createHook({
183
+ * init(asyncId, type, triggerAsyncId, resource) { },
184
+ * destroy(asyncId) { },
185
+ * });
186
+ * ```
187
+ *
188
+ * The callbacks will be inherited via the prototype chain:
189
+ *
190
+ * ```js
191
+ * class MyAsyncCallbacks {
192
+ * init(asyncId, type, triggerAsyncId, resource) { }
193
+ * destroy(asyncId) {}
194
+ * }
195
+ *
196
+ * class MyAddedCallbacks extends MyAsyncCallbacks {
197
+ * before(asyncId) { }
198
+ * after(asyncId) { }
199
+ * }
200
+ *
201
+ * const asyncHook = async_hooks.createHook(new MyAddedCallbacks());
202
+ * ```
203
+ *
204
+ * Because promises are asynchronous resources whose lifecycle is tracked
205
+ * via the async hooks mechanism, the `init()`, `before()`, `after()`, and`destroy()` callbacks _must not_ be async functions that return promises.
206
+ * @since v8.1.0
207
+ * @param callbacks The `Hook Callbacks` to register
208
+ * @return Instance used for disabling and enabling hooks
209
+ */
210
+ function createHook(callbacks: HookCallbacks): AsyncHook;
211
+ interface AsyncResourceOptions {
212
+ /**
213
+ * The ID of the execution context that created this async event.
214
+ * @default executionAsyncId()
215
+ */
216
+ triggerAsyncId?: number | undefined;
217
+ /**
218
+ * Disables automatic `emitDestroy` when the object is garbage collected.
219
+ * This usually does not need to be set (even if `emitDestroy` is called
220
+ * manually), unless the resource's `asyncId` is retrieved and the
221
+ * sensitive API's `emitDestroy` is called with it.
222
+ * @default false
223
+ */
224
+ requireManualDestroy?: boolean | undefined;
225
+ }
226
+ /**
227
+ * The class `AsyncResource` is designed to be extended by the embedder's async
228
+ * resources. Using this, users can easily trigger the lifetime events of their
229
+ * own resources.
230
+ *
231
+ * The `init` hook will trigger when an `AsyncResource` is instantiated.
232
+ *
233
+ * The following is an overview of the `AsyncResource` API.
234
+ *
235
+ * ```js
236
+ * import { AsyncResource, executionAsyncId } from 'node:async_hooks';
237
+ *
238
+ * // AsyncResource() is meant to be extended. Instantiating a
239
+ * // new AsyncResource() also triggers init. If triggerAsyncId is omitted then
240
+ * // async_hook.executionAsyncId() is used.
241
+ * const asyncResource = new AsyncResource(
242
+ * type, { triggerAsyncId: executionAsyncId(), requireManualDestroy: false },
243
+ * );
244
+ *
245
+ * // Run a function in the execution context of the resource. This will
246
+ * // * establish the context of the resource
247
+ * // * trigger the AsyncHooks before callbacks
248
+ * // * call the provided function `fn` with the supplied arguments
249
+ * // * trigger the AsyncHooks after callbacks
250
+ * // * restore the original execution context
251
+ * asyncResource.runInAsyncScope(fn, thisArg, ...args);
252
+ *
253
+ * // Call AsyncHooks destroy callbacks.
254
+ * asyncResource.emitDestroy();
255
+ *
256
+ * // Return the unique ID assigned to the AsyncResource instance.
257
+ * asyncResource.asyncId();
258
+ *
259
+ * // Return the trigger ID for the AsyncResource instance.
260
+ * asyncResource.triggerAsyncId();
261
+ * ```
262
+ */
263
+ class AsyncResource {
264
+ /**
265
+ * AsyncResource() is meant to be extended. Instantiating a
266
+ * new AsyncResource() also triggers init. If triggerAsyncId is omitted then
267
+ * async_hook.executionAsyncId() is used.
268
+ * @param type The type of async event.
269
+ * @param triggerAsyncId The ID of the execution context that created
270
+ * this async event (default: `executionAsyncId()`), or an
271
+ * AsyncResourceOptions object (since v9.3.0)
272
+ */
273
+ constructor(type: string, triggerAsyncId?: number | AsyncResourceOptions);
274
+ /**
275
+ * Binds the given function to the current execution context.
276
+ * @since v14.8.0, v12.19.0
277
+ * @param fn The function to bind to the current execution context.
278
+ * @param type An optional name to associate with the underlying `AsyncResource`.
279
+ */
280
+ static bind<Func extends (this: ThisArg, ...args: any[]) => any, ThisArg>(
281
+ fn: Func,
282
+ type?: string,
283
+ thisArg?: ThisArg,
284
+ ): Func;
285
+ /**
286
+ * Binds the given function to execute to this `AsyncResource`'s scope.
287
+ * @since v14.8.0, v12.19.0
288
+ * @param fn The function to bind to the current `AsyncResource`.
289
+ */
290
+ bind<Func extends (...args: any[]) => any>(fn: Func): Func;
291
+ /**
292
+ * Call the provided function with the provided arguments in the execution context
293
+ * of the async resource. This will establish the context, trigger the AsyncHooks
294
+ * before callbacks, call the function, trigger the AsyncHooks after callbacks, and
295
+ * then restore the original execution context.
296
+ * @since v9.6.0
297
+ * @param fn The function to call in the execution context of this async resource.
298
+ * @param thisArg The receiver to be used for the function call.
299
+ * @param args Optional arguments to pass to the function.
300
+ */
301
+ runInAsyncScope<This, Result>(
302
+ fn: (this: This, ...args: any[]) => Result,
303
+ thisArg?: This,
304
+ ...args: any[]
305
+ ): Result;
306
+ /**
307
+ * Call all `destroy` hooks. This should only ever be called once. An error will
308
+ * be thrown if it is called more than once. This **must** be manually called. If
309
+ * the resource is left to be collected by the GC then the `destroy` hooks will
310
+ * never be called.
311
+ * @return A reference to `asyncResource`.
312
+ */
313
+ emitDestroy(): this;
314
+ /**
315
+ * @return The unique `asyncId` assigned to the resource.
316
+ */
317
+ asyncId(): number;
318
+ /**
319
+ * @return The same `triggerAsyncId` that is passed to the `AsyncResource` constructor.
320
+ */
321
+ triggerAsyncId(): number;
322
+ }
323
+ /**
324
+ * This class creates stores that stay coherent through asynchronous operations.
325
+ *
326
+ * While you can create your own implementation on top of the `node:async_hooks` module, `AsyncLocalStorage` should be preferred as it is a performant and memory
327
+ * safe implementation that involves significant optimizations that are non-obvious
328
+ * to implement.
329
+ *
330
+ * The following example uses `AsyncLocalStorage` to build a simple logger
331
+ * that assigns IDs to incoming HTTP requests and includes them in messages
332
+ * logged within each request.
333
+ *
334
+ * ```js
335
+ * import http from 'node:http';
336
+ * import { AsyncLocalStorage } from 'node:async_hooks';
337
+ *
338
+ * const asyncLocalStorage = new AsyncLocalStorage();
339
+ *
340
+ * function logWithId(msg) {
341
+ * const id = asyncLocalStorage.getStore();
342
+ * console.log(`${id !== undefined ? id : '-'}:`, msg);
343
+ * }
344
+ *
345
+ * let idSeq = 0;
346
+ * http.createServer((req, res) => {
347
+ * asyncLocalStorage.run(idSeq++, () => {
348
+ * logWithId('start');
349
+ * // Imagine any chain of async operations here
350
+ * setImmediate(() => {
351
+ * logWithId('finish');
352
+ * res.end();
353
+ * });
354
+ * });
355
+ * }).listen(8080);
356
+ *
357
+ * http.get('http://localhost:8080');
358
+ * http.get('http://localhost:8080');
359
+ * // Prints:
360
+ * // 0: start
361
+ * // 0: finish
362
+ * // 1: start
363
+ * // 1: finish
364
+ * ```
365
+ *
366
+ * Each instance of `AsyncLocalStorage` maintains an independent storage context.
367
+ * Multiple instances can safely exist simultaneously without risk of interfering
368
+ * with each other's data.
369
+ * @since v13.10.0, v12.17.0
370
+ */
371
+ class AsyncLocalStorage<T> {
372
+ /**
373
+ * Binds the given function to the current execution context.
374
+ * @since v19.8.0
375
+ * @param fn The function to bind to the current execution context.
376
+ * @return A new function that calls `fn` within the captured execution context.
377
+ */
378
+ static bind<Func extends (...args: any[]) => any>(fn: Func): Func;
379
+ /**
380
+ * Captures the current execution context and returns a function that accepts a
381
+ * function as an argument. Whenever the returned function is called, it
382
+ * calls the function passed to it within the captured context.
383
+ *
384
+ * ```js
385
+ * const asyncLocalStorage = new AsyncLocalStorage();
386
+ * const runInAsyncScope = asyncLocalStorage.run(123, () => AsyncLocalStorage.snapshot());
387
+ * const result = asyncLocalStorage.run(321, () => runInAsyncScope(() => asyncLocalStorage.getStore()));
388
+ * console.log(result); // returns 123
389
+ * ```
390
+ *
391
+ * AsyncLocalStorage.snapshot() can replace the use of AsyncResource for simple
392
+ * async context tracking purposes, for example:
393
+ *
394
+ * ```js
395
+ * class Foo {
396
+ * #runInAsyncScope = AsyncLocalStorage.snapshot();
397
+ *
398
+ * get() { return this.#runInAsyncScope(() => asyncLocalStorage.getStore()); }
399
+ * }
400
+ *
401
+ * const foo = asyncLocalStorage.run(123, () => new Foo());
402
+ * console.log(asyncLocalStorage.run(321, () => foo.get())); // returns 123
403
+ * ```
404
+ * @since v19.8.0
405
+ * @return A new function with the signature `(fn: (...args) : R, ...args) : R`.
406
+ */
407
+ static snapshot(): <R, TArgs extends any[]>(fn: (...args: TArgs) => R, ...args: TArgs) => R;
408
+ /**
409
+ * Disables the instance of `AsyncLocalStorage`. All subsequent calls
410
+ * to `asyncLocalStorage.getStore()` will return `undefined` until `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()` is called again.
411
+ *
412
+ * When calling `asyncLocalStorage.disable()`, all current contexts linked to the
413
+ * instance will be exited.
414
+ *
415
+ * Calling `asyncLocalStorage.disable()` is required before the `asyncLocalStorage` can be garbage collected. This does not apply to stores
416
+ * provided by the `asyncLocalStorage`, as those objects are garbage collected
417
+ * along with the corresponding async resources.
418
+ *
419
+ * Use this method when the `asyncLocalStorage` is not in use anymore
420
+ * in the current process.
421
+ * @since v13.10.0, v12.17.0
422
+ * @experimental
423
+ */
424
+ disable(): void;
425
+ /**
426
+ * Returns the current store.
427
+ * If called outside of an asynchronous context initialized by
428
+ * calling `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()`, it
429
+ * returns `undefined`.
430
+ * @since v13.10.0, v12.17.0
431
+ */
432
+ getStore(): T | undefined;
433
+ /**
434
+ * Runs a function synchronously within a context and returns its
435
+ * return value. The store is not accessible outside of the callback function.
436
+ * The store is accessible to any asynchronous operations created within the
437
+ * callback.
438
+ *
439
+ * The optional `args` are passed to the callback function.
440
+ *
441
+ * If the callback function throws an error, the error is thrown by `run()` too.
442
+ * The stacktrace is not impacted by this call and the context is exited.
443
+ *
444
+ * Example:
445
+ *
446
+ * ```js
447
+ * const store = { id: 2 };
448
+ * try {
449
+ * asyncLocalStorage.run(store, () => {
450
+ * asyncLocalStorage.getStore(); // Returns the store object
451
+ * setTimeout(() => {
452
+ * asyncLocalStorage.getStore(); // Returns the store object
453
+ * }, 200);
454
+ * throw new Error();
455
+ * });
456
+ * } catch (e) {
457
+ * asyncLocalStorage.getStore(); // Returns undefined
458
+ * // The error will be caught here
459
+ * }
460
+ * ```
461
+ * @since v13.10.0, v12.17.0
462
+ */
463
+ run<R>(store: T, callback: () => R): R;
464
+ run<R, TArgs extends any[]>(store: T, callback: (...args: TArgs) => R, ...args: TArgs): R;
465
+ /**
466
+ * Runs a function synchronously outside of a context and returns its
467
+ * return value. The store is not accessible within the callback function or
468
+ * the asynchronous operations created within the callback. Any `getStore()` call done within the callback function will always return `undefined`.
469
+ *
470
+ * The optional `args` are passed to the callback function.
471
+ *
472
+ * If the callback function throws an error, the error is thrown by `exit()` too.
473
+ * The stacktrace is not impacted by this call and the context is re-entered.
474
+ *
475
+ * Example:
476
+ *
477
+ * ```js
478
+ * // Within a call to run
479
+ * try {
480
+ * asyncLocalStorage.getStore(); // Returns the store object or value
481
+ * asyncLocalStorage.exit(() => {
482
+ * asyncLocalStorage.getStore(); // Returns undefined
483
+ * throw new Error();
484
+ * });
485
+ * } catch (e) {
486
+ * asyncLocalStorage.getStore(); // Returns the same object or value
487
+ * // The error will be caught here
488
+ * }
489
+ * ```
490
+ * @since v13.10.0, v12.17.0
491
+ * @experimental
492
+ */
493
+ exit<R, TArgs extends any[]>(callback: (...args: TArgs) => R, ...args: TArgs): R;
494
+ /**
495
+ * Transitions into the context for the remainder of the current
496
+ * synchronous execution and then persists the store through any following
497
+ * asynchronous calls.
498
+ *
499
+ * Example:
500
+ *
501
+ * ```js
502
+ * const store = { id: 1 };
503
+ * // Replaces previous store with the given store object
504
+ * asyncLocalStorage.enterWith(store);
505
+ * asyncLocalStorage.getStore(); // Returns the store object
506
+ * someAsyncOperation(() => {
507
+ * asyncLocalStorage.getStore(); // Returns the same object
508
+ * });
509
+ * ```
510
+ *
511
+ * This transition will continue for the _entire_ synchronous execution.
512
+ * This means that if, for example, the context is entered within an event
513
+ * handler subsequent event handlers will also run within that context unless
514
+ * specifically bound to another context with an `AsyncResource`. That is why `run()` should be preferred over `enterWith()` unless there are strong reasons
515
+ * to use the latter method.
516
+ *
517
+ * ```js
518
+ * const store = { id: 1 };
519
+ *
520
+ * emitter.on('my-event', () => {
521
+ * asyncLocalStorage.enterWith(store);
522
+ * });
523
+ * emitter.on('my-event', () => {
524
+ * asyncLocalStorage.getStore(); // Returns the same object
525
+ * });
526
+ *
527
+ * asyncLocalStorage.getStore(); // Returns undefined
528
+ * emitter.emit('my-event');
529
+ * asyncLocalStorage.getStore(); // Returns the same object
530
+ * ```
531
+ * @since v13.11.0, v12.17.0
532
+ * @experimental
533
+ */
534
+ enterWith(store: T): void;
535
+ }
536
+ /**
537
+ * @since v17.2.0, v16.14.0
538
+ * @return A map of provider types to the corresponding numeric id.
539
+ * This map contains all the event types that might be emitted by the `async_hooks.init()` event.
540
+ */
541
+ namespace asyncWrapProviders {
542
+ const NONE: number;
543
+ const DIRHANDLE: number;
544
+ const DNSCHANNEL: number;
545
+ const ELDHISTOGRAM: number;
546
+ const FILEHANDLE: number;
547
+ const FILEHANDLECLOSEREQ: number;
548
+ const FIXEDSIZEBLOBCOPY: number;
549
+ const FSEVENTWRAP: number;
550
+ const FSREQCALLBACK: number;
551
+ const FSREQPROMISE: number;
552
+ const GETADDRINFOREQWRAP: number;
553
+ const GETNAMEINFOREQWRAP: number;
554
+ const HEAPSNAPSHOT: number;
555
+ const HTTP2SESSION: number;
556
+ const HTTP2STREAM: number;
557
+ const HTTP2PING: number;
558
+ const HTTP2SETTINGS: number;
559
+ const HTTPINCOMINGMESSAGE: number;
560
+ const HTTPCLIENTREQUEST: number;
561
+ const JSSTREAM: number;
562
+ const JSUDPWRAP: number;
563
+ const MESSAGEPORT: number;
564
+ const PIPECONNECTWRAP: number;
565
+ const PIPESERVERWRAP: number;
566
+ const PIPEWRAP: number;
567
+ const PROCESSWRAP: number;
568
+ const PROMISE: number;
569
+ const QUERYWRAP: number;
570
+ const SHUTDOWNWRAP: number;
571
+ const SIGNALWRAP: number;
572
+ const STATWATCHER: number;
573
+ const STREAMPIPE: number;
574
+ const TCPCONNECTWRAP: number;
575
+ const TCPSERVERWRAP: number;
576
+ const TCPWRAP: number;
577
+ const TTYWRAP: number;
578
+ const UDPSENDWRAP: number;
579
+ const UDPWRAP: number;
580
+ const SIGINTWATCHDOG: number;
581
+ const WORKER: number;
582
+ const WORKERHEAPSNAPSHOT: number;
583
+ const WRITEWRAP: number;
584
+ const ZLIB: number;
585
+ const CHECKPRIMEREQUEST: number;
586
+ const PBKDF2REQUEST: number;
587
+ const KEYPAIRGENREQUEST: number;
588
+ const KEYGENREQUEST: number;
589
+ const KEYEXPORTREQUEST: number;
590
+ const CIPHERREQUEST: number;
591
+ const DERIVEBITSREQUEST: number;
592
+ const HASHREQUEST: number;
593
+ const RANDOMBYTESREQUEST: number;
594
+ const RANDOMPRIMEREQUEST: number;
595
+ const SCRYPTREQUEST: number;
596
+ const SIGNREQUEST: number;
597
+ const TLSWRAP: number;
598
+ const VERIFYREQUEST: number;
599
+ }
600
+ }
601
+ declare module "node:async_hooks" {
602
+ export * from "async_hooks";
603
+ }