Skip to content

Conversation

sheetalkamat
Copy link
Member

Report error if the entityname reference in the import declaration is using private module

function writeAsychronousImportDeclarations(importDeclarations: ImportDeclaration[]) {
var oldWriter = writer;
forEach(importDeclarations.sort(), aliasToWrite => {
var aliasEmitInfo = forEach(aliasDeclarationEmitInfo, declEmitInfo => declEmitInfo.declaration === aliasToWrite ? declEmitInfo : undefined);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need to sort the declarations?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to sort that because the text is patched correctly and we don't need to track partial edits. The asynchronous output could make declaration in reverse or random order to be in importDeclarations list

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure I understand, an example may be helpful :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm.. sorry I thought you were talking about the code that was patching asynchronous code. The sort is not needed here. I am updating it.

Make changes to report error if the type used from external module cannot be named
Emit Type of function and static function correctly in declaration file
sheetalkamat added a commit that referenced this pull request Aug 14, 2014
Report error if the entityname reference in the import declaration is us...
@sheetalkamat sheetalkamat merged commit 1454e33 into exportImport Aug 14, 2014
@sheetalkamat sheetalkamat deleted the inaccessibleAliasEntity branch August 14, 2014 01:52
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants