Serialize inferred type alias when type alias symbol is not accessible#10953
Conversation
| * Check if the given symbol in given enclosing declaration is accessible and mark all associated alias to be visible if requested | ||
| * | ||
| * @param symbol a Symbol to check if accessible | ||
| * @param enclosingDeclaration a Node containing the symbol |
There was a problem hiding this comment.
a Node containing reference to the symbol?
| if (aliasesToMakeVisible) { | ||
| if (!contains(aliasesToMakeVisible, anyImportSyntax)) { | ||
| aliasesToMakeVisible.push(anyImportSyntax); | ||
| if (shouldComputeAliasToMarkVisible) { |
There was a problem hiding this comment.
This seems not completely correct. Because You wouldn't be making the alias visible yet returning that the declaration is visible. At the consumer side say result of all this is that the symbol is visible. (not the false case that you have marked) then you definitely going to get error in the .d.ts file because you should have made the alias visible for the correct emit of the declaration file but it isn't going to be emitted.
There was a problem hiding this comment.
I think I get it why it works because here you just check if this is visible but the tracking of the symbol does happen again when actually writing the symbol. Probably we need a comment here explaining that.
| } | ||
|
|
||
| function hasVisibleDeclarations(symbol: Symbol): SymbolVisibilityResult { | ||
| function hasVisibleDeclarations(symbol: Symbol, shouldComputeAliasToMarkVisible: boolean): SymbolVisibilityResult { |
|
👍 |
No description provided.