我正在尝试从 react-materialize 导入组件 -
import {Navbar, NavItem} from 'react-materialize';
但是当 webpack 编译我时,.tsx
它会为上述内容引发错误 -
ERROR in ./src/common/navbar.tsx
(3,31): error TS7016: Could not find a declaration file for module 'react-materi
alize'. 'D:\Private\Works\Typescript\QuickReact\node_modules\react-materialize\l
ib\index.js' implicitly has an 'any' type.
有什么解决办法吗?我不确定如何解决此导入语句以与ts-loader
webpack 一起使用。
该index.js
react-Materialise的长相很喜欢这一点。但是如何在我自己的文件中为module导入解决这个问题?
https://github.com/react-materialize/react-materialize/blob/master/src/index.js