mirror of
https://github.com/prymitive/karma
synced 2026-05-07 03:26:52 +00:00
fix(ui): fix typescript errors
This commit is contained in:
committed by
Łukasz Mierzwa
parent
02bc037fca
commit
512d271039
@@ -382,7 +382,10 @@ describe("useFetchAny", () => {
|
||||
});
|
||||
return "ok";
|
||||
};
|
||||
const fetcher = jest.fn((_: RequestInfo) => Promise.resolve(resp));
|
||||
const fetcher = jest.fn(
|
||||
(input: RequestInfo | URL, init?: RequestInit | undefined) =>
|
||||
Promise.resolve(resp)
|
||||
);
|
||||
|
||||
const upstreams = [{ uri: "http://localhost/slow/body", options: {} }];
|
||||
const Component = () => {
|
||||
|
||||
@@ -9,7 +9,10 @@ export interface UpstreamT {
|
||||
options: RequestInit;
|
||||
}
|
||||
|
||||
export type FetchFunctionT = (request: RequestInfo) => Promise<Response>;
|
||||
export type FetchFunctionT = (
|
||||
input: RequestInfo | URL,
|
||||
init?: RequestInit | undefined
|
||||
) => Promise<Response>;
|
||||
|
||||
export interface FetchAnyOptionsT {
|
||||
fetcher?: null | FetchFunctionT;
|
||||
|
||||
@@ -6,7 +6,10 @@ import promiseRetry from "promise-retry";
|
||||
|
||||
import { CommonOptions, FetchRetryConfig } from "Common/Fetch";
|
||||
|
||||
export type FetchFunctionT = (request: RequestInfo) => Promise<Response>;
|
||||
export type FetchFunctionT = (
|
||||
input: RequestInfo | URL,
|
||||
init?: RequestInit | undefined
|
||||
) => Promise<Response>;
|
||||
|
||||
export interface FetchGetOptionsT {
|
||||
autorun?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user