From b257bf13dc432cf02b9b4dafeaaf422fea2bb2f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Thu, 18 Apr 2024 11:16:34 +0200 Subject: [PATCH] fix: make parameter optional --- src/service-override/dialogs.ts | 4 ++-- src/service-override/search.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/service-override/dialogs.ts b/src/service-override/dialogs.ts index 83be7666..332297c3 100644 --- a/src/service-override/dialogs.ts +++ b/src/service-override/dialogs.ts @@ -66,10 +66,10 @@ interface DialogServiceOverrideProps { * Is an `HTMLFileSystemProvider` is used as only provider for the `file` scheme directly (without overlay) * Enable this option to enable browser file dialogs */ - useHtmlFileSystemProvider: boolean + useHtmlFileSystemProvider?: boolean } -export default function getServiceOverride ({ useHtmlFileSystemProvider }: DialogServiceOverrideProps): IEditorOverrideServices { +export default function getServiceOverride ({ useHtmlFileSystemProvider = false }: DialogServiceOverrideProps = {}): IEditorOverrideServices { return { [IDialogService.toString()]: new SyncDescriptor(DialogService, undefined, true), [IFileDialogService.toString()]: useHtmlFileSystemProvider ? new SyncDescriptor(FileDialogService, undefined, true) : new SyncDescriptor(DialogServiceOverride, undefined, true) diff --git a/src/service-override/search.ts b/src/service-override/search.ts index 423d581b..090e886c 100644 --- a/src/service-override/search.ts +++ b/src/service-override/search.ts @@ -15,10 +15,10 @@ interface SearchServiceOverrideProps { * Is an `HTMLFileSystemProvider` is used as only provider for the `file` scheme directly (without overlay) * Enable this option to enable searching local filesystem */ - useHtmlFileSystemProvider: boolean + useHtmlFileSystemProvider?: boolean } -export default function getServiceOverride ({ useHtmlFileSystemProvider }: SearchServiceOverrideProps): IEditorOverrideServices { +export default function getServiceOverride ({ useHtmlFileSystemProvider = false }: SearchServiceOverrideProps = {}): IEditorOverrideServices { return { [ISearchService.toString()]: useHtmlFileSystemProvider ? new SyncDescriptor(RemoteSearchService, [], true) : new SyncDescriptor(SearchService, [], true), [ISearchViewModelWorkbenchService.toString()]: new SyncDescriptor(SearchViewModelWorkbenchService, [], true),