# isSeedcordError

`function` in `errors` · v0.2.1-next.1

<https://docs.seedcord.org/packages/errors/0.2.1-next.1/functions/is-seedcord-error>

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

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

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

Parameters.

- `error` `unknown` — The value to inspect.
- `type?` `Type` — Optional error class discriminator (Error, TypeError, or RangeError).
- `code?` `Code` — Optional [`SeedcordErrorCode`](/packages/errors/0.2.1-next.1/enums/seedcord-error-code) discriminator to narrow by code.

Returns `error is ErrorCodeFilter<Type, Code>`.
