Skip to content

Commit

Permalink
feat(serverAPI): add FilePicker
Browse files Browse the repository at this point in the history
  • Loading branch information
AAGaming00 committed Sep 9, 2022
1 parent 26017e7 commit 8eb921e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,15 @@ export interface Toaster {
toast(toast: ToastData): void;
}

export interface FilePickerRes {
path: string;
realpath: string;
}

export interface ServerAPI {
routerHook: RouterHook;
toaster: Toaster;
openFilePicker(startPath: string, includeFiles?: boolean, regex?: RegExp): Promise<FilePickerRes>
callPluginMethod<TArgs = {}, TRes = {}>(methodName: string, args: TArgs): Promise<ServerResponse<TRes>>;
callServerMethod<TArgs = {}, TRes = {}>(methodName: string, args: TArgs): Promise<ServerResponse<TRes>>;
fetchNoCors<TRes = {}>(url: RequestInfo, request?: RequestInit): Promise<ServerResponse<TRes>>;
Expand Down

0 comments on commit 8eb921e

Please sign in to comment.