mafintosh / is-my-json-valid

A JSONSchema validator that uses code generation to be extremely fast
MIT License
965 stars 111 forks source link

Add toJSON to TypeScript typings #166

Closed LinusU closed 6 years ago

LinusU commented 6 years ago

Adds the toJSON function to the TypeScript typings which just returns the type of the schema.

Also refactors the typings to have an explicit type for a Validator and Filter, just made typing things out a bit easier.

LinusU commented 6 years ago

Made a lot of refactoring to the typings, and I think that they are much easier to read and understand now 🙌

Huge thanks to @andy-ms who helped me out a ton here Microsoft/TypeScript#26332 ❤️

The easiest way to review is per commit, would love some 👀 on this @cstruct ❤️