(node: any, options?: Options)
| 15 | export async function orCreateContext<T extends Node>(context: Context<T>): Promise<Context<T>> |
| 16 | export async function orCreateContext<T extends Node>(node: T, options?: Options): Promise<Context<T>> |
| 17 | export async function orCreateContext(node: any, options?: Options): Promise<Context> { |
| 18 | return isContext(node) ? node : createContext(node, { ...options, autoDestruct: true }) |
| 19 | } |
| 20 | |
| 21 | export async function createContext<T extends Node>(node: T, options?: Options & { autoDestruct?: boolean }): Promise<Context<T>> { |
| 22 | const { scale = 1, workerUrl, workerNumber = 1 } = options || {} |
no test coverage detected
searching dependent graphs…