Skip to content

Commit fa9ef7e

Browse files
committed
missing types
1 parent cdd6e39 commit fa9ef7e

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

Diff for: dist/src/services/worker/WorkerCanvas.d.ts

+4
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ export type WorkerCanvas = {
5050
update?: ((self: WorkerCanvas, canvas: WorkerCanvas['canvas'], context: WorkerCanvas['context'], input: any) => void);
5151
init?: ((self: WorkerCanvas, canvas: WorkerCanvas['canvas'], context: WorkerCanvas['context']) => void);
5252
clear?: ((self: WorkerCanvas, canvas: WorkerCanvas['canvas'], context: WorkerCanvas['context']) => void);
53+
stop: () => void;
54+
start: () => void;
55+
set: (newDrawProps: CanvasProps, transfer?: any) => void;
56+
terminate: () => void;
5357
animating: boolean;
5458
[key: string]: any;
5559
};

Diff for: package.json

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "graphscript",
3-
"version": "0.3.9",
3+
"version": "0.3.12",
44
"description": "Comprehensive acyclic-graph based application architecture with microservices and networking",
55
"main": "dist/index.js",
66
"module": "dist/index.esm.js",
@@ -22,11 +22,13 @@
2222
],
2323
"author": "Joshua Brewster",
2424
"license": "LGPL-3.0-or-later",
25-
"dependencies": {
25+
"devDependencies": {
2626
"better-sse": "~0.11.0",
2727
"brainsatplay-math": "~0.1.0",
2828
"web-worker": "~1.3.0",
29-
"ws": "~8.16.0"
29+
"ws": "~8.16.0",
30+
"@types/node": "~18.7.15",
31+
"@types/ws": "~8.5.3"
3032
},
3133
"nodemonConfig": {
3234
"env": {
@@ -36,9 +38,5 @@
3638
"dist/",
3739
".temp/"
3840
]
39-
},
40-
"devDependencies": {
41-
"@types/node": "~18.7.15",
42-
"@types/ws": "~8.5.3"
4341
}
4442
}

Diff for: src/services/worker/Worker.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ export class WorkerService extends Service {
642642
res.then((r) => {
643643
let transfer = getTransferable ? this.getTransferable(r) : undefined;
644644
if(worker instanceof Worker || worker instanceof MessagePort)
645-
worker.postMessage({args:r,callbackId},transfer)
645+
worker.postMessage({args:r,callbackId}, transfer)
646646
else if(typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope)
647647
globalThis.postMessage({args:r,callbackId},transfer);
648648
});

Diff for: src/services/worker/WorkerCanvas.ts

+4
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ export type WorkerCanvas = { //this is the object stored on the worker to track
5858
update?:((self:WorkerCanvas,canvas:WorkerCanvas['canvas'],context:WorkerCanvas['context'],input:any)=>void),
5959
init?:((self:WorkerCanvas,canvas:WorkerCanvas['canvas'],context:WorkerCanvas['context'])=>void),
6060
clear?:((self:WorkerCanvas,canvas:WorkerCanvas['canvas'],context:WorkerCanvas['context'])=>void),
61+
stop:()=>void,
62+
start:()=>void,
63+
set:(newDrawProps:CanvasProps,transfer?:any)=>void,
64+
terminate:()=>void,
6165
animating:boolean, //animation will start automatically, else you can call draw conditionally
6266
[key:string]:any //any transferrable props you want to use in your animation
6367
}

0 commit comments

Comments
 (0)