Fixed the TypeScript type definition for Options' "format" #1163
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What issue does this pull request resolve?
According to documentation "false" is valid input for ajvOptions.format. However typescript definition only lists the type string for it, which causes an error:
"Type 'false' is not assignable to type 'string'.ts(2322)
ajv.d.ts(172, 5): The expected type comes from property 'format' which is declared here on type 'Partial'"
Existing documentation for avjOptions.format:
"format: formats validation mode. Option values:
"fast" (default) - simplified and fast validation (see Formats for details of which formats are available and affected by this option).
"full" - more restrictive and slow validation. E.g., 25:00:00 and 2015/14/33 will be invalid time and date in 'full' mode but it will be valid in 'fast' mode.
false - ignore all format keywords."
What changes did you make?
Add the false as allowed type
Is there anything that requires more attention while reviewing?
No