2 * Make all properties in T non-readonly
4 export type Draft
<T
> = { -readonly [P
in keyof T
]?: T
[P
] }
7 * Serializable primitive JSON value.
9 export type JSONPrimitive
= number | boolean | string | null
11 * Serializable JSON value.
13 // eslint-disable-next-line no-use-before-define
14 export type JSONValue
= JSONPrimitive
| JSONArray
| JSONObject
16 * Serializable JSON object.
18 export type JSONObject
= { [k
: string]: JSONValue
}
20 * Serializable JSON array.
22 export type JSONArray
= Array<JSONValue
>
25 * Message object that is passed between worker and main worker.
27 export interface MessageValue
<Data
= unknown
> {
29 * Input data that will be passed to the worker.
39 readonly kill
?: number
43 readonly error
?: string
45 * Reference to main worker.
47 * _Only for internal use_
49 readonly parent?: MessagePort