Skip to content

Conversation

@YuichiNukiyama
Copy link
Contributor

@YuichiNukiyama YuichiNukiyama commented Sep 24, 2016

Fixes #11092

@YuichiNukiyama
Copy link
Contributor Author

ping @DanielRosenwasser

else if (source.symbol && source.flags & TypeFlags.ObjectType && globalObjectType === source) {
reportError(Diagnostics.The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead);
}
else if (source.symbol && source.flags & TypeFlags.ObjectType && globalObjectType === source) {
Copy link
Member

Choose a reason for hiding this comment

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

Needs remerge?

export = A;
~~~~~~~~~~~
!!! error TS1063: An export assignment cannot be used in a namespace.
!!! error TS1063: A default export can only be used in an ECMAScript-style module.
Copy link
Member

Choose a reason for hiding this comment

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

This is a regression - the old error is actually more appropriate here.

@DanielRosenwasser
Copy link
Member

@YuichiNukiyama would you still be interested in fixing up the bug? I think all you'd need to do is still issue the old error message for export =, but use the new one for export default

@YuichiNukiyama
Copy link
Contributor Author

YuichiNukiyama commented Nov 19, 2016

@DanielRosenwasser Sorry for the delay. How is this?

@DanielRosenwasser
Copy link
Member

Looks good! However, it looks like you've added a test from one of your older PRs (assigningFromObjecToAnythingElse). If you delete that I think we can pull this change in.

@DanielRosenwasser
Copy link
Member

@YuichiNukiyama assigningFromObjecToAnythingElse.errors.txt is still there

@DanielRosenwasser
Copy link
Member

DanielRosenwasser commented Nov 25, 2016

assigningFromObjecToAnythingElse.ts should still be removed and I would think asiPublicPrivateProtected.ts should be restored.

@YuichiNukiyama
Copy link
Contributor Author

@DanielRosenwasser fix it.

@mhegazy mhegazy closed this Dec 22, 2016
@mhegazy mhegazy reopened this Dec 22, 2016
@mhegazy mhegazy merged commit b227cf0 into microsoft:master Dec 22, 2016
@YuichiNukiyama YuichiNukiyama deleted the defult_export_error_message branch December 22, 2016 21:32
@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.

5 participants