generateNeverValidation()
generateNeverValidation(
varName,ctx,customTypeMessage?):object
Experimental
Generates complete validation code for a never schema. Always returns an error since no value can satisfy never.
Parameters
varName: string
The variable name to validate
ctx: GeneratorContext
The generator context
customTypeMessage?: string
Optional custom type error message
Returns: object
Generated code lines and updated context
code: string[]
ctx: GeneratorContext
Since
2.0.0