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

Function getFallback

packages/effect/src/SchemaAST.ts:3572–3573  ·  view source on GitHub ↗
(type: Type)

Source from the content-addressed store, hash-verified

3570 // Non-discriminated members are grouped by runtime type once and reused by every decode.
3571 const fallbacks: { [K in Type]?: ReadonlyArray<number> } = {}
3572 const getFallback = (type: Type): ReadonlyArray<number> =>
3573 fallbacks[type] ??= Object.freeze(otherwise?.[type] ?? emptyCandidates)
3574
3575 if (onlyLiterals && literalCandidates) {
3576 literalCandidates.forEach(Object.freeze)

Callers 1

getCandidateIndexFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected