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

Function EncodeException

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

Source from the content-addressed store, hash-verified

30
31/** @internal */
32export const EncodeException = (input: string, message?: string): Encoding.EncodeException => {
33 const out: Mutable<Encoding.EncodeException> = {
34 _tag: "EncodeException",
35 [EncodeExceptionTypeId]: EncodeExceptionTypeId,
36 input
37 }
38 if (isString(message)) {
39 out.message = message
40 }
41 return out
42}
43
44/** @internal */
45export const isEncodeException = (u: unknown): u is Encoding.EncodeException => hasProperty(u, EncodeExceptionTypeId)

Callers

nothing calls this directly

Calls 1

isStringFunction · 0.50

Tested by

no test coverage detected