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

Function isArg

ark/type/parser/string.ts:49–52  ·  view source on GitHub ↗
(name: string, ctx: BaseParseContext)

Source from the content-addressed store, hash-verified

47// infers it. Only a public alias is found first, which ark's own aren't to a
48// definition checked in it, where each is a keyword
49const isArg = (name: string, ctx: BaseParseContext): boolean =>
50 ctx.args !== undefined &&
51 hasOwn(ctx.args, name) &&
52 (ctx.$.isBuiltin || !ctx.$.exportedNames.includes(name))
53
54// a generic found this way is missing its args, as it is to parseString, even
55// if a parameter shares its name. Left to an expression, that name would

Callers 1

maybeResolveReferenceFunction · 0.85

Calls 1

hasOwnFunction · 0.90

Tested by

no test coverage detected