Fix declaration emit alias reuse for inferred exports - #3314
Conversation
|
Not sure if you have properly cloned the submodule or not, as you are missing other baseline updates that should have happened. |
|
I checked that, and you were right. My local clone had the TypeScript submodule registered but not actually initialized, so I was missing additional baseline updates that only show up once the submodule-backed tests are running against the recorded TS checkout. I initialized the submodule, ran |
|
CI is still blocked only on I tried to retrigger it from my side:
So I do not have permission to unstick it from this fork account. If someone with the right repo permissions can rerun the workflow or inspect the |
|
It's a known problem and will unblock itself eventually (otherwise I'll figure it out next week) |
Summary
serializeTypeNameby aligning itsresolveEntityNamecall with upstream alias-resolution behavior#3310reproRoot Cause
Our Go port was calling
resolveEntityNamefromserializeTypeNamewithdontResolveAlias: true, unlike upstream. That made declaration emit check accessibility on the imported alias symbol instead of the resolved export, so reused type nodes fell back to structural expansion and surfacedTS4023in theSettings/ISettingsrepro.The fix is just the upstream-aligned boolean flip in
serializeTypeName. That changes the localpackageDeduplicationDuplicateGlobals.typesbaseline and several submodule-backed compiler.typesbaselines, with some previous.difffiles becoming obsolete.Validation
npm cigit submodule update --init --recursiveGOTOOLCHAIN=auto go run ./cmd/tsgo -p tmp/issue-3310/tsconfig.jsonGOTOOLCHAIN=auto go test ./internal/execute/tsctests -run '^TestTscDeclarationEmit$'GOTOOLCHAIN=auto go test ./internal/testrunner -run '^TestLocal$/^packageDeduplicationDuplicateGlobals\\.ts$'GOTOOLCHAIN=auto go test ./...