Skip to content

fix: improve type map generation#25

Merged
avivkeller merged 3 commits intowebpack:mainfrom
TusharThakur04:fix/type-map
Mar 14, 2026
Merged

fix: improve type map generation#25
avivkeller merged 3 commits intowebpack:mainfrom
TusharThakur04:fix/type-map

Conversation

@TusharThakur04
Copy link
Contributor

Closes: #3

Summary
This PR improve the type map generation :

  • use getFullName() to avoid name collisions
  • filter out internal TypeDoc artifacts (__type, export=)
  • filter out Reference kind duplicates
  • clean export=/ from generated URLs

What kind of change does this PR introduce?
fix

Did you add tests for your changes?
no

Does this PR introduce a breaking change?
no

If relevant, what needs to be documented once your changes are merged or what have you already documented?

Use of AI
used ai for getting insight and discussion

@TusharThakur04
Copy link
Contributor Author

rebased

@avivkeller
Copy link
Member

@TusharThakur04 The issue isn't a matter of rebasing, the HEAD_COMMIT file needs to match the commit of webpack you generated the docs from.

Either:

  1. Update HEAD_COMMIT to match
  2. Use the current HEAD_COMMIT

@avivkeller avivkeller merged commit d87867c into webpack:main Mar 14, 2026
3 checks passed
@TusharThakur04
Copy link
Contributor Author

thanks!!

@moshams272
Copy link

Hey @avivkeller and @TusharThakur04, great work on getting this merged!

However, I wanted to point out a couple of critical URL routing bugs in this implementation that I had actually addressed in my PR (#19):

  1. Fragile .md Replacement: replace(".md", ".html") will break if a file or path has .md before the extension (e.g., utils.md5.md becomes utils.html5.md instead of utils.md5.html).
  2. Multiple Hash Fragments: TypeDoc often generates multiple hashes (e.g., path.md#methods#myMethod). Browsers fail to anchor to these properly. We need to extract only the final meaningful hash fragment.

Since my PR (#19) is now conflicted, I’d be happy to open a quick follow-up PR to patch these two routing edge cases into the new implementation.

@avivkeller
Copy link
Member

That won't happen.

That's an issue that existed before this PR, and is not a "critical routing bug". I've resolved it at the source in #26.

@avivkeller
Copy link
Member

Please refrain from pointing out "bugs" in "this implementation" that aren't part of this PR.

@moshams272
Copy link

Please refrain from pointing out "bugs" in "this implementation" that aren't part of this PR.

My apologies for the poor phrasing, I definitely didn't mean to imply that the recent PR introduced these issues, but rather that I had noticed them during my previous testing.

Good to know the .md edge case isn't applicable to our setup, and I'm glad the hash routing was already properly addressed at the source in #26, Thanks for the clarification and for your patience. 🙏🤍

@TusharThakur04 TusharThakur04 deleted the fix/type-map branch March 15, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Type Map

3 participants