Skip to main content

generateAnyValidation()

generateAnyValidation(_varName, ctx): object

Experimental

Generates validation code for an any type. Any type accepts all values, so no validation is performed.


Parametersโ€‹

_varName: stringโ€‹

The variable name (unused, any accepts everything)

ctx: GeneratorContextโ€‹

The generator context


Returns: objectโ€‹

Generated code (empty) and updated context

code: string[]โ€‹

ctx: GeneratorContextโ€‹


Sinceโ€‹

2.0.0


Exampleโ€‹

const result = generateAnyValidation("value", ctx);
// result.code = [] (no validation needed)