Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/samualtnorman/lib. A collection of common utilities I need. www.npmjs.com/package/@samual/lib
Something went wrong. Try again.
1234567891011121314import type { Cloneable } from ".."
export const MainToChildMessageKind = { Import: 0, Call: 1 } as constexport type MainToChildMessageKind = typeof MainToChildMessageKind[keyof typeof MainToChildMessageKind]
export type MainToChildMessage = { kind: typeof MainToChildMessageKind.Import, path: string } | { kind: typeof MainToChildMessageKind.Call, id: number, path: string, name: string, args: Cloneable[] }
// TODO Can be exanded to `yield` in the futureexport const ChildToMainMessageKind = { Return: 0, Throw: 1 } as constexport type ChildToMainMessageKind = typeof ChildToMainMessageKind[keyof typeof ChildToMainMessageKind]export type ChildToMainMessage = { kind: ChildToMainMessageKind, id: number, value: Cloneable }