tdegrunt / jsonschema

JSON Schema validation
Other
1.83k stars 262 forks source link

CustomProperty validate function type should allow for returning 'undefined' or 'void' #343

Open noisypants opened 3 years ago

noisypants commented 3 years ago

Hello. I'm trying to use CustomProperty in a typescript application. The index.d.ts file seems to be missing undefined or null from the return type of the validator function? Makes it difficult to write a custom validator in typescript without that, as it keeps complaining that the function i write can't be assigned to a CustomProperty.

I am going to see if i can workaround this issue in the meantime. maybe through disabling a lint config?

image

Thanks.