ts-json-schema-generator icon indicating copy to clipboard operation
ts-json-schema-generator copied to clipboard

feat: Add support for computed types on literals

Open sean9keenan opened this issue 3 years ago • 0 comments

This mirrors https://github.com/vega/ts-json-schema-generator/pull/746 in that it also adds support for computed types, however in this case it adds support for typescript types defined with the Type keyword vs Interface.

Before this change the newly added tests would fail because all of the keys would evaluate to __computed which is an internal Typescript value.

Since Type types use the TypeLiteralNodeParser parser under-the-hood, this updates that parser.

(This also eliminates an any cast)

sean9keenan avatar Oct 11 '22 05:10 sean9keenan