diff --git a/demo/nodejs/node-multiprocess-worker.js b/demo/nodejs/node-multiprocess-worker.js index ab701eb9..2ad5af08 100644 --- a/demo/nodejs/node-multiprocess-worker.js +++ b/demo/nodejs/node-multiprocess-worker.js @@ -64,8 +64,11 @@ async function main() { // on worker start first initialize message handler so we don't miss any messages process.on('message', (msg) => { + // @ts-ignore if (msg.exit && process.exit) process.exit(); // if main told worker to exit + // @ts-ignore if (msg.test && process.send) process.send({ test: true }); + // @ts-ignore if (msg.image) detect(msg.image); // if main told worker to process image log.data('Worker received message:', process.pid, msg); // generic log }); diff --git a/demo/nodejs/node-video.js b/demo/nodejs/node-video.js index 05d9bc28..41431f75 100644 --- a/demo/nodejs/node-video.js +++ b/demo/nodejs/node-video.js @@ -13,6 +13,7 @@ const spawn = require('child_process').spawn; const log = require('@vladmandic/pilogger'); +// @ts-ignore pipe2jpeg is not installed by default // eslint-disable-next-line node/no-missing-require const Pipe2Jpeg = require('pipe2jpeg'); // for NodeJS, `tfjs-node` or `tfjs-node-gpu` should be loaded before using Human diff --git a/demo/nodejs/node-webcam.js b/demo/nodejs/node-webcam.js index 490abdc2..70b1f094 100644 --- a/demo/nodejs/node-webcam.js +++ b/demo/nodejs/node-webcam.js @@ -8,6 +8,7 @@ let initial = true; // remember if this is the first run to print additional details const log = require('@vladmandic/pilogger'); +// @ts-ignore node-webcam is not installed by default // eslint-disable-next-line node/no-missing-require const nodeWebCam = require('node-webcam'); // for NodeJS, `tfjs-node` or `tfjs-node-gpu` should be loaded before using Human