diff --git a/src/fetchers/types.ts b/src/fetchers/types.ts index d542298..f5dbe06 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 cf7acc7..6f16bca 100644 --- a/src/utils/context.ts +++ b/src/utils/context.ts @@ -2,14 +2,8 @@ import { MovieMedia, ShowMedia } from '@/entrypoint/utils/media'; import { UseableFetcher } from '@/fetchers/types'; export type ScrapeContext = { - proxiedFetcher: { - (...params: Parameters>): ReturnType>; - full(...params: Parameters['full']>): ReturnType['full']>; - }; - fetcher: { - (...params: Parameters>): ReturnType>; - full(...params: Parameters['full']>): ReturnType['full']>; - }; + proxiedFetcher: UseableFetcher; + fetcher: UseableFetcher; progress(val: number): void; };