Skip to content

Fix #8507: Consider UnknownSymbols values for import/export purposes#8509

Merged
mhegazy merged 2 commits into
masterfrom
Fix8507
May 12, 2016
Merged

Fix #8507: Consider UnknownSymbols values for import/export purposes#8509
mhegazy merged 2 commits into
masterfrom
Fix8507

Conversation

@mhegazy
Copy link
Copy Markdown
Contributor

@mhegazy mhegazy commented May 7, 2016

Fixes #8507

This is important for JS files. regardless if we found the module or not, we should be always emitting the import/export to grantee valid transpilation. Also note that this is the same behavior for --isolatedModules, and it is currently an error case anyways, so there should not be any breaks from changing this behavior to working code.

@mhegazy
Copy link
Copy Markdown
Contributor Author

mhegazy commented May 7, 2016

//cc: @vladima

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'SomeNonExistingName'.
~~~~~~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'SomeNonExistingName'.
Copy link
Copy Markdown
Contributor

@vladima vladima May 7, 2016

Choose a reason for hiding this comment

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

extra cannot find name 'name' errors look annoying and not very useful, can we do something to suppress them?
this is related to pretty much all changes in error baselines

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@vladima, i removed the older Cannot find name error, as it was generated during declaration emit, and was not really needed. the new one however, is produced as we now call checkExpression to make sure we mark the identifier. i do not think there is an easy way to do that, unless we wire in a flag into checkExpression functions to not report errors. i do not think it is worth the complexity though.

@mhegazy
Copy link
Copy Markdown
Contributor Author

mhegazy commented May 10, 2016

@vladima any more comments?

@mhegazy mhegazy merged commit 977a7ec into master May 12, 2016
@mhegazy mhegazy deleted the Fix8507 branch May 12, 2016 18:03
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 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.

3 participants