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

Function getDefaultLiteralAST

packages/effect/src/Schema.ts:679–685  ·  view source on GitHub ↗
(
  literals: Literals
)

Source from the content-addressed store, hash-verified

677}
678
679function getDefaultLiteralAST<Literals extends array_.NonEmptyReadonlyArray<AST.LiteralValue>>(
680 literals: Literals
681): AST.AST {
682 return AST.isMembers(literals)
683 ? AST.Union.make(AST.mapMembers(literals, (literal) => new AST.Literal(literal)))
684 : new AST.Literal(literals[0])
685}
686
687function makeLiteralClass<Literals extends array_.NonEmptyReadonlyArray<AST.LiteralValue>>(
688 literals: Literals,

Callers 1

makeLiteralClassFunction · 0.85

Calls 1

makeMethod · 0.65

Tested by

no test coverage detected