MCPcopy Create free account
hub / github.com/effect-app/libs / makeGuard

Function makeGuard

repos/effect/packages/effect/src/SchemaAST.ts:77–79  ·  view source on GitHub ↗
(tag: T)

Source from the content-addressed store, hash-verified

75function makeGuard<T extends AST["_tag"]>(tag: T) {
76 return (ast: AST): ast is Extract<AST, { _tag: T }> => ast._tag === tag
77}
78
79/**
80 * Returns `true` if the value is an {@link AST} node (any variant).
81 *
82 * **Details**

Callers 1

SchemaAST.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…