import { type MessagePortLike } from "https://deno.land/x/enzastdlib@v0.0.4/rpc-messageport/mod.ts";
Represents a simplified interface of the JavaScript runtime's MessagePort
class.
Only the APIs required by this module are specified. Since some runtime APIs have
similar APIs for listening and posting messages but do not have a complete one-to-one
API for extraneous things like a .close
method. ex. BroadcastChannel
vs MessagePort
vs Worker
.
Properties
readonly
postMessage: ((message: any, transfer?: Transferable) => void) | ((message: any, options?: StructuredSerializeOptions) => void)