Skip to content

Commit

Permalink
refactor: add type
Browse files Browse the repository at this point in the history
  • Loading branch information
alenakhineika committed Dec 5, 2024
1 parent ad6dc3f commit 5725f88
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/views/webview-app/extension-app-message-constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { ConnectionOptions } from 'mongodb-data-service';
import type { Uri } from 'vscode';

export enum CONNECTION_STATUS {
LOADING = 'LOADING', // When the connection status has not yet been shared from the extension.
Expand Down Expand Up @@ -94,7 +95,7 @@ export interface ConnectResultsMessage extends BasicWebviewMessage {

export interface OpenFileChooserResultMessage extends BasicWebviewMessage {
command: MESSAGE_TYPES.OPEN_FILE_CHOOSER_RESULT;
files: any;
files: Uri | Uri[] | undefined;
requestId: string;
}

Expand Down
2 changes: 1 addition & 1 deletion src/views/webview-app/overview-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const OverviewPage: React.FC = () => {
message.requestId === requestId
) {
window.removeEventListener('message', messageHandler);
resolve(message.files);
resolve(message.files as T);
}
};
window.addEventListener('message', messageHandler);
Expand Down

0 comments on commit 5725f88

Please sign in to comment.