Skip to content
Functionerrorsv0.13.0

isSeedcordError

Determines whether an unknown value is a Seedcord error, with optional narrowing by class and error code.

isSeedcordError<Type, Code>(
    error: unknown,
    type?: Type,
    code?: Code
): error is ErrorCodeFilter<Type, Code>

error

error: unknown

The value to inspect.

type?

type?: Type

Optional error class discriminator.