diff --git a/lib/internal/structured_clone.js b/lib/internal/structured_clone.js index 1d5d0ed511c9cc..2a057808d99f34 100644 --- a/lib/internal/structured_clone.js +++ b/lib/internal/structured_clone.js @@ -6,13 +6,13 @@ const { } = require('internal/worker/io'); let channel; -function structuredClone(value, transfer) { +function structuredClone(value, options) { // TODO: Improve this with a more efficient solution that avoids // instantiating a MessageChannel channel ??= new MessageChannel(); channel.port1.unref(); channel.port2.unref(); - channel.port1.postMessage(value, transfer); + channel.port1.postMessage(value, options?.transfer); return receiveMessageOnPort(channel.port2).message; }