Skip to content

Commit

Permalink
Merge pull request #412 from CodinGame/make-parameter-optional
Browse files Browse the repository at this point in the history
Make parameter optional
  • Loading branch information
CGNonofr authored Apr 18, 2024
2 parents 41894a1 + b257bf1 commit 2536025
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/service-override/dialogs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/service-override/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

1 comment on commit 2536025

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.