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

Function f

packages/effect/test/Option.test.ts:130–132  ·  view source on GitHub ↗
(
      s: string | number
    )

Source from the content-addressed store, hash-verified

128
129 it("toRefinement", () => {
130 const f = (
131 s: string | number
132 ): Option.Option<string> => (typeof s === "string" ? Option.some(s) : Option.none())
133 const isString = Option.toRefinement(f)
134
135 assertTrue(isString("s"))

Callers 1

Option.test.tsFile · 0.70

Calls 4

gt2Function · 0.85
someMethod · 0.80
succeedMethod · 0.45
failMethod · 0.45

Tested by

no test coverage detected