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

Function guard

packages/effect/src/SchemaParser.ts:179–182  ·  view source on GitHub ↗
(input: I)

Source from the content-addressed store, hash-verified

177export function _is<T>(ast: SchemaAST.AST) {
178 const typeAST = SchemaAST.toType(ast)
179 let guard: <I>(input: I) => input is I & T = <I>(input: I): input is I & T => {
180 guard = makeIs<T>(typeAST)
181 return guard(input)
182 }
183 return <I>(input: I): input is I & T => {
184 return guard(input)
185 }

Callers 4

makeIsFunction · 0.70
_isFunction · 0.70
guardCaseFunction · 0.50

Calls 1

makeIsFunction · 0.85

Tested by

no test coverage detected