Simplify worker choosing (#138)
[poolifier.git] / src / utility-types.ts
CommitLineData
325f50bc
S
1export type Draft<T> = { -readonly [P in keyof T]?: T[P] }
2
d3c8a1a8
S
3export type JSONPrimitive = number | boolean | string | null
4// eslint-disable-next-line no-use-before-define
5export type JSONValue = JSONPrimitive | JSONArray | JSONObject
6export type JSONObject = { [k: string]: JSONValue }
7export type JSONArray = Array<JSONValue>
8
9export interface MessageValue<Data = unknown> {
325f50bc
S
10 readonly data?: Data
11 readonly id?: number
12 readonly kill?: number
13 readonly error?: string
14 readonly parent?: MessagePort
15}