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

Function writeArgCountMessage

ark/schema/generic.ts:400–407  ·  view source on GitHub ↗
(
	name: string,
	params: array<string>,
	args: array<string>
)

Source from the content-addressed store, hash-verified

398// as arktype's writeInvalidGenericArgCountMessage writes it for an
399// instantiation in a string, like box<a, b>, which is checked as it's parsed
400const writeArgCountMessage = (
401 name: string,
402 params: array<string>,
403 args: array<string>
404): string =>
405 `${name}<${params.join(", ")}> requires exactly ${params.length} args (got ${
406 args.length
407 }${args.length === 0 ? "" : `: ${args.join(", ")}`})`
408
409export const writeUnclosedGenericCycleMessage = (name: string): string =>
410 `Instantiating ${name} recursed with new arguments more than ${maxOpenInstantiations} times`

Callers 1

constructorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected