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

Function makeEffect

packages/effect/src/SchemaParser.ts:45–54  ·  view source on GitHub ↗
(schema: S)

Source from the content-addressed store, hash-verified

43 * @since 4.0.0
44 */
45export function makeEffect<S extends Schema.Constraint>(schema: S) {
46 const ast = schema.ast
47 let entry: CompilerRegistry.Entry | undefined
48 return (input: S["~type.make.in"], options?: Schema.MakeOptions): Effect.Effect<S["Type"], SchemaIssue.Issue> =>
49 constructEffect<S["Type"]>(
50 entry ??= CompilerRegistry.resolve(SchemaAST.toType(ast)),
51 input,
52 constructorParseOptions(options)
53 )
54}
55
56/**
57 * Creates a synchronous maker that returns `Option.some` with the constructed

Callers 1

makeOptionFunction · 0.70

Calls 3

constructEffectFunction · 0.85
constructorParseOptionsFunction · 0.85
resolveMethod · 0.80

Tested by

no test coverage detected