You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following object type checks correctly with TypeScript. However, it does not validate against the JSON schema. This is because B uses an allOf where each branch has additionalProperties: false (i.e., it fails the first branch).
constfoobar:B={a: 'foo'};
I believe ts2json should be consolidating these definitions together. Note: Switching allOf to anyOf doesn't yield a correct schema either ({b: 'foo'} correctly validates for instance).
The text was updated successfully, but these errors were encountered:
generates
The following object type checks correctly with TypeScript. However, it does not validate against the JSON schema. This is because
B
uses anallOf
where each branch hasadditionalProperties: false
(i.e., it fails the first branch).I believe ts2json should be consolidating these definitions together. Note: Switching
allOf
toanyOf
doesn't yield a correct schema either ({b: 'foo'}
correctly validates for instance).The text was updated successfully, but these errors were encountered: