isBridgeError function

Module @runic-artifex/views in @runic-artifex/views 0.23.0

function isBridgeError<TKind extends BridgeErrorKind = BridgeErrorKind>(error: unknown, kind?: TKind | readonly TKind[]): error is BridgeError & {
    readonly kind: TKind;
};

True when error is a BridgeError, of kind or one of the kinds when given. Narrows error.kind, so if (isBridgeError(error, "released")) … needs no cast. Holds for an error of another copy of this package too.