mirror of
https://github.com/jwetzell/osc-js.git
synced 2026-09-03 21:28:59 +00:00
add type to messageToBuffer
This commit is contained in:
+1
-1
@@ -131,7 +131,7 @@ function argsToBuffer(args: OSCArg[]) {
|
|||||||
return Buffer.concat(argBuffers);
|
return Buffer.concat(argBuffers);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function messageToBuffer(message: OSCMessage) {
|
export function messageToBuffer(message: OSCMessage): Buffer {
|
||||||
const addressBuffer = oscTypeConverterMap.s.toBuffer(message.address);
|
const addressBuffer = oscTypeConverterMap.s.toBuffer(message.address);
|
||||||
if (addressBuffer === undefined) {
|
if (addressBuffer === undefined) {
|
||||||
throw new Error('problem encoding address');
|
throw new Error('problem encoding address');
|
||||||
|
|||||||
Reference in New Issue
Block a user