Skip to content

Commit

Permalink
types: Explicitly state callback res types.
Browse files Browse the repository at this point in the history
  • Loading branch information
kanishk98 committed Dec 10, 2019
1 parent eb30d48 commit 7e8f028
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/renderer/js/pages/preference/add-certificate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class AddCertificate extends BaseComponent {
properties: ['openFile'],
filters: [{ name: 'crt, pem', extensions: ['crt', 'pem'] }]
};
dialog.showOpenDialog(showDialogOptions, selectedFile => {
dialog.showOpenDialog(showDialogOptions, (selectedFile: any) => {
if (selectedFile) {
this._certFile = selectedFile[0] || '';
this.validateAndAdd();
Expand Down
4 changes: 2 additions & 2 deletions app/renderer/js/pages/preference/general-section.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ class GeneralSection extends BaseSection {
filters: [{ name: 'CSS file', extensions: ['css'] }]
};

dialog.showOpenDialog(showDialogOptions, selectedFile => {
dialog.showOpenDialog(showDialogOptions, (selectedFile: any) => {
if (selectedFile) {
ConfigUtil.setConfigItem('customCSS', selectedFile[0]);
ipcRenderer.send('forward-message', 'hard-reload');
Expand Down Expand Up @@ -443,7 +443,7 @@ class GeneralSection extends BaseSection {
properties: ['openDirectory']
};

dialog.showOpenDialog(showDialogOptions, selectedFolder => {
dialog.showOpenDialog(showDialogOptions, (selectedFolder: any) => {
if (selectedFolder) {
ConfigUtil.setConfigItem('downloadsPath', selectedFolder[0]);
const downloadFolderPath: HTMLElement = document.querySelector('.download-folder-path');
Expand Down

0 comments on commit 7e8f028

Please sign in to comment.