Aller au contenu principal

generateMaxKeysCheck()

generateMaxKeysCheck(objectVar, maxKeys, ctx, customMessage?): CodeGenResult

Experimental

Generates code to check maximum number of keys.


Parameters

objectVar: string

The variable name of the object

maxKeys: number

Maximum number of keys allowed

ctx: GeneratorContext

The generator context

customMessage?: string

Optional custom error message


Returns: CodeGenResult

Generated code and updated context


Since

2.0.0