ostrowr / ts-json-validator

Let JSON play nicely with Typescript
MIT License
342 stars 7 forks source link

fix issues when attempting to export schemas #23

Closed ostrowr closed 4 years ago

ostrowr commented 4 years ago

If this library is used in projects with declaration: true, it was impossible to export a schema.

This was because the type wasn't explicitly specified in createSchema, and it seems impossible to do so while using a unique symbol.

This fixes the import issue at the cost of using a string instead of a unique symbol. I'd prefer to use a symbol.

ostrowr commented 4 years ago

Fixes #22