Optional
asTypeGuard?: trueOptional
canonicalizeRefName?: (ref: string) => stringcheck.Options.canonicalizeRefName
Allows users to customize how refs are translated into an identifier.
By default, the ref's last segment is taken and converted to pascal case.
Optional
functionName?: stringConfigure the name of the generated check function
Optional
stripTypes?: booleanWhether the returned predicate should be output as pure JavaScript, with no types included.
Whether the returned predicate should infer the return type from the JSON Schema input and act as a type-guard for that type.
For this to work properly, the JSON Schema you pass will need to be a TypeScript value that has been declared with the
as const
modifier, or passed as a literal value (rather than a JSON value).Note: Inferring a type guard can be expensive, so by default this is an opt-in feature.