-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DefinitelyTyped largely incompatible with ES6 emit due to export syntax #2929
Comments
This is definitely something we've talked about a bunch in relation to the ES6 module changes. In an ideal world we don't break what exists but also help pull people forward to ES6 style modules asap. |
For now I think my only choice is to fork DefinitelyTyped and fix this in On Mon, Apr 27, 2015 at 11:13 AM Dan Quirk [email protected] wrote:
|
The restriction in the compiler is not needed for ambient modules. we should remove it. |
handled in #2935 |
👍 |
@ivogabe yes, you are correct. updating the comment. thanks! |
Fix #2929: relax the check for export= in ES6 if it is resulting from an ambient declaration
DefinitelyTyped is full of the old
export =
syntax. One random example I ran into:https://github.com/borisyankov/DefinitelyTyped/blob/master/selenium-webdriver/selenium-webdriver.d.ts#L4847
But when I want to emit ES6, the compiler tells me I need to update that definition file to the new
export default
syntax. That might be fine for .d.ts files I own, but it's not reasonable to expect all of DefinitelyTyped to be updated by contributors.I think one of these would be a good fix, in order:
export =
toexport default
. (assuming there is no legacy config whereexport default
doesn't work.)export =
syntax all the time, emit the right thing anywayThe text was updated successfully, but these errors were encountered: