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

Function runRefinement

packages/effect/src/Optic.ts:1558–1563  ·  view source on GitHub ↗
(
  refinement: (e: E) => e is T,
  annotations?: Schema.Annotations.Filter
)

Source from the content-addressed store, hash-verified

1556}
1557
1558function runRefinement<T extends E, E>(
1559 refinement: (e: E) => e is T,
1560 annotations?: Schema.Annotations.Filter
1561): (e: E) => Result.Result<T, SchemaIssue.Issue> {
1562 return (e) => SchemaAST.runChecks([SchemaAST.makeFilterByGuard(refinement, annotations)], e) as any
1563}

Callers 4

someFunction · 0.85
noneFunction · 0.85
successFunction · 0.85
failureFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected