Closed
Description
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:
- Make a commit across all of DefinitelyTyped to update
export =
toexport default
. (assuming there is no legacy config whereexport default
doesn't work.) - Allow
export =
syntax all the time, emit the right thing anyway - like 2. but using a compiler flag to opt-in