Skip to main content

generateSymbolValidation()

generateSymbolValidation(varName, ctx, customTypeMessage?): object

Experimental

Generates complete validation code for a symbol schema.


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