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

Method refine

packages/effect/src/Optic.ts:1021–1023  ·  view source on GitHub ↗
(refinement: (a: A) => a is B, annotations?: Schema.Annotations.Filter)

Source from the content-addressed store, hash-verified

1019 return make(compose(this.node, [new CheckNode(checks)]))
1020 }
1021 refine<B extends A>(refinement: (a: A) => a is B, annotations?: Schema.Annotations.Filter): any {
1022 return make(compose(this.node, [new CheckNode([SchemaAST.makeFilterByGuard(refinement, annotations)])]))
1023 }
1024 tag(tag: string): any {
1025 const err = Result.fail(new SchemaIssue.InvalidValue({ expected: `${JSON.stringify(tag)} tag` }))
1026 return make(

Callers 1

notUndefinedMethod · 0.95

Calls 2

makeFunction · 0.70
composeFunction · 0.70

Tested by

no test coverage detected