Skip to content

Typescript definition: disable allowSyntheticDefaultImports behavior #109

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

Closed
rokoroku opened this issue Sep 10, 2019 · 3 comments
Closed

Comments

@rokoroku
Copy link
Contributor

import React from "react"
       ~~~~~
// .../node_modules/@types/react/index"' can only be default-imported using the 'allowSyntheticDefaultImports' flag

Importing react-async from non-allowSyntheticDefaultImports-enabled project, the included typescript definition emits above error message.

Since the default value of the flag is not true, it'd be better turning it off I think.
microsoft/TypeScript#10895

@rokoroku rokoroku changed the title Typescript definition: disable allowSyntheticDefaultImports flag Typescript definition: disable allowSyntheticDefaultImports behavior Sep 10, 2019
@ghengeveld
Copy link
Member

I'm not familiar with this particular setting or situation, so I'm not sure how to resolve this. What do you suggest we do to fix this? Perhaps you can open a PR to fix our setup?

@rokoroku
Copy link
Contributor Author

Sure, I'll submit a simple PR :)

@rokoroku
Copy link
Contributor Author

Fixed by #112

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants