Closed Crisfole closed 2 years ago
Exporting the FetcherType allows you to wrap itty-fetcher more easily:
export function api(args: Args): FetcherType { return fetcher({ ...args, base: args.base.replace("/dev", "/prod"), }); }
That's a terrible example, but the core need is reasonable, especially if you're using other functions that expect to receive the FetcherType as a param (which I assume is going to be all over the place).
Looks good to me! Good suggestion! :)
Exporting the FetcherType allows you to wrap itty-fetcher more easily:
That's a terrible example, but the core need is reasonable, especially if you're using other functions that expect to receive the FetcherType as a param (which I assume is going to be all over the place).