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.
Default
false
OptionalfunctionName?: string
Configure the name of the generated check function
Default
"check"
OptionalstripTypes?: boolean
Whether 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.