UNPKG

@metamask/kernel-errors

Version:
1 lines 818 B
{"version":3,"file":"isMarshaledOcapError.mjs","sourceRoot":"","sources":["../../src/marshal/isMarshaledOcapError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,8BAA8B;AAE3C,OAAO,EAAE,wBAAwB,EAAE,yBAAwB;AAG3D;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAClC,KAAc;IAEd,OAAO,EAAE,CAAC,KAAK,EAAE,wBAAwB,CAAC,CAAC;AAC7C,CAAC","sourcesContent":["import { is } from '@metamask/superstruct';\n\nimport { MarshaledOcapErrorStruct } from '../constants.ts';\nimport type { MarshaledOcapError } from '../types.ts';\n\n/**\n * Checks if a value is a {@link MarshaledOcapError}.\n *\n * @param value - The value to check.\n * @returns Whether the value is a {@link MarshaledOcapError}.\n */\nexport function isMarshaledOcapError(\n value: unknown,\n): value is MarshaledOcapError {\n return is(value, MarshaledOcapErrorStruct);\n}\n"]}