No esModuleInterop and allowSyntheticDefaultImports
This is a release with breaking changes. We no longer set the esModuleInterop
and allowSyntheticDefaultImports
in the default TypeScript config. These might be reasonable configurations for end-user application code, but for libraries these can be problematic. TypeScript users of such libraries must have these flags set as well for compilation to succeed. For example: googleapis/google-auth-library-nodejs#381.
There are two ways to deal with this breaking change:
- (recommended) change code using synthetic imports (
import fs from 'fs'
) back to using old style imports (import * as fs from 'fs'
). - Add
"esModuleInterop": true
to your localtsconfig.json
.
Sorry for the churn.