MCPcopy Index your code
hub / github.com/Effect-TS/effect / DecodeException

Function DecodeException

packages/effect/src/internal/encoding/common.ts:11–21  ·  view source on GitHub ↗
(input: string, message?: string)

Source from the content-addressed store, hash-verified

9
10/** @internal */
11export 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 */
24export const isDecodeException = (u: unknown): u is Encoding.DecodeException => hasProperty(u, DecodeExceptionTypeId)

Callers 3

decodeFunction · 0.70
decodeFunction · 0.70
decodeFunction · 0.70

Calls 1

isStringFunction · 0.50

Tested by

no test coverage detected