DefinitelyTyped/types/html-validator
David Dooling 532abbb85d [html-validator] improve response message typings (#39356)
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.
2019-10-28 07:42:16 -07:00
..
html-validator-tests.ts
index.d.ts
tsconfig.json
tslint.json