1
私は、次の機能があります。活字体:タイプ「約束<{}>は」「約束<void>」を入力する割り当てられない
let templateLoader = (onDidFinishLoad : Function, onDidFailLoad : Function) =>
(url : string) : Promise<void> =>
new Promise(
(resolve,reject) => {
mainWindow.loadURL(url);
mainWindow.webContents.once(
'did-finish-load',
() => {
onDidFinishLoad(resolve);
}
);
mainWindow.webContents.once(
'did-fail-load',
(event,errorCode,errorDescription) => {
onDidFailLoad(reject,errorDescription);
}
);
}
);
を、私は、次のコンパイルエラーを持っている:
ERROR in [at-loader] ./app/loaders.ts:9:9 TS2322: Type 'Promise {}' is not assignable to type Promise void. Type '{}' is not assignable to type 'void'.
ありがとうございます... –