Skip to content

API Reference / @gtkx/runtime / ErrorDomain

Type Alias: ErrorDomain<T> ​

ErrorDomain<T> = T & object

Defined in: packages/runtime/src/error.ts:22

An error enum object carrying its member codes plus an instanceof check that matches wrapped GLib errors belonging to a specific error domain. As in GJS, its valueOf() returns the domain quark, so it converts to the quark with Number().

Type Parameters ​

T ​

T extends Record<string, number>

Type Declaration ​

[hasInstance] ​

[hasInstance]: (value) => value is ErrorLike

Backs instanceof, matching a wrapped GLib error whose domain is this one.

Parameters ​

value ​

unknown

Returns ​

value is ErrorLike