From ddf612c6cca67db4f3570076f03b469cbbf0690d Mon Sep 17 00:00:00 2001 From: mrjvs Date: Tue, 26 Dec 2023 23:13:01 +0100 Subject: [PATCH] fix fetcher on scrapecontext --- src/fetchers/types.ts | 10 +++++----- src/utils/context.ts | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/fetchers/types.ts b/src/fetchers/types.ts index 4b9cdc0..7daa5df 100644 --- a/src/fetchers/types.ts +++ b/src/fetchers/types.ts @@ -28,12 +28,12 @@ export type FetcherResponse = { }; // This is the version that will be inputted by library users -export type Fetcher = { - (url: string, ops: DefaultedFetcherOptions): Promise>; +export type Fetcher = { + (url: string, ops: DefaultedFetcherOptions): Promise>; }; // This is the version that scrapers will be interacting with -export type UseableFetcher = { - (url: string, ops?: FetcherOptions): Promise; - full: (url: string, ops?: FetcherOptions) => Promise>; +export type UseableFetcher = { + (url: string, ops?: FetcherOptions): Promise; + full: (url: string, ops?: FetcherOptions) => Promise>; }; diff --git a/src/utils/context.ts b/src/utils/context.ts index 36cd151..6f16bca 100644 --- a/src/utils/context.ts +++ b/src/utils/context.ts @@ -2,8 +2,8 @@ import { MovieMedia, ShowMedia } from '@/entrypoint/utils/media'; import { UseableFetcher } from '@/fetchers/types'; export type ScrapeContext = { - proxiedFetcher: (...params: Parameters>) => ReturnType>; - fetcher: (...params: Parameters>) => ReturnType>; + proxiedFetcher: UseableFetcher; + fetcher: UseableFetcher; progress(val: number): void; };