Skip to content

DefinitelyTyped largely incompatible with ES6 emit due to export syntax #2929

Closed
@alexeagle

Description

@alexeagle

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:

  1. Make a commit across all of DefinitelyTyped to update export = to export default. (assuming there is no legacy config where export default doesn't work.)
  2. Allow export = syntax all the time, emit the right thing anyway
  3. like 2. but using a compiler flag to opt-in

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions