@metamask/kernel-errors
Version:
1 lines • 605 B
Source Map (JSON)
{"version":3,"file":"isOcapError.mjs","sourceRoot":"","sources":["../../src/utils/isOcapError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,yBAAwB;AAE5C;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,KAAY;IACtC,OAAO,KAAK,YAAY,SAAS,CAAC;AACpC,CAAC","sourcesContent":["import { BaseError } from '../BaseError.ts';\n\n/**\n * Type guard to check if an error is a custom Ocap error (BaseError).\n *\n * @param error - The error to check.\n * @returns `true` if the error is an instance of BaseError.\n */\nexport function isOcapError(error: Error): error is BaseError {\n return error instanceof BaseError;\n}\n"]}