bugfix: Fix issue with incorrect typing on fetchNoCors (#7)

* make fetchNoCors have similar typing to fetch

* request param should be optional
This commit is contained in:
hulkrelax
2022-06-28 20:12:44 -05:00
committed by GitHub
parent 2c7d266c81
commit 0ff3476987

View File

@@ -29,7 +29,7 @@ export interface ServerAPI {
routerHook: RouterHook;
callPluginMethod<TArgs = {}, TRes = {}>(methodName: string, args: TArgs): Promise<ServerResponse<TRes>>;
callServerMethod<TArgs = {}, TRes = {}>(methodName: string, args: TArgs): Promise<ServerResponse<TRes>>;
fetchNoCors<TRes = {}>(url: string, request: RequestInfo): Promise<ServerResponse<TRes>>;
fetchNoCors<TRes = {}>(url: RequestInfo, request?: RequestInit): Promise<ServerResponse<TRes>>;
executeInTab(tab: string, runAsync: boolean, code: string): Promise<unknown>;
injectCssIntoTab<TRes = string>(tab: string, style: string): Promise<ServerResponse<TRes>>;
removeCssFromTab(tab: string, cssId: string): Promise<unknown>;