Whether error is a WebSignError, optionally with one of codes. Narrows error.code in TypeScript, handy in a catch (error: unknown).
error
codes
error.code
catch (error: unknown)
catch (error) { if (isWebSignError(error, "UserCancelled", "Aborted")) return; throw error;} Copy
catch (error) { if (isWebSignError(error, "UserCancelled", "Aborted")) return; throw error;}
Whether
erroris a WebSignError, optionally with one ofcodes. Narrowserror.codein TypeScript, handy in acatch (error: unknown).