UNPKG

@metamask/kernel-errors

Version:
1 lines 791 B
{"version":3,"file":"isMarshaledOcapError.cjs","sourceRoot":"","sources":["../../src/marshal/isMarshaledOcapError.ts"],"names":[],"mappings":";;AAWA,oDAIC;AAfD,uDAA2C;AAE3C,mDAA2D;AAG3D;;;;;GAKG;AACH,SAAgB,oBAAoB,CAClC,KAAc;IAEd,OAAO,IAAA,gBAAE,EAAC,KAAK,EAAE,uCAAwB,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"]}