YousefED / YousefED/typescript-json-schema

uniqueNames option conflicts with `getCanonicalDeclaration`

Open
#445 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
3.3k
Forks
332
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the conflict with the uniqueNames option and the getCanonicalDeclaration check, using the ReadonlyArray error as the case to trace. Inspect how multiple declarations are handled and verify that the naming-conflict scenario no longer produces the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.