Function
DecodeException
(input: string, message?: string)
Source from the content-addressed store, hash-verified
| 9 | |
| 10 | /** @internal */ |
| 11 | export const DecodeException = (input: string, message?: string): Encoding.DecodeException => { |
| 12 | const out: Mutable<Encoding.DecodeException> = { |
| 13 | _tag: "DecodeException", |
| 14 | [DecodeExceptionTypeId]: DecodeExceptionTypeId, |
| 15 | input |
| 16 | } |
| 17 | if (isString(message)) { |
| 18 | out.message = message |
| 19 | } |
| 20 | return out |
| 21 | } |
| 22 | |
| 23 | /** @internal */ |
| 24 | export const isDecodeException = (u: unknown): u is Encoding.DecodeException => hasProperty(u, DecodeExceptionTypeId) |
Tested by
no test coverage detected