generateMaxCheck()
generateMaxCheck(
varName,max,ctx,customMessage?):CodeGenResult
Experimental
Generates inline code for the max constraint (inclusive).
Parameters
varName: string
The variable name to check
max: number
Maximum value (inclusive)
ctx: GeneratorContext
The generator context
customMessage?: string
Optional custom error message
Returns: CodeGenResult
Generated code and updated context
Since
2.0.0