【发布时间】:2019-10-30 06:58:27
【问题描述】:
Electron 打字稿定义包含以下接口:
interface MainInterface extends CommonInterface {
// I understand these
app: App;
autoUpdater: AutoUpdater;
// But not these
BrowserView: typeof BrowserView;
BrowserWindow: typeof BrowserWindow;
ClientRequest: typeof ClientRequest;
...
}
typeof XX 在这种情况下是什么意思? AFAIK typeof 返回类型的字符串名称,例如以上等价于
BrowserView: "BrowserView";
如果是这种情况,那么使用typeof的成员定义的目的是什么?
【问题讨论】:
标签: typescript electron typescript-typings .d.ts