MCPcopy Create free account
hub / github.com/arktypeio/arktype / is

Function is

ark/schema/node.ts:1260–1262  ·  view source on GitHub ↗

whether it's a node of `kind`, narrowing it to that kind's node

(kind: kind)

Source from the content-addressed store, hash-verified

1258
1259 /** whether it's a node of `kind`, narrowing it to that kind's node */
1260 is<kind extends NodeKind>(kind: kind): this is nodeOfKind<kind> {
1261 return this.kind === (kind as never)
1262 }
1263
1264 /** it as a node of `kind`, or a thrown error if it's another kind */
1265 assertIs<kind extends NodeKind>(kind: kind): nodeOfKind<kind> {

Callers 1

checkInputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected