MCPcopy Create free account
hub / github.com/Effect-TS/effect / encodeSymbol

Function encodeSymbol

packages/effect/src/encoding/SchemaBinary.ts:3293–3297  ·  view source on GitHub ↗
(ctx: EncodeContext, value: unknown, w: Writer)

Source from the content-addressed store, hash-verified

3291}
3292
3293function encodeSymbol(ctx: EncodeContext, value: unknown, w: Writer) {
3294 const key = globalThis.Symbol.keyFor(value as symbol)
3295 if (key === undefined) encodeFail("registered symbol", value, ctx.options)
3296 w.string(key)
3297}
3298
3299function encodeReason(ctx: EncodeContext, layout: ReasonLayout, value: unknown, w: Writer) {
3300 const reason = value as Cause.Reason<unknown>

Callers 1

encodeValueFunction · 0.85

Calls 2

encodeFailFunction · 0.85
stringMethod · 0.45

Tested by

no test coverage detected