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

Function isDirection

packages/effect/test/Option.test.ts:357–357  ·  view source on GitHub ↗
(s: string)

Source from the content-addressed store, hash-verified

355
356 type Direction = "asc" | "desc"
357 const isDirection = (s: string): s is Direction => s === "asc" || s === "desc"
358 assertSome(pipe("asc", Option.liftPredicate(isDirection)), "asc")
359 assertNone(pipe("foo", Option.liftPredicate(isDirection)))
360 assertSome(Option.liftPredicate("asc", isDirection), "asc")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected