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

Function flip

packages/effect/src/Schema.ts:2733–2738  ·  view source on GitHub ↗
(schema: S)

Source from the content-addressed store, hash-verified

2731 */
2732export function flip<S extends Top>(schema: S): S extends flip<infer F> ? F["Rebuild"] : flip<S>
2733export function flip<S extends Top>(schema: S): flip<S> {
2734 if (isFlip$(schema)) {
2735 return schema.schema.rebuild(SchemaAST.flip(schema.ast))
2736 }
2737 return make(SchemaAST.flip(schema.ast), { [FlipTypeId]: FlipTypeId, schema })
2738}
2739
2740/**
2741 * Type-level representation returned by {@link Literal}.

Callers 1

annotateEncodedFunction · 0.70

Calls 4

isFlip$Function · 0.85
makeFunction · 0.70
rebuildMethod · 0.65
flipMethod · 0.45

Tested by

no test coverage detected