Type alias NecessaryMessages<Write, Read>
NecessaryMessages<Write, Read>: {
data: MessagePort;
type: "worker-channel:change-reader";
} | {
data: MessagePort;
type: "worker-channel:change-writer";
} | {
data: Write["type"];
type: "worker-channel:close-writer";
} | {
data: Read["type"];
type: "worker-channel:close-reader";
} | {
data: boolean;
type: "worker-channel:acknowledge";
}