ostrowr / ts-json-validator

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

union of enum types not strict enough for anyOf/allOf #3

Closed ostrowr closed 5 years ago

ostrowr commented 5 years ago

I want

typeof allOfConstructor({
  allOf: [
    Type.String({ enum: ["a", "b"] }),
    Type.String({ enum: ["a", "b", "c"] })
]})[InternalTypeSymbol];

to be "a" | "b", but right now it's just string

ostrowr commented 5 years ago

Fixed by #6