update types/node and osc-min (#1475)

This commit is contained in:
Alex Christoffer Rasmussen
2025-01-30 22:25:25 +01:00
committed by GitHub
parent fb1bbd6d5c
commit f509655d31
7 changed files with 152 additions and 193 deletions
+1 -5
View File
@@ -20,17 +20,13 @@ class OscServer implements IAdapter {
logger.info(LogOrigin.Rx, `OSC: Starting server on port ${port}`);
this.udpSocket = dgram.createSocket('udp4');
this.udpSocket.on('error', (error) => logger.error(LogOrigin.Rx, `OSC IN: ${error}`));
this.udpSocket.on('message', (buf: ArrayBuffer) => {
this.udpSocket.on('message', (buf) => {
// message should look like /ontime/{command}/{params?} {args} where
// ontime: fixed message for app
// command: command to be called
// params: used to create a nested object to patch with
// args: extra data, only used on some API entries
/**
* TODO: remove this type casting when mergend in deleration file
* https://github.com/DefinitelyTyped/DefinitelyTyped/pull/71659
*/
const msg = fromBuffer(buf);
if (msg.oscType === 'bundle') {
//TODO: manage bundles