You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Regression: Matched argument name and name of exported function breaks module export #11204
This is the intended behavior. this was a change in the emitted code in TS 2.0 to match the ES6 module semantics. export function my exports a declaration my, changing it does not have any impact on that. whereas export { my} exports the local binding for my. any change to the name should be witnessed by the importing module. see #8739 for more details.
Mohamed Hegazy (@mhegazy) with all due respect, you are sure that #8739 is related to this situation described? Argumentmy of function doSome1 has _no relation_ to the export module.
I think you just do not carefully studied example. And even if it is "Working as Intended" (I really doubt) - it breaks backward compatibility. At the same time, this code works fine in _1.8.10_
changed the title [-]Matched argument name and name of exported function breaks module export[/-][+]Regression: Matched argument name and name of exported function breaks module export[/+]on Sep 29, 2016
Activity
RyanCavanaugh commentedon Sep 28, 2016
Is this a regression from 1.8?
tsofist commentedon Sep 28, 2016
Ryan Cavanaugh (@RyanCavanaugh) yes, it works fine on 1.8.10
tsofist commentedon Sep 28, 2016
Note that it work well if use
instead of
mhegazy commentedon Sep 29, 2016
This is the intended behavior. this was a change in the emitted code in TS 2.0 to match the ES6 module semantics.
export function myexports a declarationmy, changing it does not have any impact on that. whereasexport { my}exports the local binding formy. any change to the name should be witnessed by the importing module. see #8739 for more details.tsofist commentedon Sep 29, 2016
Mohamed Hegazy (@mhegazy) with all due respect, you are sure that #8739 is related to this situation described?
Argument
myof functiondoSome1has _no relation_ to the export module.I think you just do not carefully studied example. And even if it is "Working as Intended" (I really doubt) - it breaks backward compatibility. At the same time, this code works fine in _1.8.10_
[-]Matched argument name and name of exported function breaks module export[/-][+]Regression: Matched argument name and name of exported function breaks module export[/+]mhegazy commentedon Sep 29, 2016
I actually did not see the function argument. my apologies. i was talking about the function name.
mhegazy commentedon Sep 29, 2016
Vladimir Matveev (@vladima) can you take a look. we need to fix this for release-2.0.5