From 0ff3476987908241535a7750f3f3e275f2bfdec6 Mon Sep 17 00:00:00 2001 From: hulkrelax <104332602+hulkrelax@users.noreply.github.com> Date: Tue, 28 Jun 2022 20:12:44 -0500 Subject: [PATCH] bugfix: Fix issue with incorrect typing on fetchNoCors (#7) * make fetchNoCors have similar typing to fetch * request param should be optional --- src/plugin.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugin.tsx b/src/plugin.tsx index 21f156b..844586c 100644 --- a/src/plugin.tsx +++ b/src/plugin.tsx @@ -29,7 +29,7 @@ export interface ServerAPI { routerHook: RouterHook; callPluginMethod(methodName: string, args: TArgs): Promise>; callServerMethod(methodName: string, args: TArgs): Promise>; - fetchNoCors(url: string, request: RequestInfo): Promise>; + fetchNoCors(url: RequestInfo, request?: RequestInit): Promise>; executeInTab(tab: string, runAsync: boolean, code: string): Promise; injectCssIntoTab(tab: string, style: string): Promise>; removeCssFromTab(tab: string, cssId: string): Promise;