mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Enhance response message typings to accurately reflect all of the types and subtypes of the messages. Peruse https://github.com/validator/validator/tree/master/src/nu/validator/messages/types to confirm the representations here are correct. Reflect that a message either has or does not have location information. Note that this implementation results in the location properties not being available on the returned messages without asserting them to the ValidationMessageLocationObject type (see the updated test). This approach is more correct and easier when using strict null checks, but makes it more cumbersome to access the location properties when your TypeScript compiler configuration has strict null checks set to false. Another option would be to do away with the concept of a separate location sub-object and just make all the location properties optional. There was recently a new major version release of the upstream project, so this seems like a good time to introduce this breaking change. Fix indentation. |
||
|---|---|---|
| .. | ||
| html-validator-tests.ts | ||
| index.d.ts | ||
| tsconfig.json | ||
| tslint.json | ||