-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get resolved module exports in symbol chain and not raw exports #20661
Conversation
That was fast! Thank you, @weswigham. ❤️ |
src/compiler/checker.ts
Outdated
@@ -2216,7 +2216,8 @@ namespace ts { | |||
|
|||
// Look in the exported members, if we can find accessibleSymbolChain, symbol is accessible using this chain | |||
// but only if the symbolFromSymbolTable can be qualified | |||
const accessibleSymbolsFromExports = resolvedImportedSymbol.exports ? getAccessibleSymbolChainFromSymbolTable(resolvedImportedSymbol.exports) : undefined; | |||
const candidateTable = getExportsOfSymbol(resolvedImportedSymbol); | |||
const accessibleSymbolsFromExports = candidateTable ? getAccessibleSymbolChainFromSymbolTable(candidateTable) : undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Good place to use &&
instead of ?:
//// [tests/cases/compiler/declarationEmitAliasExportStar.ts] //// | ||
|
||
//// [thingA.ts] | ||
export interface ThingA { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can reproduce the error without ThingA
:
a.ts
export interface I { }
b.ts
export * from "./a";
c.ts
import * as b from "./b";
export const f = (_: b.I) => {};
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes #20657