Skip to content

isRunntimeError

isRunntimeError<C>(value, code?): value is RunntimeError<C>

Defined in: packages/runntime/src/core/error.ts:40

True when value is a RunntimeError, with this code if one is given. Checks name and code, not the class, so it works even when a page loads two copies of the library.

C extends "LOAD_FAILED" | "LOAD_ABORTED" | "CHECKPOINT_MISMATCH" | "UNSUPPORTED_DEVICE" | "EXECUTION_FAILED" | "INVALID_ARGUMENT" | "RESOURCE_DISPOSED" | "NOT_INITIALIZED"

unknown

C

value is RunntimeError<C>