typescript-json-schema
typescript-json-schema copied to clipboard
uniqueNames option conflicts with `getCanonicalDeclaration`
I've been using this module quite successfully for a long time. I finally hit an issue with some naming conflicts and was very happy to discover the uniqueNames option. However when I turn this on, I am getting issues that I didn't have before with a getCanonicalDeclaration checks, for example: Symbol "ReadonlyArray" has no valueDeclaration and 5 declarations
Anyone experience this and solve it?
Tried moving over to https://github.com/vega/ts-json-schema-generator but that seems to have other issues that are dealbreakers.
While the issue described above still remains, just in case someone in a similar situation stumbles across this, I was able to resolve my problems with naming conflicts by using an undocumented option and passing an array of specific files to include into the buildGenerator() function. This avoided the duplicate symbol names and sped up my build time a ton!
For example: TJS.buildGenerator(program, options, arrayOfFileNames)