@@ -16,9 +16,12 @@ declare global {
const $message: MessageApiInjection;
const $dialog: DialogApiInjection;
const _hmt: string[][];
+ // 这样定义才能 window._hmt ; 和下面的 interface window 一样
+ // eslint-disable-next-line no-var
+ // var _hmt: string[][];
interface Window {
- nodeRequire: (path: string) => any;
+ nodeRequire: typeof require;
}