diff --git a/README.md b/README.md index 8a797169cf..4a988f2ed3 100644 --- a/README.md +++ b/README.md @@ -212,6 +212,12 @@ Here are the [currently requested definitions](https://github.com/DefinitelyType If types are part of a web standard, they should be contributed to [TSJS-lib-generator](https://github.com/Microsoft/TSJS-lib-generator) so that they can become part of the default `lib.dom.d.ts`. +### A package uses `export =`, but I prefer to use default imports. Can I change `export =` to `export default`? + +If default imports work in your environment, consider turning on the [`--allowSyntheticDefaultImports`](http://www.typescriptlang.org/docs/handbook/compiler-options.html) compiler option. +Do not change the type definition if it is accurate. +For an NPM package, `export =` is accurate if `node -p 'require("foo")'` is the export, and `export default` is accurate if `node -p 'require("foo").default'` is the export. + #### I want to use features from TypeScript 2.1. Then you will have to add a comment to your definition header: `// TypeScript Version: 2.1`.