@irrelon/emitter 5.0.0 → 5.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +1 -3
- package/.eslintrc.json +35 -18
- package/.prettierignore +9 -0
- package/.prettierrc.yml +9 -0
- package/fixPaths.cjs +183 -0
- package/package.json +31 -24
- package/readme.md +24 -53
- package/src/Emitter.d.ts +190 -0
- package/src/Emitter.js +580 -0
- package/src/Emitter.ts +294 -247
- package/tests/Emitter.test.d.ts +1 -0
- package/tests/Emitter.test.js +267 -309
- package/tests/Emitter.test.ts +335 -0
- package/tsconfig.json +33 -12
- package/tsconfig.tsbuildinfo +1 -0
- package/.babelrc +0 -11
- package/dist/Emitter.d.ts +0 -205
- package/dist/Emitter.js +0 -415
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
import assert from "assert";
|
|
2
|
+
import {Emitter, EventListenerCallback, EventReturnFlag} from "../src/Emitter";
|
|
3
|
+
|
|
4
|
+
let expectedAssertions = 0;
|
|
5
|
+
let actualAssertions = 0;
|
|
6
|
+
|
|
7
|
+
function expect (val: number) {
|
|
8
|
+
expectedAssertions = val;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function reset () {
|
|
12
|
+
expectedAssertions = 0;
|
|
13
|
+
actualAssertions = 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function countAssertion () {
|
|
17
|
+
actualAssertions++;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function check () {
|
|
21
|
+
if (expectedAssertions === undefined || expectedAssertions === actualAssertions) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const err = new Error("expected " + expectedAssertions + " assertions, got " + actualAssertions);
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
this.currentTest.emit("error", err);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
beforeEach(reset);
|
|
30
|
+
afterEach(check);
|
|
31
|
+
|
|
32
|
+
describe("Emitter", () => {
|
|
33
|
+
describe("new Emitter()", () => {
|
|
34
|
+
it("Creates emitter instance by instantiation", () => {
|
|
35
|
+
const myClass = new Emitter();
|
|
36
|
+
|
|
37
|
+
myClass.on("moo", () => {
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
assert.strictEqual(myClass._eventListeners?.moo["*"].length, 1, "Listener registered on event");
|
|
41
|
+
|
|
42
|
+
myClass.off("moo");
|
|
43
|
+
|
|
44
|
+
assert.strictEqual(!myClass._eventListeners?.moo || !myClass._eventListeners.moo["*"] || myClass._eventListeners.moo["*"].length, true, "Listeners all removed from event");
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it("Supports extending Emitter as a base class", () => {
|
|
48
|
+
let testFuncCount = 0;
|
|
49
|
+
|
|
50
|
+
// Test extending Emitter and modifying base functionality
|
|
51
|
+
class MyClass extends Emitter {
|
|
52
|
+
testFunc () {
|
|
53
|
+
testFuncCount++;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
on (eventName: string, id: string, listener: EventListenerCallback): this;
|
|
57
|
+
on (eventName: string, listener: EventListenerCallback): this;
|
|
58
|
+
on (eventName: string, ...rest: any[]): this {
|
|
59
|
+
const restTypes = rest.map((arg) => typeof arg);
|
|
60
|
+
|
|
61
|
+
if (restTypes[0] === "function") {
|
|
62
|
+
const listener = restTypes[0] as unknown as EventListenerCallback;
|
|
63
|
+
const id = "^^noId";
|
|
64
|
+
|
|
65
|
+
return super.on(eventName, id, listener);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return super.on(eventName, rest[0], rest[1]);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// @ts-ignore
|
|
72
|
+
emit (eventName: string, ...rest: any[]): EventReturnFlag {
|
|
73
|
+
return super.emitId(eventName, "^^noId", ...rest);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
off (eventName: string, id: string, listener?: EventListenerCallback): this;
|
|
77
|
+
off (eventName: string, listener?: EventListenerCallback): this;
|
|
78
|
+
off (eventName: string): this;
|
|
79
|
+
off (eventName: string, ...rest: any[]) {
|
|
80
|
+
let id = rest[0];
|
|
81
|
+
let func = rest[1];
|
|
82
|
+
|
|
83
|
+
if (typeof rest[0] === "function") {
|
|
84
|
+
func = rest[0];
|
|
85
|
+
id = "^^noId";
|
|
86
|
+
} else if (typeof id === "undefined") {
|
|
87
|
+
id = "^^noId";
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return super.off(eventName, id, func);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const myClass = new MyClass();
|
|
95
|
+
let emitCount = 0;
|
|
96
|
+
|
|
97
|
+
// Register id-based listener
|
|
98
|
+
myClass.on("moo", "testId", () => {
|
|
99
|
+
emitCount++;
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
// Register non-id-based listener
|
|
103
|
+
myClass.on("moo", () => {
|
|
104
|
+
emitCount++;
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
assert.strictEqual(myClass._eventListeners?.moo["testId"].length, 1, "Listener registered on event");
|
|
108
|
+
|
|
109
|
+
myClass.emitId("moo", "testId", "foo");
|
|
110
|
+
|
|
111
|
+
assert.strictEqual(emitCount, 1, "Event fired correctly");
|
|
112
|
+
|
|
113
|
+
myClass.off("moo", "testId");
|
|
114
|
+
|
|
115
|
+
assert.strictEqual(!myClass._eventListeners?.moo || !myClass._eventListeners?.moo["testId"] || myClass._eventListeners?.moo["testId"].length === 0, true, "Listeners all removed from event");
|
|
116
|
+
assert.strictEqual(myClass._eventListeners?.moo && myClass._eventListeners?.moo["^^noId"] && myClass._eventListeners?.moo["^^noId"].length === 1, true, "Global listener still there");
|
|
117
|
+
assert.strictEqual(!myClass._eventListeners?.moo || !myClass._eventListeners?.moo["*"] || myClass._eventListeners?.moo["*"].length === 0, true, "Global listener still there");
|
|
118
|
+
|
|
119
|
+
myClass.off("moo");
|
|
120
|
+
|
|
121
|
+
assert.strictEqual(!myClass._eventListeners?.moo || !myClass._eventListeners?.moo["*"] || myClass._eventListeners?.moo["*"].length === 0, true, "Listeners all removed from event");
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
describe("emit()", () => {
|
|
126
|
+
it("Supports awaiting async listeners", async () => {
|
|
127
|
+
const emitter = new Emitter();
|
|
128
|
+
let listenerFiredCount = 0;
|
|
129
|
+
|
|
130
|
+
emitter.on("foo", async () => {
|
|
131
|
+
return new Promise<void>((resolve) => {
|
|
132
|
+
setTimeout(() => {
|
|
133
|
+
listenerFiredCount++;
|
|
134
|
+
resolve();
|
|
135
|
+
},1000);
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
emitter.on("foo", async () => {
|
|
140
|
+
return new Promise<void>((resolve) => {
|
|
141
|
+
setTimeout(() => {
|
|
142
|
+
listenerFiredCount++;
|
|
143
|
+
resolve();
|
|
144
|
+
},1000);
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
const time = new Date().getTime();
|
|
149
|
+
await emitter.emit("foo");
|
|
150
|
+
const delta = new Date().getTime() - time;
|
|
151
|
+
|
|
152
|
+
assert.ok(delta > 900, "Delta was not correct, await may not have paused?");
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
describe("off()", () => {
|
|
157
|
+
it("Cancels all listeners (event)", () => {
|
|
158
|
+
const myClass = new Emitter();
|
|
159
|
+
const listener1 = () => {};
|
|
160
|
+
const listener2 = () => {};
|
|
161
|
+
|
|
162
|
+
myClass.on("moo", () => {});
|
|
163
|
+
assert.strictEqual(myClass._eventListeners?.moo["*"].length, 1, "Listeners registered on event");
|
|
164
|
+
myClass.on("moo", "testId", () => {});
|
|
165
|
+
assert.strictEqual(myClass._eventListeners?.moo["testId"].length, 1, "Listeners registered on event");
|
|
166
|
+
myClass.on("moo", listener1);
|
|
167
|
+
assert.strictEqual(myClass._eventListeners?.moo["*"].length, 2, "Listeners registered on event");
|
|
168
|
+
myClass.on("moo", "testId", listener2);
|
|
169
|
+
assert.strictEqual(myClass._eventListeners?.moo["testId"].length, 2, "Listeners registered on event");
|
|
170
|
+
|
|
171
|
+
myClass.off("moo");
|
|
172
|
+
|
|
173
|
+
assert.strictEqual(!myClass._eventListeners?.moo || (myClass._eventListeners?.moo["*"].length === 0 && myClass._eventListeners?.moo["testId"].length === 0), true, "Listeners all removed from event");
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
it("Cancels id-based listeners (event, id)", () => {
|
|
177
|
+
const myClass = new Emitter();
|
|
178
|
+
const listener1 = () => {};
|
|
179
|
+
const listener2 = () => {};
|
|
180
|
+
|
|
181
|
+
myClass.on("moo", () => {});
|
|
182
|
+
assert.strictEqual(myClass._eventListeners?.moo["*"].length, 1, "Listeners registered on event");
|
|
183
|
+
myClass.on("moo", "testId", () => {});
|
|
184
|
+
assert.strictEqual(myClass._eventListeners?.moo["testId"].length, 1, "Listeners registered on event");
|
|
185
|
+
myClass.on("moo", listener1);
|
|
186
|
+
assert.strictEqual(myClass._eventListeners?.moo["*"].length, 2, "Listeners registered on event");
|
|
187
|
+
myClass.on("moo", "testId", listener2);
|
|
188
|
+
assert.strictEqual(myClass._eventListeners?.moo["testId"].length, 2, "Listeners registered on event");
|
|
189
|
+
|
|
190
|
+
myClass.off("moo", "testId");
|
|
191
|
+
|
|
192
|
+
assert.strictEqual(myClass._eventListeners?.moo["*"].length === 2, true, "Listeners all removed from event");
|
|
193
|
+
assert.strictEqual(!myClass._eventListeners?.moo["testId"] || myClass._eventListeners?.moo["testId"].length === 0, true, "Listeners all removed from event");
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
it("Cancels listener-based listeners (event, listener)", () => {
|
|
197
|
+
const myClass = new Emitter();
|
|
198
|
+
const listener1 = () => {};
|
|
199
|
+
const listener2 = () => {};
|
|
200
|
+
|
|
201
|
+
myClass.on("moo", () => {});
|
|
202
|
+
assert.strictEqual(myClass._eventListeners?.moo["*"].length, 1, "Listeners registered on event");
|
|
203
|
+
myClass.on("moo", "testId", () => {});
|
|
204
|
+
assert.strictEqual(myClass._eventListeners?.moo["testId"].length, 1, "Listeners registered on event");
|
|
205
|
+
myClass.on("moo", listener1);
|
|
206
|
+
assert.strictEqual(myClass._eventListeners?.moo["*"].length, 2, "Listeners registered on event");
|
|
207
|
+
myClass.on("moo", "testId", listener2);
|
|
208
|
+
assert.strictEqual(myClass._eventListeners?.moo["testId"].length, 2, "Listeners registered on event");
|
|
209
|
+
|
|
210
|
+
myClass.off("moo", listener1);
|
|
211
|
+
|
|
212
|
+
assert.strictEqual(myClass._eventListeners?.moo["*"].length === 1, true, "Listeners all removed from event");
|
|
213
|
+
assert.strictEqual(myClass._eventListeners?.moo["testId"].length === 2, true, "Listeners all removed from event");
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
it("Cancels id-based + listener-based listeners (event, id, listener)", () => {
|
|
217
|
+
const myClass = new Emitter();
|
|
218
|
+
const listener1 = () => {};
|
|
219
|
+
const listener2 = () => {};
|
|
220
|
+
|
|
221
|
+
myClass.on("moo", () => {});
|
|
222
|
+
assert.strictEqual(myClass._eventListeners?.moo["*"].length, 1, "Listeners registered on event");
|
|
223
|
+
myClass.on("moo", "testId", () => {});
|
|
224
|
+
assert.strictEqual(myClass._eventListeners?.moo["testId"].length, 1, "Listeners registered on event");
|
|
225
|
+
myClass.on("moo", listener1);
|
|
226
|
+
assert.strictEqual(myClass._eventListeners?.moo["*"].length, 2, "Listeners registered on event");
|
|
227
|
+
myClass.on("moo", "testId", listener2);
|
|
228
|
+
assert.strictEqual(myClass._eventListeners?.moo["testId"].length, 2, "Listeners registered on event");
|
|
229
|
+
|
|
230
|
+
myClass.off("moo", "testId", listener2);
|
|
231
|
+
|
|
232
|
+
assert.strictEqual(myClass._eventListeners?.moo["*"].length === 2, true, "Listeners all removed from event");
|
|
233
|
+
assert.strictEqual(myClass._eventListeners?.moo["testId"].length === 1, true, "Listeners all removed from event");
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
describe("emitStatic()", () => {
|
|
238
|
+
it("Static emitter will emit when a new listener is added", (resolve) => {
|
|
239
|
+
class MyClass extends Emitter {}
|
|
240
|
+
|
|
241
|
+
expect(1);
|
|
242
|
+
|
|
243
|
+
const myClass = new MyClass();
|
|
244
|
+
myClass.emitStatic("moo");
|
|
245
|
+
myClass.on("moo", () => {
|
|
246
|
+
countAssertion();
|
|
247
|
+
assert.ok(true, "Callback was fired");
|
|
248
|
+
resolve();
|
|
249
|
+
});
|
|
250
|
+
});
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
describe("cancelStatic()", () => {
|
|
254
|
+
it("Removes static emitter", (resolve) => {
|
|
255
|
+
class MyClass extends Emitter {}
|
|
256
|
+
|
|
257
|
+
expect(1);
|
|
258
|
+
|
|
259
|
+
const myClass = new MyClass();
|
|
260
|
+
myClass.emitStatic("moo");
|
|
261
|
+
myClass.on("moo", () => {
|
|
262
|
+
countAssertion();
|
|
263
|
+
assert.ok(true, "Callback was fired");
|
|
264
|
+
});
|
|
265
|
+
|
|
266
|
+
myClass.cancelStatic("moo");
|
|
267
|
+
myClass.on("moo", () => {
|
|
268
|
+
countAssertion();
|
|
269
|
+
assert.ok(false, "Callback was fired");
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
setTimeout(() => {
|
|
273
|
+
resolve();
|
|
274
|
+
}, 10);
|
|
275
|
+
});
|
|
276
|
+
});
|
|
277
|
+
|
|
278
|
+
describe("overwrite()", () => {
|
|
279
|
+
it("Only fires the last listener added, cancelling all other listeners before it", (resolve) => {
|
|
280
|
+
class MyClass extends Emitter {}
|
|
281
|
+
expect(1);
|
|
282
|
+
|
|
283
|
+
const myClass = new MyClass();
|
|
284
|
+
myClass.on("moo", () => {
|
|
285
|
+
countAssertion();
|
|
286
|
+
assert.ok(false, "Correct callback was fired");
|
|
287
|
+
});
|
|
288
|
+
myClass.on("moo", () => {
|
|
289
|
+
countAssertion();
|
|
290
|
+
assert.ok(false, "Correct callback was fired");
|
|
291
|
+
});
|
|
292
|
+
myClass.overwrite("moo", () => {
|
|
293
|
+
countAssertion();
|
|
294
|
+
assert.ok(true, "Correct callback was fired");
|
|
295
|
+
});
|
|
296
|
+
myClass.emit("moo");
|
|
297
|
+
|
|
298
|
+
setTimeout(() => {
|
|
299
|
+
resolve();
|
|
300
|
+
}, 10);
|
|
301
|
+
});
|
|
302
|
+
});
|
|
303
|
+
|
|
304
|
+
describe("emitId()", () => {
|
|
305
|
+
it("Fires an id-based event first followed by a global event", () => {
|
|
306
|
+
const myClass = new Emitter();
|
|
307
|
+
let emitCount = 0;
|
|
308
|
+
|
|
309
|
+
// Register id-based listener
|
|
310
|
+
myClass.on("moo", "testId", () => {
|
|
311
|
+
emitCount++;
|
|
312
|
+
});
|
|
313
|
+
|
|
314
|
+
// Register non-id-based listener
|
|
315
|
+
myClass.on("moo", () => {
|
|
316
|
+
emitCount++;
|
|
317
|
+
});
|
|
318
|
+
|
|
319
|
+
assert.strictEqual(myClass._eventListeners?.moo["testId"].length, 1, "Listener registered on event");
|
|
320
|
+
|
|
321
|
+
myClass.emitId("moo", "testId", "foo");
|
|
322
|
+
|
|
323
|
+
assert.strictEqual(emitCount, 2, "Event fired correctly");
|
|
324
|
+
|
|
325
|
+
myClass.off("moo", "testId");
|
|
326
|
+
|
|
327
|
+
assert.strictEqual(!myClass._eventListeners?.moo || !myClass._eventListeners?.moo["testId"] || myClass._eventListeners?.moo["testId"].length, true, "Listeners all removed from event");
|
|
328
|
+
assert.strictEqual(myClass._eventListeners?.moo && myClass._eventListeners?.moo["*"] && myClass._eventListeners?.moo["*"].length === 1, true, "Global listener still there");
|
|
329
|
+
|
|
330
|
+
myClass.off("moo");
|
|
331
|
+
|
|
332
|
+
assert.strictEqual(!myClass._eventListeners?.moo || !myClass._eventListeners?.moo["*"] || myClass._eventListeners?.moo["*"].length === 0, true, "Listeners all removed from event");
|
|
333
|
+
});
|
|
334
|
+
});
|
|
335
|
+
});
|
package/tsconfig.json
CHANGED
|
@@ -1,29 +1,50 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"downlevelIteration": true,
|
|
4
|
+
"baseUrl": ".",
|
|
5
|
+
"paths": {
|
|
6
|
+
"@/components/*": [
|
|
7
|
+
"components/*"
|
|
8
|
+
],
|
|
9
|
+
"@/services/*": [
|
|
10
|
+
"services/*"
|
|
11
|
+
],
|
|
12
|
+
"@/types/*": [
|
|
13
|
+
"types/*"
|
|
14
|
+
],
|
|
15
|
+
"@/styles/*": [
|
|
16
|
+
"styles/*"
|
|
17
|
+
],
|
|
18
|
+
"@/config/*": [
|
|
19
|
+
"config/*"
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"target": "es6",
|
|
5
23
|
"lib": [
|
|
6
24
|
"dom",
|
|
7
25
|
"dom.iterable",
|
|
8
26
|
"esnext"
|
|
9
27
|
],
|
|
10
28
|
"allowJs": false,
|
|
11
|
-
"skipLibCheck":
|
|
12
|
-
"esModuleInterop": true,
|
|
13
|
-
"allowSyntheticDefaultImports": true,
|
|
29
|
+
"skipLibCheck": false,
|
|
14
30
|
"strict": true,
|
|
15
31
|
"forceConsistentCasingInFileNames": true,
|
|
16
|
-
"
|
|
17
|
-
"
|
|
32
|
+
"noEmit": false,
|
|
33
|
+
"incremental": true,
|
|
34
|
+
"esModuleInterop": true,
|
|
35
|
+
"module": "es2022",
|
|
18
36
|
"moduleResolution": "node",
|
|
19
37
|
"resolveJsonModule": true,
|
|
20
38
|
"isolatedModules": true,
|
|
21
|
-
"noEmit": false,
|
|
22
|
-
"jsx": "react-jsx",
|
|
23
|
-
"outDir": "dist",
|
|
24
39
|
"declaration": true
|
|
25
40
|
},
|
|
26
41
|
"include": [
|
|
27
|
-
"src"
|
|
42
|
+
"src/**/*.ts",
|
|
43
|
+
"tests/*.ts",
|
|
44
|
+
"tests/**/*.ts",
|
|
45
|
+
"src/**/*.tsx"
|
|
46
|
+
],
|
|
47
|
+
"exclude": [
|
|
48
|
+
"node_modules"
|
|
28
49
|
]
|
|
29
|
-
}
|
|
50
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"program":{"fileNames":["./node_modules/typescript/lib/lib.es5.d.ts","./node_modules/typescript/lib/lib.es2015.d.ts","./node_modules/typescript/lib/lib.es2016.d.ts","./node_modules/typescript/lib/lib.es2017.d.ts","./node_modules/typescript/lib/lib.es2018.d.ts","./node_modules/typescript/lib/lib.es2019.d.ts","./node_modules/typescript/lib/lib.es2020.d.ts","./node_modules/typescript/lib/lib.es2021.d.ts","./node_modules/typescript/lib/lib.es2022.d.ts","./node_modules/typescript/lib/lib.esnext.d.ts","./node_modules/typescript/lib/lib.dom.d.ts","./node_modules/typescript/lib/lib.dom.iterable.d.ts","./node_modules/typescript/lib/lib.es2015.core.d.ts","./node_modules/typescript/lib/lib.es2015.collection.d.ts","./node_modules/typescript/lib/lib.es2015.generator.d.ts","./node_modules/typescript/lib/lib.es2015.iterable.d.ts","./node_modules/typescript/lib/lib.es2015.promise.d.ts","./node_modules/typescript/lib/lib.es2015.proxy.d.ts","./node_modules/typescript/lib/lib.es2015.reflect.d.ts","./node_modules/typescript/lib/lib.es2015.symbol.d.ts","./node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","./node_modules/typescript/lib/lib.es2016.array.include.d.ts","./node_modules/typescript/lib/lib.es2017.object.d.ts","./node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","./node_modules/typescript/lib/lib.es2017.string.d.ts","./node_modules/typescript/lib/lib.es2017.intl.d.ts","./node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","./node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","./node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","./node_modules/typescript/lib/lib.es2018.intl.d.ts","./node_modules/typescript/lib/lib.es2018.promise.d.ts","./node_modules/typescript/lib/lib.es2018.regexp.d.ts","./node_modules/typescript/lib/lib.es2019.array.d.ts","./node_modules/typescript/lib/lib.es2019.object.d.ts","./node_modules/typescript/lib/lib.es2019.string.d.ts","./node_modules/typescript/lib/lib.es2019.symbol.d.ts","./node_modules/typescript/lib/lib.es2020.bigint.d.ts","./node_modules/typescript/lib/lib.es2020.date.d.ts","./node_modules/typescript/lib/lib.es2020.promise.d.ts","./node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","./node_modules/typescript/lib/lib.es2020.string.d.ts","./node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","./node_modules/typescript/lib/lib.es2020.intl.d.ts","./node_modules/typescript/lib/lib.es2020.number.d.ts","./node_modules/typescript/lib/lib.es2021.promise.d.ts","./node_modules/typescript/lib/lib.es2021.string.d.ts","./node_modules/typescript/lib/lib.es2021.weakref.d.ts","./node_modules/typescript/lib/lib.es2021.intl.d.ts","./node_modules/typescript/lib/lib.es2022.array.d.ts","./node_modules/typescript/lib/lib.es2022.error.d.ts","./node_modules/typescript/lib/lib.es2022.intl.d.ts","./node_modules/typescript/lib/lib.es2022.object.d.ts","./node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","./node_modules/typescript/lib/lib.es2022.string.d.ts","./node_modules/typescript/lib/lib.esnext.intl.d.ts","./src/emitter.ts","./tests/emitter.test.ts","./node_modules/@babel/types/lib/index.d.ts","./node_modules/@types/babel__generator/index.d.ts","./node_modules/@babel/parser/typings/babel-parser.d.ts","./node_modules/@types/babel__template/index.d.ts","./node_modules/@types/babel__traverse/index.d.ts","./node_modules/@types/babel__core/index.d.ts","./node_modules/@types/node/ts4.8/assert.d.ts","./node_modules/@types/node/ts4.8/assert/strict.d.ts","./node_modules/@types/node/ts4.8/globals.d.ts","./node_modules/@types/node/ts4.8/async_hooks.d.ts","./node_modules/@types/node/ts4.8/buffer.d.ts","./node_modules/@types/node/ts4.8/child_process.d.ts","./node_modules/@types/node/ts4.8/cluster.d.ts","./node_modules/@types/node/ts4.8/console.d.ts","./node_modules/@types/node/ts4.8/constants.d.ts","./node_modules/@types/node/ts4.8/crypto.d.ts","./node_modules/@types/node/ts4.8/dgram.d.ts","./node_modules/@types/node/ts4.8/diagnostics_channel.d.ts","./node_modules/@types/node/ts4.8/dns.d.ts","./node_modules/@types/node/ts4.8/dns/promises.d.ts","./node_modules/@types/node/ts4.8/domain.d.ts","./node_modules/@types/node/ts4.8/events.d.ts","./node_modules/@types/node/ts4.8/fs.d.ts","./node_modules/@types/node/ts4.8/fs/promises.d.ts","./node_modules/@types/node/ts4.8/http.d.ts","./node_modules/@types/node/ts4.8/http2.d.ts","./node_modules/@types/node/ts4.8/https.d.ts","./node_modules/@types/node/ts4.8/inspector.d.ts","./node_modules/@types/node/ts4.8/module.d.ts","./node_modules/@types/node/ts4.8/net.d.ts","./node_modules/@types/node/ts4.8/os.d.ts","./node_modules/@types/node/ts4.8/path.d.ts","./node_modules/@types/node/ts4.8/perf_hooks.d.ts","./node_modules/@types/node/ts4.8/process.d.ts","./node_modules/@types/node/ts4.8/punycode.d.ts","./node_modules/@types/node/ts4.8/querystring.d.ts","./node_modules/@types/node/ts4.8/readline.d.ts","./node_modules/@types/node/ts4.8/readline/promises.d.ts","./node_modules/@types/node/ts4.8/repl.d.ts","./node_modules/@types/node/ts4.8/stream.d.ts","./node_modules/@types/node/ts4.8/stream/promises.d.ts","./node_modules/@types/node/ts4.8/stream/consumers.d.ts","./node_modules/@types/node/ts4.8/stream/web.d.ts","./node_modules/@types/node/ts4.8/string_decoder.d.ts","./node_modules/@types/node/ts4.8/test.d.ts","./node_modules/@types/node/ts4.8/timers.d.ts","./node_modules/@types/node/ts4.8/timers/promises.d.ts","./node_modules/@types/node/ts4.8/tls.d.ts","./node_modules/@types/node/ts4.8/trace_events.d.ts","./node_modules/@types/node/ts4.8/tty.d.ts","./node_modules/@types/node/ts4.8/url.d.ts","./node_modules/@types/node/ts4.8/util.d.ts","./node_modules/@types/node/ts4.8/v8.d.ts","./node_modules/@types/node/ts4.8/vm.d.ts","./node_modules/@types/node/ts4.8/wasi.d.ts","./node_modules/@types/node/ts4.8/worker_threads.d.ts","./node_modules/@types/node/ts4.8/zlib.d.ts","./node_modules/@types/node/ts4.8/globals.global.d.ts","./node_modules/@types/node/ts4.8/index.d.ts","./node_modules/@types/graceful-fs/index.d.ts","./node_modules/@types/istanbul-lib-coverage/index.d.ts","./node_modules/@types/istanbul-lib-report/index.d.ts","./node_modules/@types/istanbul-reports/index.d.ts","./node_modules/@jest/expect-utils/build/index.d.ts","./node_modules/jest-matcher-utils/node_modules/chalk/index.d.ts","./node_modules/@sinclair/typebox/typebox.d.ts","./node_modules/@jest/schemas/build/index.d.ts","./node_modules/pretty-format/build/index.d.ts","./node_modules/jest-diff/build/index.d.ts","./node_modules/jest-matcher-utils/build/index.d.ts","./node_modules/expect/build/index.d.ts","./node_modules/@types/jest/index.d.ts","./node_modules/@types/json-schema/index.d.ts","./node_modules/@types/json5/index.d.ts","./node_modules/@types/prettier/index.d.ts","./node_modules/@types/stack-utils/index.d.ts","./node_modules/@types/yargs-parser/index.d.ts","./node_modules/@types/yargs/index.d.ts"],"fileInfos":[{"version":"f20c05dbfe50a208301d2a1da37b9931bce0466eb5a1f4fe240971b4ecc82b67","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","d11a03592451da2d1065e09e61f4e2a9bf68f780f4f6623c18b57816a9679d17","aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c",{"version":"9b087de7268e4efc5f215347a62656663933d63c0b1d7b624913240367b999ea","affectsGlobalScope":true},{"version":"3260e3386d9535b804205bdddb5618a9a27735bd22927f48ad54363abcd23d45","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"55f400eec64d17e888e278f4def2f254b41b89515d3b88ad75d5e05f019daddd","affectsGlobalScope":true},{"version":"181f1784c6c10b751631b24ce60c7f78b20665db4550b335be179217bacc0d5f","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"775d9c9fd150d5de79e0450f35bc8b8f94ae64e3eb5da12725ff2a649dccc777","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"34c839eaaa6d78c8674ae2c37af2236dee6831b13db7b4ef4df3ec889a04d4f2","affectsGlobalScope":true},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true},{"version":"ab7d58e6161a550ff92e5aff755dc37fe896245348332cd5f1e1203479fe0ed1","affectsGlobalScope":true},{"version":"6bda95ea27a59a276e46043b7065b55bd4b316c25e70e29b572958fa77565d43","affectsGlobalScope":true},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true},{"version":"a4da0551fd39b90ca7ce5f68fb55d4dc0c1396d589b612e1902f68ee090aaada","affectsGlobalScope":true},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},{"version":"442e2e6f1eb8f8cb85dbee0744b26f39ef5be1aeef45c5f56f3b374ca116cbe9","signature":"de04d95a7708060e5e33df99522ebe0f0198e5f2107b34bde28034de76d1b30f"},{"version":"f48e6dcb60f625ab32a86268978f30d57620c9fd412b4c4796819dffe49c3252","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},"c561efdf5ba0b62619745d4761fe2d9756f23db972e039367d15922fed67fd2f","cc957354aa3c94c9961ebf46282cfde1e81d107fc5785a61f62c67f1dd3ac2eb","7ec238b220ea991b6643e24191b1f552a65956d5f6de4c6144e700b9985265d8","93de1c6dab503f053efe8d304cb522bb3a89feab8c98f307a674a4fae04773e9","dae3d1adc67ac3dbd1cd471889301339ec439837b5df565982345be20c8fca9a","5426e62886b7be7806312d31a00e8f7dccd6fe63ba9bbefe99ee2eab29cc48a3","9122ed7070e054b73ebab37c2373a196def2d90e7d1a9a7fcd9d46b0e51fae78","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"77f0b5c6a193a699c9f7d7fb0578e64e562d271afa740783665d2a827104a873","affectsGlobalScope":true},"21a167fec8f933752fb8157f06d28fab6817af3ad9b0bdb1908a10762391eab9",{"version":"002d6d5f044365b3fbfba0ba9be3bb57cac09b81547c8df4b0795755d2081d90","affectsGlobalScope":true},"0c0cee62cb619aed81133b904f644515ba3064487002a7da83fd8aa07b1b4abd","5a94487653355b56018122d92392beb2e5f4a6c63ba5cef83bbe1c99775ef713",{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","c4cfc9a6e2ebb8bc8c0e2392dfc4056993ced3b35069ebf132ac18ca7a562881","bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","75ecef44f126e2ae018b4abbd85b6e8a2e2ba1638ebec56cc64274643ce3567b","f30bb836526d930a74593f7b0f5c1c46d10856415a8f69e5e2fc3db80371e362","14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea",{"version":"bae4ea23beb8397755b935cb84d3cdc6cdb0b1b4a329b90de9fc6c8774d71994","affectsGlobalScope":true},"cec36af22f514322f870e81d30675c78df82ae8bf4863f5fd4e4424c040c678d","df36874d9e56aff601e921c4b3971d37cf66d14f6455935ce821e6cad13b1823","3c135ff5bda0355f6b52a10ea931736ec7c5a80b7fb8772019054e0eaa0fd6b6","1abb206a4ecd13b21536b677d7d5f66e0d7316f0d44610197cfcc5776f78884a","dbe5aa5a5dd8bd1c6a8d11b1310c3f0cdabaacc78a37b394a8c7b14faeb5fb84","2c828a5405191d006115ab34e191b8474bc6c86ffdc401d1a9864b1b6e088a58",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"76527127c8b749bee5977408861ce3ee56ec19ddcea8704c628f98ca610283e6","7c013aa892414a7fdcfd861ae524a668eaa3ede8c7c0acafaf611948122c8d93","b68bd7bef90dab08b1866a9fee24f03d9fee10bcb3f587b074e96e61abf6d3f0","cb4f3f03480e1727eae46400606cecaa97f550186ff8fa909ebc00db4180531b",{"version":"b3624aed92dab6da8484280d3cb3e2f4130ec3f4ef3f8201c95144ae9e898bb6","affectsGlobalScope":true},"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","d1a78a3c5708807e8de3e399f91df4797c62e44b02195eefc2209b2e713e54ee","36b03690b628eab08703d63f04eaa89c5df202e5f1edf3989f13ad389cd2c091","0effadd232a20498b11308058e334d3339cc5bf8c4c858393e38d9d4c0013dcf","25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","556bf5c36deb62cffa1bf697c1789fe008ec82db0273025001db66732714e9d9","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda","0830071706fa0e477fb5e95f0955cc1062b5948b146b7d4e03a126f12ad6085f",{"version":"970a90f76d4d219ad60819d61f5994514087ba94c985647a3474a5a3d12714ed","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","4c8525f256873c7ba3135338c647eaf0ca7115a1a2805ae2d0056629461186ce","3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2",{"version":"bfe39beb986d2a2e512c091cbe924f1c415bc65de54de0e2f6a0dc6f84c183d9","affectsGlobalScope":true},"2d526e6f21d8cc66ac11ada32874e95ae88d870c6c9d3d9d4e03b1d1f9ad7b8e","06d7c42d256f0ce6afe1b2b6cfbc97ab391f29dadb00dd0ae8e8f23f5bc916c3","ec4bd1b200670fb567920db572d6701ed42a9641d09c4ff6869768c8f81b404c","e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa","d2ec52f565f0570e90b659811347bd689f8c6039b11eaaccd0f243759d46da6e","8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"ecd8eb2ed2ea3f7e17ae00a2ce61db2c199e6e3944f6ff4a02de85c1a98e38eb","3ebae8c00411116a66fca65b08228ea0cf0b72724701f9b854442100aab55aba","8b06ac3faeacb8484d84ddb44571d8f410697f98d7bfa86c0fda60373a9f5215","7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee","f5638f7c2f12a9a1a57b5c41b3c1ea7db3876c003bab68e6a57afd6bcc169af0","763e521cf114b80e0dd0e21ca49b9f8ae62e8999555a5e7bade8ce36b33001c2","0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","032cbd1883827ca3728c1400145403b62e65b7b584a0d2115ae538c9edec7936","427ce5854885cfc34387e09de05c1d5c1acf94c2143e1693f1d9ff54880573e7","bed2c4f96fab3348be4a34d88dcb12578c1b2475b07c6acd369e99e227718d81","e3ba509d3dce019b3190ceb2f3fc88e2610ab717122dabd91a9efaa37804040d","cda0cb09b995489b7f4c57f168cd31b83dcbaa7aad49612734fb3c9c73f6e4f2","3b105d5a0dacc73812d93e90d3c7243fd5a9c0566a2e63bc2964ca12d882c8e8",{"version":"458e2fd1185e659cb800ef68d01ef77de70dcab8860bedf6d94eaebe736751f1","affectsGlobalScope":true},"f3e604694b624fa3f83f6684185452992088f5efb2cf136b62474aa106d6f1b6","96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","93c4fc5b5237c09bc9ed65cb8f0dc1d89034406ab40500b89701341994897142","b0d10e46cfe3f6c476b69af02eaa38e4ccc7430221ce3109ae84bb9fb8282298","70e9a18da08294f75bf23e46c7d69e67634c0765d355887b9b41f0d959e1426e","28288f5e5f8b7b895ed2abe6359c1da3e0d14a64b5aef985071285671f347c01"],"options":{"declaration":true,"downlevelIteration":true,"esModuleInterop":true,"module":7,"skipLibCheck":false,"strict":true,"target":2},"fileIdsList":[[58,109],[109],[109,123],[58,59,60,61,62,109],[58,60,109],[80,109,116],[109,118],[109,119],[109,125,128],[64,109],[67,109],[68,73,109],[69,79,80,87,97,108,109],[69,70,79,87,109],[71,109],[72,73,80,88,109],[73,97,105,109],[74,76,79,87,109],[75,109],[76,77,109],[78,79,109],[79,109],[79,80,81,97,108,109],[79,80,81,97,100,109],[109,113],[82,87,97,108,109],[79,80,82,83,87,97,105,108,109],[82,84,97,105,108,109],[64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115],[79,85,109],[86,108,109],[76,79,87,97,109],[88,109],[89,109],[67,90,109],[91,107,109,113],[92,109],[93,109],[79,94,95,109],[94,96,109,111],[79,97,98,99,100,109],[97,99,109],[97,98,109],[100,109],[101,109],[79,103,104,109],[103,104,109],[73,87,97,105,109],[106,109],[87,107,109],[68,82,93,108,109],[73,109],[97,109,110],[109,111],[109,112],[68,73,79,81,90,97,108,109,111,113],[97,109,114],[109,134],[109,121,127],[109,125],[109,122,126],[109,124],[56,64,109]],"referencedMap":[[60,1],[58,2],[121,2],[124,3],[123,2],[63,4],[59,1],[61,5],[62,1],[117,6],[118,2],[119,7],[120,8],[129,9],[130,2],[131,2],[64,10],[65,10],[67,11],[68,12],[69,13],[70,14],[71,15],[72,16],[73,17],[74,18],[75,19],[76,20],[77,20],[78,21],[79,22],[80,23],[81,24],[66,25],[115,2],[82,26],[83,27],[84,28],[116,29],[85,30],[86,31],[87,32],[88,33],[89,34],[90,35],[91,36],[92,37],[93,38],[94,39],[95,39],[96,40],[97,41],[99,42],[98,43],[100,44],[101,45],[102,2],[103,46],[104,47],[105,48],[106,49],[107,50],[108,51],[109,52],[110,53],[111,54],[112,55],[113,56],[114,57],[132,2],[133,2],[134,2],[135,58],[128,59],[126,60],[127,61],[122,2],[125,62],[11,2],[12,2],[14,2],[13,2],[2,2],[15,2],[16,2],[17,2],[18,2],[19,2],[20,2],[21,2],[22,2],[3,2],[4,2],[26,2],[23,2],[24,2],[25,2],[27,2],[28,2],[29,2],[5,2],[30,2],[31,2],[32,2],[33,2],[6,2],[34,2],[35,2],[36,2],[37,2],[7,2],[38,2],[43,2],[44,2],[39,2],[40,2],[41,2],[42,2],[8,2],[48,2],[45,2],[46,2],[47,2],[49,2],[9,2],[50,2],[51,2],[52,2],[53,2],[54,2],[1,2],[10,2],[55,2],[56,2],[57,63]],"exportedModulesMap":[[60,1],[58,2],[121,2],[124,3],[123,2],[63,4],[59,1],[61,5],[62,1],[117,6],[118,2],[119,7],[120,8],[129,9],[130,2],[131,2],[64,10],[65,10],[67,11],[68,12],[69,13],[70,14],[71,15],[72,16],[73,17],[74,18],[75,19],[76,20],[77,20],[78,21],[79,22],[80,23],[81,24],[66,25],[115,2],[82,26],[83,27],[84,28],[116,29],[85,30],[86,31],[87,32],[88,33],[89,34],[90,35],[91,36],[92,37],[93,38],[94,39],[95,39],[96,40],[97,41],[99,42],[98,43],[100,44],[101,45],[102,2],[103,46],[104,47],[105,48],[106,49],[107,50],[108,51],[109,52],[110,53],[111,54],[112,55],[113,56],[114,57],[132,2],[133,2],[134,2],[135,58],[128,59],[126,60],[127,61],[122,2],[125,62],[11,2],[12,2],[14,2],[13,2],[2,2],[15,2],[16,2],[17,2],[18,2],[19,2],[20,2],[21,2],[22,2],[3,2],[4,2],[26,2],[23,2],[24,2],[25,2],[27,2],[28,2],[29,2],[5,2],[30,2],[31,2],[32,2],[33,2],[6,2],[34,2],[35,2],[36,2],[37,2],[7,2],[38,2],[43,2],[44,2],[39,2],[40,2],[41,2],[42,2],[8,2],[48,2],[45,2],[46,2],[47,2],[49,2],[9,2],[50,2],[51,2],[52,2],[53,2],[54,2],[1,2],[10,2],[55,2]],"semanticDiagnosticsPerFile":[60,58,121,124,123,63,59,61,62,117,118,119,120,129,130,131,64,65,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,66,115,82,83,84,116,85,86,87,88,89,90,91,92,93,94,95,96,97,99,98,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,132,133,134,135,128,126,127,122,125,11,12,14,13,2,15,16,17,18,19,20,21,22,3,4,26,23,24,25,27,28,29,5,30,31,32,33,6,34,35,36,37,7,38,43,44,39,40,41,42,8,48,45,46,47,49,9,50,51,52,53,54,1,10,55,56,57]},"version":"4.8.4"}
|
package/.babelrc
DELETED
package/dist/Emitter.d.ts
DELETED
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
export interface InternalEventListenersType {
|
|
2
|
-
[eventName: string | symbol]: InternalEventListenersByIdType;
|
|
3
|
-
}
|
|
4
|
-
export interface InternalEventListenersByIdType {
|
|
5
|
-
[idName: string | symbol]: Array<EventListenerType>;
|
|
6
|
-
}
|
|
7
|
-
export declare type EventListenerType = (...rest: any[]) => any;
|
|
8
|
-
export interface InternalEventEmittersType {
|
|
9
|
-
[eventName: string | symbol]: Array<EventEmitterType>;
|
|
10
|
-
}
|
|
11
|
-
export interface EventEmitterType {
|
|
12
|
-
id: string | symbol;
|
|
13
|
-
args: any;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* @class Emitter
|
|
17
|
-
* @constructor
|
|
18
|
-
*/
|
|
19
|
-
export declare class Emitter {
|
|
20
|
-
private _emitting;
|
|
21
|
-
private _noEmitDefer;
|
|
22
|
-
private _listeners;
|
|
23
|
-
private _emitters;
|
|
24
|
-
private _eventRemovalQueue;
|
|
25
|
-
private _deferTimeout;
|
|
26
|
-
constructor(obj?: any);
|
|
27
|
-
/**
|
|
28
|
-
* Attach an event listener to the passed event only if the passed
|
|
29
|
-
* id matches the document id for the event being fired.
|
|
30
|
-
* @memberOf Emitter
|
|
31
|
-
* @method on
|
|
32
|
-
* @param {String} event The name of the event to listen for.
|
|
33
|
-
* @param {*} id The document id to match against.
|
|
34
|
-
* @param {Function} listener The method to call when the event is fired.
|
|
35
|
-
* @returns {Emitter} The emitter instance.
|
|
36
|
-
*/
|
|
37
|
-
_on(event: string | symbol, id: string | symbol, listener: (...rest: any[]) => any): this;
|
|
38
|
-
/**
|
|
39
|
-
* Attach an event listener to the passed event only if the passed
|
|
40
|
-
* id matches the document id for the event being fired.
|
|
41
|
-
* @memberOf Emitter
|
|
42
|
-
* @method once
|
|
43
|
-
* @param {String} event The name of the event to listen for.
|
|
44
|
-
* @param {*} id The document id to match against.
|
|
45
|
-
* @param {Function} listener The method to call when the event is fired.
|
|
46
|
-
* @returns {Emitter} The emitter instance.
|
|
47
|
-
*/
|
|
48
|
-
_once(event: string | symbol, id: string | symbol, listener: EventListenerType): any;
|
|
49
|
-
/**
|
|
50
|
-
* Cancels an event listener based on an event name, id and listener function.
|
|
51
|
-
* @memberOf Emitter
|
|
52
|
-
* @method off
|
|
53
|
-
* @param {String} event The event to cancel listener for.
|
|
54
|
-
* @param {String} id The ID of the event to cancel listening for.
|
|
55
|
-
* @param {Function} listener The event listener function used in the on()
|
|
56
|
-
* or once() call to cancel.
|
|
57
|
-
* @returns {Emitter} The emitter instance.
|
|
58
|
-
*/
|
|
59
|
-
_off(event: string | symbol, id: string | symbol, listener?: EventListenerType): this | undefined;
|
|
60
|
-
/**
|
|
61
|
-
* Attach an event listener to the passed event only if the passed
|
|
62
|
-
* id matches the document id for the event being fired.
|
|
63
|
-
* @memberOf Emitter
|
|
64
|
-
* @method on
|
|
65
|
-
* @param {String} event The name of the event to listen for.
|
|
66
|
-
* @param {*} id The document id to match against.
|
|
67
|
-
* @param {Function} listener The method to call when the event is fired.
|
|
68
|
-
* @returns {Emitter} The emitter instance.
|
|
69
|
-
*/
|
|
70
|
-
on(event: string | symbol, id: string | symbol, listener: EventListenerType): any;
|
|
71
|
-
on(event: string | symbol, listener: (...rest: any[]) => any): any;
|
|
72
|
-
/**
|
|
73
|
-
* Attach an event listener to the passed event only if the passed
|
|
74
|
-
* id matches the document id for the event being fired.
|
|
75
|
-
* @memberOf Emitter
|
|
76
|
-
* @method once
|
|
77
|
-
* @param {String} event The name of the event to listen for.
|
|
78
|
-
* @param {*} id The document id to match against.
|
|
79
|
-
* @param {Function} listener The method to call when the event is fired.
|
|
80
|
-
* @returns {Emitter} The emitter instance.
|
|
81
|
-
*/
|
|
82
|
-
once(event: string, id: string | symbol, listener: EventListenerType): any;
|
|
83
|
-
once(event: string, listener: (...rest: any[]) => any): any;
|
|
84
|
-
/**
|
|
85
|
-
* Attach an event listener to the passed event only if the passed
|
|
86
|
-
* id matches the document id for the event being fired.
|
|
87
|
-
* @memberOf Emitter
|
|
88
|
-
* @method once
|
|
89
|
-
* @param {String} event The name of the event to listen for.
|
|
90
|
-
* @param {*} id The document id to match against.
|
|
91
|
-
* @param {Function} listener The method to call when the event is fired.
|
|
92
|
-
* @returns {Emitter} The emitter instance.
|
|
93
|
-
*/
|
|
94
|
-
one(event: string, id: string | symbol, listener: EventListenerType): any;
|
|
95
|
-
one(event: string, listener: (...rest: any[]) => any): any;
|
|
96
|
-
/**
|
|
97
|
-
* Cancels an event listener based on an event name, id and listener function.
|
|
98
|
-
* @memberOf Emitter
|
|
99
|
-
* @method off
|
|
100
|
-
* @param event The event to cancel listener for.
|
|
101
|
-
* @param id The ID of the event to cancel listening for.
|
|
102
|
-
* @param listener The event listener function used in the on()
|
|
103
|
-
* or once() call to cancel.
|
|
104
|
-
* @returns {Emitter} The emitter instance.
|
|
105
|
-
*/
|
|
106
|
-
off(event: string | symbol, id: string | symbol, listener?: EventListenerType): any;
|
|
107
|
-
off(event: string | symbol, listener: (...rest: any[]) => any): any;
|
|
108
|
-
off(event: string | symbol): any;
|
|
109
|
-
/**
|
|
110
|
-
* Handles emitting events, is an internal method not called directly.
|
|
111
|
-
* @param {String} event The name of the event to emit.
|
|
112
|
-
* @param {*} data The data to emit with the event.
|
|
113
|
-
* @returns {Emitter} The emitter instance.
|
|
114
|
-
* @private
|
|
115
|
-
*/
|
|
116
|
-
emit(event: string | symbol, ...data: any[]): this;
|
|
117
|
-
emitId(event: string | symbol, id: string | symbol, ...data: any[]): this;
|
|
118
|
-
/**
|
|
119
|
-
* Creates a static event emitter that is emitted whenever an
|
|
120
|
-
* event listener is created with the same name.
|
|
121
|
-
* @param {String} event The name of the event to emit.
|
|
122
|
-
* @param {*} data The data to emit with the event.
|
|
123
|
-
* @returns {Emitter} The emitter instance.
|
|
124
|
-
*/
|
|
125
|
-
emitStatic(event: string | symbol, ...data: any[]): this;
|
|
126
|
-
/**
|
|
127
|
-
* Creates a static event emitter that is emitted whenever an
|
|
128
|
-
* event listener is created with the same name and id.
|
|
129
|
-
* @param {String} event The name of the event to emit.
|
|
130
|
-
* @param {String} id The id of the event to emit.
|
|
131
|
-
* @param {*} data The data to emit with the event.
|
|
132
|
-
* @returns {Emitter} The emitter instance.
|
|
133
|
-
*/
|
|
134
|
-
emitStaticId(event: string | symbol, id: string | symbol, ...data: any[]): this;
|
|
135
|
-
/**
|
|
136
|
-
* Handles removing emitters, is an internal method not called directly.
|
|
137
|
-
* @param {String} event The event to remove static emitter for.
|
|
138
|
-
* @returns {Emitter} The emitter instance.
|
|
139
|
-
* @private
|
|
140
|
-
*/
|
|
141
|
-
cancelStatic(event: string | symbol): this;
|
|
142
|
-
/**
|
|
143
|
-
* Checks if an event has any event listeners or not.
|
|
144
|
-
* @memberOf Emitter
|
|
145
|
-
* @method willEmit
|
|
146
|
-
* @param {String} event The name of the event to check for.
|
|
147
|
-
* @returns {boolean} True if one or more event listeners are registered for
|
|
148
|
-
* the event. False if none are found.
|
|
149
|
-
*/
|
|
150
|
-
willEmit(event: string | symbol): boolean;
|
|
151
|
-
/**
|
|
152
|
-
* Checks if an event has any event listeners or not based on the passed id.
|
|
153
|
-
* @memberOf Emitter
|
|
154
|
-
* @method willEmitId
|
|
155
|
-
* @param {String} event The name of the event to check for.
|
|
156
|
-
* @param {String} id The event ID to check for.
|
|
157
|
-
* @returns {boolean} True if one or more event listeners are registered for
|
|
158
|
-
* the event. False if none are found.
|
|
159
|
-
*/
|
|
160
|
-
willEmitId(event: string | symbol, id: string | symbol): boolean;
|
|
161
|
-
/**
|
|
162
|
-
* Queues an event to be fired. This has automatic de-bouncing so that any
|
|
163
|
-
* events of the same type that occur within 100 milliseconds of a previous
|
|
164
|
-
* one will all be wrapped into a single emit rather than emitting tons of
|
|
165
|
-
* events for the same eventName. Only the data from the last de-bounced event
|
|
166
|
-
* will be emitted.
|
|
167
|
-
* @memberOf Emitter
|
|
168
|
-
* @method deferEmit
|
|
169
|
-
* @param {String} eventName The name of the event to emit.
|
|
170
|
-
* @param {*=} data Optional data to emit with the event.
|
|
171
|
-
* @returns {Emitter} The emitter instance.
|
|
172
|
-
*/
|
|
173
|
-
deferEmit(eventName: string | symbol, ...data: any[]): this;
|
|
174
|
-
/**
|
|
175
|
-
* If events are cleared with the off() method while the event emitter is
|
|
176
|
-
* actively processing any events then the off() calls get added to a
|
|
177
|
-
* queue to be executed after the event emitter is finished. This stops
|
|
178
|
-
* errors that might occur by potentially modifying the event queue while
|
|
179
|
-
* the emitter is running through them. This method is called after the
|
|
180
|
-
* event emitter is finished processing.
|
|
181
|
-
* @private
|
|
182
|
-
* @returns {undefined}
|
|
183
|
-
*/
|
|
184
|
-
_processRemovalQueue(): void;
|
|
185
|
-
}
|
|
186
|
-
/**
|
|
187
|
-
* Makes the passed class or object into an emitter by modifying either the
|
|
188
|
-
* prototype or the actual object to include event emitter methods.
|
|
189
|
-
* @param obj The object / function / class to add event methods to.
|
|
190
|
-
* If none is provided a new object will be created. This allows you to use
|
|
191
|
-
* new Emitter() to generate an event emitter that is not tied to any other
|
|
192
|
-
* object or class.
|
|
193
|
-
* @param prototypeMode Defaults to true. Set to true to add emitter
|
|
194
|
-
* methods to the the passed object"s prototype property e.g. obj.prototype.on
|
|
195
|
-
* = emitter.on. Set to false to add emitter methods the object directly e.g.
|
|
196
|
-
* obj.on = emitter.on.
|
|
197
|
-
* @returns {Object} The newly augmented object.
|
|
198
|
-
*/
|
|
199
|
-
declare type MakeEmitter = {
|
|
200
|
-
(obj: Record<string, unknown> | boolean | undefined, prototypeMode: boolean): any;
|
|
201
|
-
(obj: boolean): any;
|
|
202
|
-
(obj: undefined): any;
|
|
203
|
-
};
|
|
204
|
-
export declare const makeEmitter: MakeEmitter;
|
|
205
|
-
export {};
|