typescript-react-starter
typescript-react-starter copied to clipboard
全局声明的问题
请问local.d.ts中window的声明前面为什么加export ={}
我想实现扩展window的操作,并可以declare module 'xxx'的操作,放在一个xxx.d.ts文件中会报错
export = {}
declare global {
interface Window{
__REDUX_DEVTOOLS_EXTENSION_COMPOSE__: Function
}
}
declare module '*.png'; // 在import引入的时候会报错没有定义