Skip to content

Commit

Permalink
fix: use proper type
Browse files Browse the repository at this point in the history
  • Loading branch information
alenakhineika committed Dec 6, 2024
1 parent e35682c commit 34fb8a2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/views/webview-app/extension-app-message-constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { ConnectionOptions } from 'mongodb-data-service';
import type { Uri } from 'vscode';
import type { FileChooserOptions } from './use-connection-form';

export enum CONNECTION_STATUS {
Expand Down Expand Up @@ -95,11 +94,13 @@ export interface ConnectResultsMessage extends BasicWebviewMessage {
connectionId: string;
}

export type FileChooserResult =
| { canceled: false; filePaths: string[] }
| { canceled: false; filePath?: string };

export interface OpenFileChooserResultMessage extends BasicWebviewMessage {
command: MESSAGE_TYPES.OPEN_FILE_CHOOSER_RESULT;
fileChooserResult:
| { canceled: false; filePaths?: Uri[] }
| { canceled: false; filePath?: Uri };
fileChooserResult: FileChooserResult;
requestId: string;
}

Expand Down

0 comments on commit 34fb8a2

Please sign in to comment.