一些生命:
global.d.ts
扩展module,当module不支持typescript声明的时候
扩展window
扩展react的HTMLAttributes对象
/* eslint-disable @typescript-eslint/no-unused-vars */
declare module '*.pdf';
declare module '*.svg';
declare module '*.module.scss';
interface Window {
connection?: any;
debugMode?: any;
}
namespace React {
interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> {
// extends React's HTMLAttributes
name?: string;
xs?: any;
sm?: any;
md?: any;
lg?: any;
}
}