It's been working great for my use cases, with one exception. I'm getting an UnknownNodeError any time there is a template literal type.
For example:
export type Products = 'Product' | 'SaaS' | 'App' | 'API' | 'Marketplace' | 'Directory'
export type APIs = 'Trigger' | 'Search' | 'Action'
export type ProductAPIs = `${Products} ${APIs}`
Generates this error:
/Users/hailee/Projects/apis.dev/node_modules/ts-json-schema-generator/dist/src/ChainNodeParser.js:41
throw new UnknownNodeError_1.UnknownNodeError(node, context.getReference());
^
UnknownNodeError: Unknown node " `${Products} ${APIs}`
at ChainNodeParser.getNodeParser (/Users/hailee/Projects/apis.dev/node_modules/ts-json-schema-generator/dist/src/ChainNodeParser.js:41:15)
at ChainNodeParser.createType (/Users/hailee/Projects/apis.dev/node_modules/ts-json-schema-generator/dist/src/ChainNodeParser.js:28:25)
at TypeAliasNodeParser.createType (/Users/hailee/Projects/apis.dev/node_modules/ts-json-schema-generator/dist/src/NodeParser/TypeAliasNodeParser.js:36:43)
at AnnotatedNodeParser.createType (/Users/hailee/Projects/apis.dev/node_modules/ts-json-schema-generator/dist/src/NodeParser/AnnotatedNodeParser.js:22:47)
at ExposeNodeParser.createType (/Users/hailee/Projects/apis.dev/node_modules/ts-json-schema-generator/dist/src/ExposeNodeParser.js:22:45)
at CircularReferenceNodeParser.createType (/Users/hailee/Projects/apis.dev/node_modules/ts-json-schema-generator/dist/src/CircularReferenceNodeParser.js:21:43)
at ChainNodeParser.createType (/Users/hailee/Projects/apis.dev/node_modules/ts-json-schema-generator/dist/src/ChainNodeParser.js:28:54)
at TopRefNodeParser.createType (/Users/hailee/Projects/apis.dev/node_modules/ts-json-schema-generator/dist/src/TopRefNodeParser.js:12:47)
at /Users/hailee/Projects/apis.dev/node_modules/ts-json-schema-generator/dist/src/SchemaGenerator.js:30:36
at Array.map (<anonymous>) {
Great library here!
It's been working great for my use cases, with one exception. I'm getting an UnknownNodeError any time there is a template literal type.
For example:
Generates this error:
Any ideas?