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

Could not find a declaration file for module 'isomorphic-style-loader/withStyles' #178

Open
jsphkm opened this issue Mar 7, 2020 · 1 comment

Comments

@jsphkm
Copy link

jsphkm commented Mar 7, 2020

Import command leads to this message:

import withStyles from 'isomorphic-style-loader/withStyles';
Could not find a declaration file for module 'isomorphic-style-loader/withStyles'. '/Users/joseph/Code/invoicemanager/node_modules/isomorphic-style-loader/withStyles.js' implicitly has an 'any' type.
  Try `npm install @types/isomorphic-style-loader` if it exists or add a new declaration (.d.ts) file containing `declare module 'isomorphic-style-loader/withStyles';`ts(7016)
"isomorphic-style-loader": "^5.1.0"

@types/isomorphic-style-loader is not in the npm registry.

The import appears to work fine, but I want to know what I should do about this message.

@ilan-schemoul
Copy link

You create a d.ts file with "declare module 'isomorphic-style-loader/useStyles';" and you ensure your tsconfig.json has access to where you declared this d.ts file https://stackoverflow.com/questions/21247278/about-d-ts-in-typescript

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