@synnaxlabs/x 0.55.0 → 0.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +10 -13
- package/dist/src/array/nullable.d.ts +1 -1
- package/dist/src/array/nullable.d.ts.map +1 -1
- package/dist/src/caseconv/caseconv.d.ts.map +1 -1
- package/dist/src/compare/compare.d.ts +14 -0
- package/dist/src/compare/compare.d.ts.map +1 -1
- package/dist/src/debounce/debounce.d.ts +7 -2
- package/dist/src/debounce/debounce.d.ts.map +1 -1
- package/dist/src/destructor/destructor.d.ts +1 -0
- package/dist/src/destructor/destructor.d.ts.map +1 -1
- package/dist/src/errors/errors.d.ts +6 -10
- package/dist/src/errors/errors.d.ts.map +1 -1
- package/dist/src/index.d.ts +4 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/notation/external.d.ts +3 -0
- package/dist/src/notation/external.d.ts.map +1 -0
- package/dist/src/notation/index.d.ts +1 -1
- package/dist/src/notation/notation.d.ts +5 -9
- package/dist/src/notation/notation.d.ts.map +1 -1
- package/dist/src/notation/types.gen.d.ts +9 -0
- package/dist/src/notation/types.gen.d.ts.map +1 -0
- package/dist/src/primitive/primitive.d.ts +16 -0
- package/dist/src/primitive/primitive.d.ts.map +1 -1
- package/dist/src/record/record.d.ts +8 -1
- package/dist/src/record/record.d.ts.map +1 -1
- package/dist/src/require/index.d.ts +2 -0
- package/dist/src/require/index.d.ts.map +1 -0
- package/dist/src/require/require.d.ts +2 -0
- package/dist/src/require/require.d.ts.map +1 -0
- package/dist/src/spatial/base.d.ts +1 -103
- package/dist/src/spatial/base.d.ts.map +1 -1
- package/dist/src/spatial/bounds/bounds.d.ts +3 -3
- package/dist/src/spatial/bounds/bounds.d.ts.map +1 -1
- package/dist/src/spatial/box/box.d.ts +7 -13
- package/dist/src/spatial/box/box.d.ts.map +1 -1
- package/dist/src/spatial/direction/direction.d.ts +17 -16
- package/dist/src/spatial/direction/direction.d.ts.map +1 -1
- package/dist/src/spatial/external.d.ts +1 -2
- package/dist/src/spatial/external.d.ts.map +1 -1
- package/dist/src/spatial/location/location.d.ts +28 -28
- package/dist/src/spatial/location/location.d.ts.map +1 -1
- package/dist/src/spatial/scale/scale.d.ts +2 -2
- package/dist/src/spatial/scale/scale.d.ts.map +1 -1
- package/dist/src/spatial/sticky/sticky.d.ts +15 -15
- package/dist/src/spatial/sticky/sticky.d.ts.map +1 -1
- package/dist/src/spatial/types.gen.d.ts +179 -2
- package/dist/src/spatial/types.gen.d.ts.map +1 -1
- package/dist/src/spatial/xy/xy.d.ts +4 -4
- package/dist/src/spatial/xy/xy.d.ts.map +1 -1
- package/dist/src/status/status.d.ts +11 -0
- package/dist/src/status/status.d.ts.map +1 -1
- package/dist/src/telem/external.d.ts +1 -0
- package/dist/src/telem/external.d.ts.map +1 -1
- package/dist/src/telem/series.d.ts +5 -2
- package/dist/src/telem/series.d.ts.map +1 -1
- package/dist/src/telem/telem.d.ts +42 -34
- package/dist/src/telem/telem.d.ts.map +1 -1
- package/dist/src/telem/types.gen.d.ts +19 -0
- package/dist/src/telem/types.gen.d.ts.map +1 -0
- package/dist/src/text/external.d.ts +3 -0
- package/dist/src/text/external.d.ts.map +1 -0
- package/dist/src/text/index.d.ts +2 -0
- package/dist/src/text/index.d.ts.map +1 -0
- package/dist/src/text/types.d.ts +21 -0
- package/dist/src/text/types.d.ts.map +1 -0
- package/dist/src/text/types.gen.d.ts +13 -0
- package/dist/src/text/types.gen.d.ts.map +1 -0
- package/dist/src/throttle/index.d.ts +2 -0
- package/dist/src/throttle/index.d.ts.map +1 -0
- package/dist/src/throttle/throttle.d.ts +3 -0
- package/dist/src/throttle/throttle.d.ts.map +1 -0
- package/dist/src/throttle/throttle.spec.d.ts +2 -0
- package/dist/src/throttle/throttle.spec.d.ts.map +1 -0
- package/dist/src/zod/parse.d.ts.map +1 -1
- package/dist/x.cjs +9 -9
- package/dist/x.js +1469 -1346
- package/package.json +11 -11
- package/src/array/nullable.ts +1 -4
- package/src/caseconv/caseconv.spec.ts +71 -0
- package/src/caseconv/caseconv.ts +15 -2
- package/src/compare/compare.spec.ts +115 -0
- package/src/compare/compare.ts +29 -0
- package/src/debounce/debounce.spec.ts +258 -24
- package/src/debounce/debounce.ts +49 -30
- package/src/deep/copy.spec.ts +13 -0
- package/src/deep/difference.ts +1 -1
- package/src/destructor/destructor.ts +2 -0
- package/src/errors/errors.spec.ts +30 -0
- package/src/errors/errors.ts +29 -17
- package/src/index.ts +4 -1
- package/src/notation/external.ts +11 -0
- package/src/notation/index.ts +1 -1
- package/src/notation/notation.spec.ts +260 -2
- package/src/notation/notation.ts +25 -7
- package/src/notation/types.gen.ts +16 -0
- package/src/primitive/primitive.spec.ts +58 -5
- package/src/primitive/primitive.ts +22 -0
- package/src/record/record.spec.ts +26 -0
- package/src/record/record.ts +20 -5
- package/src/require/index.ts +10 -0
- package/src/require/require.ts +10 -0
- package/src/spatial/base.ts +1 -93
- package/src/spatial/bounds/bounds.ts +10 -10
- package/src/spatial/box/box.ts +5 -5
- package/src/spatial/direction/direction.ts +16 -17
- package/src/spatial/external.ts +1 -2
- package/src/spatial/location/location.ts +19 -17
- package/src/spatial/scale/scale.ts +2 -2
- package/src/spatial/sticky/sticky.spec.ts +2 -2
- package/src/spatial/sticky/sticky.ts +6 -13
- package/src/spatial/types.gen.ts +140 -0
- package/src/spatial/xy/xy.ts +7 -7
- package/src/status/status.spec.ts +65 -0
- package/src/status/status.ts +20 -0
- package/src/telem/external.ts +8 -0
- package/src/telem/series.spec.ts +183 -0
- package/src/telem/series.ts +54 -16
- package/src/telem/telem.spec.ts +128 -9
- package/src/telem/telem.ts +91 -79
- package/src/telem/types.gen.ts +28 -0
- package/src/text/external.ts +11 -0
- package/src/text/index.ts +10 -0
- package/src/text/types.gen.ts +16 -0
- package/src/text/types.ts +37 -0
- package/src/{worker → throttle}/index.ts +1 -1
- package/src/throttle/throttle.spec.ts +147 -0
- package/src/throttle/throttle.ts +44 -0
- package/src/zod/parse.ts +2 -3
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/src/spatial/spatial.d.ts +0 -3
- package/dist/src/spatial/spatial.d.ts.map +0 -1
- package/dist/src/worker/index.d.ts +0 -2
- package/dist/src/worker/index.d.ts.map +0 -1
- package/dist/src/worker/worker.d.ts +0 -33
- package/dist/src/worker/worker.d.ts.map +0 -1
- package/dist/src/worker/worker.spec.d.ts +0 -2
- package/dist/src/worker/worker.spec.d.ts.map +0 -1
- package/src/spatial/spatial.ts +0 -44
- package/src/worker/worker.spec.ts +0 -41
- package/src/worker/worker.ts +0 -86
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { type Alignment, ALIGNMENTS, alignmentZ, type Bounds, boundsZ, CENTER_LOCATIONS, type CenterLocation, centerLocationZ, type ClientXY, clientXyZ, type Dimensions, dimensionsZ, type Direction, DIRECTIONS, directionZ, type Location, LOCATIONS, locationZ, type Order, ORDERS, orderZ, OUTER_LOCATIONS, type OuterLocation, outerLocationZ, type SignedDimensions, signedDimensionsZ, X_LOCATIONS, type XLocation, xLocationZ, Y_LOCATIONS, type YLocation, yLocationZ, } from './base';
|
|
2
|
-
export { type XY, xyZ } from './types.gen';
|
|
3
|
-
//# sourceMappingURL=spatial.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spatial.d.ts","sourceRoot":"","sources":["../../../src/spatial/spatial.ts"],"names":[],"mappings":"AASA,OAAO,EACL,KAAK,SAAS,EACd,UAAU,EACV,UAAU,EACV,KAAK,MAAM,EACX,OAAO,EACP,gBAAgB,EAChB,KAAK,cAAc,EACnB,eAAe,EACf,KAAK,QAAQ,EACb,SAAS,EACT,KAAK,UAAU,EACf,WAAW,EACX,KAAK,SAAS,EACd,UAAU,EACV,UAAU,EACV,KAAK,QAAQ,EACb,SAAS,EACT,SAAS,EACT,KAAK,KAAK,EACV,MAAM,EACN,MAAM,EACN,eAAe,EACf,KAAK,aAAa,EAClB,cAAc,EACd,KAAK,gBAAgB,EACrB,iBAAiB,EACjB,WAAW,EACX,KAAK,SAAS,EACd,UAAU,EACV,WAAW,EACX,KAAK,SAAS,EACd,UAAU,GACX,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/worker/index.ts"],"names":[],"mappings":"AASA,cAAc,iBAAiB,CAAC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export interface Sender<T> {
|
|
2
|
-
send: (value: T, transfer?: Transferable[]) => void;
|
|
3
|
-
}
|
|
4
|
-
export interface Handler<T> {
|
|
5
|
-
handle: (handler: (value: T) => void) => void;
|
|
6
|
-
}
|
|
7
|
-
export interface SenderHandler<I, O> extends Sender<I>, Handler<O> {
|
|
8
|
-
}
|
|
9
|
-
interface TypedWorkerMessage {
|
|
10
|
-
type: string;
|
|
11
|
-
payload: unknown;
|
|
12
|
-
}
|
|
13
|
-
type SendFunc = (value: unknown, transfer?: Transferable[]) => void;
|
|
14
|
-
type HandlerFunc = (value: unknown) => void;
|
|
15
|
-
export declare class RoutedWorker {
|
|
16
|
-
sender: SendFunc;
|
|
17
|
-
handlers: Map<string, TypedWorker<unknown>>;
|
|
18
|
-
constructor(send: SendFunc);
|
|
19
|
-
handle({ data }: {
|
|
20
|
-
data: TypedWorkerMessage;
|
|
21
|
-
}): void;
|
|
22
|
-
route<RQ, RS = RQ>(type: string): TypedWorker<RQ, RS>;
|
|
23
|
-
}
|
|
24
|
-
export declare class TypedWorker<RQ, RS = RQ> implements SenderHandler<RQ, RS> {
|
|
25
|
-
private readonly _send;
|
|
26
|
-
handler: HandlerFunc | null;
|
|
27
|
-
constructor(send: SendFunc);
|
|
28
|
-
send(payload: RQ, transfer?: Transferable[]): void;
|
|
29
|
-
handle(handler: (payload: RS) => void): void;
|
|
30
|
-
}
|
|
31
|
-
export declare const createMockWorkers: () => [RoutedWorker, RoutedWorker];
|
|
32
|
-
export {};
|
|
33
|
-
//# sourceMappingURL=worker.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../../src/worker/worker.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,MAAM,CAAC,CAAC;IACvB,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,QAAQ,CAAC,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;CACrD;AAED,MAAM,WAAW,OAAO,CAAC,CAAC;IACxB,MAAM,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,KAAK,IAAI,CAAC;CAC/C;AAED,MAAM,WAAW,aAAa,CAAC,CAAC,EAAE,CAAC,CAAE,SAAQ,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;CAAG;AAErE,UAAU,kBAAkB;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,KAAK,QAAQ,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;AACpE,KAAK,WAAW,GAAG,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;AAE5C,qBAAa,YAAY;IACvB,MAAM,EAAE,QAAQ,CAAC;IACjB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;gBAEhC,IAAI,EAAE,QAAQ;IAK1B,MAAM,CAAC,EAAE,IAAI,EAAE,EAAE;QAAE,IAAI,EAAE,kBAAkB,CAAA;KAAE,GAAG,IAAI;IAMpD,KAAK,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC,EAAE,EAAE,EAAE,CAAC;CAMtD;AAOD,qBAAa,WAAW,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,CAAE,YAAW,aAAa,CAAC,EAAE,EAAE,EAAE,CAAC;IACpE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAW;IACjC,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;gBAEhB,IAAI,EAAE,QAAQ;IAK1B,IAAI,CAAC,OAAO,EAAE,EAAE,EAAE,QAAQ,GAAE,YAAY,EAAO,GAAG,IAAI;IAItD,MAAM,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,KAAK,IAAI,GAAG,IAAI;CAG7C;AAED,eAAO,MAAM,iBAAiB,QAAO,CAAC,YAAY,EAAE,YAAY,CAY/D,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"worker.spec.d.ts","sourceRoot":"","sources":["../../../src/worker/worker.spec.ts"],"names":[],"mappings":""}
|
package/src/spatial/spatial.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
// Copyright 2026 Synnax Labs, Inc.
|
|
2
|
-
//
|
|
3
|
-
// Use of this software is governed by the Business Source License included in the file
|
|
4
|
-
// licenses/BSL.txt.
|
|
5
|
-
//
|
|
6
|
-
// As of the Change Date specified in that file, in accordance with the Business Source
|
|
7
|
-
// License, use of this software will be governed by the Apache License, Version 2.0,
|
|
8
|
-
// included in the file licenses/APL.txt.
|
|
9
|
-
|
|
10
|
-
export {
|
|
11
|
-
type Alignment,
|
|
12
|
-
ALIGNMENTS,
|
|
13
|
-
alignmentZ,
|
|
14
|
-
type Bounds,
|
|
15
|
-
boundsZ,
|
|
16
|
-
CENTER_LOCATIONS,
|
|
17
|
-
type CenterLocation,
|
|
18
|
-
centerLocationZ,
|
|
19
|
-
type ClientXY,
|
|
20
|
-
clientXyZ,
|
|
21
|
-
type Dimensions,
|
|
22
|
-
dimensionsZ,
|
|
23
|
-
type Direction,
|
|
24
|
-
DIRECTIONS,
|
|
25
|
-
directionZ,
|
|
26
|
-
type Location,
|
|
27
|
-
LOCATIONS,
|
|
28
|
-
locationZ,
|
|
29
|
-
type Order,
|
|
30
|
-
ORDERS,
|
|
31
|
-
orderZ,
|
|
32
|
-
OUTER_LOCATIONS,
|
|
33
|
-
type OuterLocation,
|
|
34
|
-
outerLocationZ,
|
|
35
|
-
type SignedDimensions,
|
|
36
|
-
signedDimensionsZ,
|
|
37
|
-
X_LOCATIONS,
|
|
38
|
-
type XLocation,
|
|
39
|
-
xLocationZ,
|
|
40
|
-
Y_LOCATIONS,
|
|
41
|
-
type YLocation,
|
|
42
|
-
yLocationZ,
|
|
43
|
-
} from "@/spatial/base";
|
|
44
|
-
export { type XY, xyZ } from "@/spatial/types.gen";
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
// Copyright 2026 Synnax Labs, Inc.
|
|
2
|
-
//
|
|
3
|
-
// Use of this software is governed by the Business Source License included in the file
|
|
4
|
-
// licenses/BSL.txt.
|
|
5
|
-
//
|
|
6
|
-
// As of the Change Date specified in that file, in accordance with the Business Source
|
|
7
|
-
// License, use of this software will be governed by the Apache License, Version 2.0,
|
|
8
|
-
// included in the file licenses/APL.txt.
|
|
9
|
-
|
|
10
|
-
import { describe, expect, it, vi } from "vitest";
|
|
11
|
-
|
|
12
|
-
import { createMockWorkers } from "@/worker/worker";
|
|
13
|
-
|
|
14
|
-
interface MockMessage {
|
|
15
|
-
value: string;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
describe("Worker", () => {
|
|
19
|
-
it("should correctly send and handle a message from a typed worker", () => {
|
|
20
|
-
const [a, b] = createMockWorkers();
|
|
21
|
-
const aT = a.route<MockMessage>("dog");
|
|
22
|
-
const bT = b.route<MockMessage>("dog");
|
|
23
|
-
const handler = vi.fn();
|
|
24
|
-
bT.handle(handler);
|
|
25
|
-
aT.send({ value: "hello" });
|
|
26
|
-
expect(handler).toHaveBeenCalledWith({ value: "hello" });
|
|
27
|
-
});
|
|
28
|
-
it("should route the message to the correct location", () => {
|
|
29
|
-
const [a, b] = createMockWorkers();
|
|
30
|
-
const aT = a.route<MockMessage>("dog");
|
|
31
|
-
const bT = b.route<MockMessage>("cat");
|
|
32
|
-
const dogBT = b.route<MockMessage>("dog");
|
|
33
|
-
const handler = vi.fn();
|
|
34
|
-
bT.handle(handler);
|
|
35
|
-
const dogHandler = vi.fn();
|
|
36
|
-
dogBT.handle(dogHandler);
|
|
37
|
-
aT.send({ value: "hello" });
|
|
38
|
-
expect(handler).not.toHaveBeenCalled();
|
|
39
|
-
expect(dogHandler).toHaveBeenCalled();
|
|
40
|
-
});
|
|
41
|
-
});
|
package/src/worker/worker.ts
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
// Copyright 2026 Synnax Labs, Inc.
|
|
2
|
-
//
|
|
3
|
-
// Use of this software is governed by the Business Source License included in the file
|
|
4
|
-
// licenses/BSL.txt.
|
|
5
|
-
//
|
|
6
|
-
// As of the Change Date specified in that file, in accordance with the Business Source
|
|
7
|
-
// License, use of this software will be governed by the Apache License, Version 2.0,
|
|
8
|
-
// included in the file licenses/APL.txt.
|
|
9
|
-
|
|
10
|
-
export interface Sender<T> {
|
|
11
|
-
send: (value: T, transfer?: Transferable[]) => void;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface Handler<T> {
|
|
15
|
-
handle: (handler: (value: T) => void) => void;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface SenderHandler<I, O> extends Sender<I>, Handler<O> {}
|
|
19
|
-
|
|
20
|
-
interface TypedWorkerMessage {
|
|
21
|
-
type: string;
|
|
22
|
-
payload: unknown;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
type SendFunc = (value: unknown, transfer?: Transferable[]) => void;
|
|
26
|
-
type HandlerFunc = (value: unknown) => void;
|
|
27
|
-
|
|
28
|
-
export class RoutedWorker {
|
|
29
|
-
sender: SendFunc;
|
|
30
|
-
handlers: Map<string, TypedWorker<unknown>>;
|
|
31
|
-
|
|
32
|
-
constructor(send: SendFunc) {
|
|
33
|
-
this.sender = send;
|
|
34
|
-
this.handlers = new Map();
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
handle({ data }: { data: TypedWorkerMessage }): void {
|
|
38
|
-
const handler = this.handlers.get(data.type)?.handler;
|
|
39
|
-
if (handler == null) console.warn(`No handler for ${data.type}`);
|
|
40
|
-
else handler(data.payload);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
route<RQ, RS = RQ>(type: string): TypedWorker<RQ, RS> {
|
|
44
|
-
const send = typedSend(type, this.sender);
|
|
45
|
-
const t = new TypedWorker<RQ, RS>(send);
|
|
46
|
-
this.handlers.set(type, t);
|
|
47
|
-
return t;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
const typedSend =
|
|
52
|
-
(type: string, send: SendFunc): SendFunc =>
|
|
53
|
-
(payload: unknown, transfer?: Transferable[]) =>
|
|
54
|
-
send({ type, payload }, transfer);
|
|
55
|
-
|
|
56
|
-
export class TypedWorker<RQ, RS = RQ> implements SenderHandler<RQ, RS> {
|
|
57
|
-
private readonly _send: SendFunc;
|
|
58
|
-
handler: HandlerFunc | null;
|
|
59
|
-
|
|
60
|
-
constructor(send: SendFunc) {
|
|
61
|
-
this._send = send;
|
|
62
|
-
this.handler = null;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
send(payload: RQ, transfer: Transferable[] = []): void {
|
|
66
|
-
this._send(payload, transfer);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
handle(handler: (payload: RS) => void): void {
|
|
70
|
-
this.handler = handler as HandlerFunc;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export const createMockWorkers = (): [RoutedWorker, RoutedWorker] => {
|
|
75
|
-
// eslint-disable-next-line
|
|
76
|
-
let a: RoutedWorker, b: RoutedWorker;
|
|
77
|
-
const aSend = (value: TypedWorkerMessage): void => {
|
|
78
|
-
b.handle({ data: value });
|
|
79
|
-
};
|
|
80
|
-
const bSend = (value: TypedWorkerMessage): void => {
|
|
81
|
-
a.handle({ data: value });
|
|
82
|
-
};
|
|
83
|
-
a = new RoutedWorker(aSend as SendFunc);
|
|
84
|
-
b = new RoutedWorker(bSend as SendFunc);
|
|
85
|
-
return [a, b];
|
|
86
|
-
};
|