Skip to content
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

Typescript compiler fails when using react css themr with error Default export of the module has or is using private name 'TReactCSSThemrTheme' #73

Open
sahilgupta202 opened this issue Aug 15, 2017 · 3 comments

Comments

@sahilgupta202
Copy link

Typescript Version : 2.4.2
React CSS Themr: 2.1.2

Replication Steps

  1. Create a component that uses themr.
    themr('Identifier')(ComponentName);
  2. Run the Typescript compiler

It will throw the following error
error TS4082: Default export of the module has or is using private name 'TReactCSSThemrTheme'.
error TS4082: Default export of the module has or is using private name 'ThemedComponentClass'.

@belohlavek
Copy link

Quick fix: just import it ;)

@sahilgupta202
Copy link
Author

Yes @belohlavek we used that, but that is not a good solution because TS Lint will fail as we are not using them and those will be unsed imports. Also, importing is private member of a library is never good as it may change in future updates.

@trusktr
Copy link

trusktr commented Dec 21, 2019

I've opened a request to fix issues like these in TypeScript by bringing declaration files to parity with language features. microsoft/TypeScript#35822

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

3 participants