Я пытаюсь использовать встроенную диалоговую поддержку Electron для открытия файла, и я продолжаю сталкиваться с этой проблемой машинописи, которую я не могу обойти:
[ts] Type '(folderPath: any) => void' has no properties in common with type 'OpenDialogOptions'.
Вот мой код :
import { ElectronService } from 'ngx-electron'
export class ChartOfAccountsComponent implements OnInit {
public electronDialog = new ElectronService().remote.dialog;
openImport() {
let properties: any = {
title: "Import budget",
properties: ['openDirectory']
}
this.electronDialog.showOpenDialog(properties, (folderPath) => {
if (folderPath === undefined){
console.log("You didn't select a folder");
return;
}
console.log('folderPath', folderPath);
});
}
}
Что я могу сделать, чтобы обойти это?