Make open and save dialog options optional

Fixes #101426
This commit is contained in:
Alex Ross
2020-07-08 13:46:10 +02:00
parent 15c5d143b0
commit fda4c35b27
4 changed files with 21 additions and 21 deletions

View File

@@ -15,13 +15,13 @@ export class ExtHostDialogs {
this._proxy = mainContext.getProxy(MainContext.MainThreadDialogs);
}
showOpenDialog(options: vscode.OpenDialogOptions): Promise<URI[] | undefined> {
showOpenDialog(options?: vscode.OpenDialogOptions): Promise<URI[] | undefined> {
return this._proxy.$showOpenDialog(options).then(filepaths => {
return filepaths ? filepaths.map(p => URI.revive(p)) : undefined;
});
}
showSaveDialog(options: vscode.SaveDialogOptions): Promise<URI | undefined> {
showSaveDialog(options?: vscode.SaveDialogOptions): Promise<URI | undefined> {
return this._proxy.$showSaveDialog(options).then(filepath => {
return filepath ? URI.revive(filepath) : undefined;
});