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

Function _is

packages/effect/src/SchemaParser.ts:177–186  ·  view source on GitHub ↗
(ast: SchemaAST.AST)

Source from the content-addressed store, hash-verified

175
176/** @internal */
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 }
186}
187
188/** @internal */
189export function _issue<T>(ast: SchemaAST.AST) {

Callers 1

isFunction · 0.85

Calls 1

guardFunction · 0.70

Tested by

no test coverage detected