kriasoft / isomorphic-style-loader

CSS style loader for Webpack that is optimized for isomorphic (universal) web apps.

Home Page:https://reactstarter.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

jsphkm opened this issue · comments

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.

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