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

Function tag

packages/effect/src/Schema.ts:6284–6286  ·  view source on GitHub ↗
(literal: Tag)

Source from the content-addressed store, hash-verified

6282 * @since 3.10.0
6283 */
6284export function tag<Tag extends SchemaAST.LiteralValue>(literal: Tag): tag<Tag> {
6285 return Literal(literal).pipe(withConstructorDefault(Effect.succeed(literal)))
6286}
6287/**
6288 * Creates a literal `_tag` schema that is omitted from encoded output.
6289 *

Callers 3

tagDefaultOmitFunction · 0.70
TaggedStructFunction · 0.70
Schema.tsFile · 0.70

Calls 4

LiteralFunction · 0.70
withConstructorDefaultFunction · 0.70
pipeMethod · 0.65
succeedMethod · 0.45

Tested by

no test coverage detected