Write more documentation

This commit is contained in:
mrjvs
2023-12-29 16:59:30 +01:00
parent 8904e87b7e
commit 8ac11d9067
11 changed files with 199 additions and 29 deletions

View File

@@ -1,6 +1,6 @@
# `makeStandardFetcher`
Make a fetcher from a `fetch()` API. It is used for making a instance of providers with `makeProviders()`.
Make a fetcher from a `fetch()` API. It is used for making a instance of provider controls.
## Example
@@ -8,13 +8,13 @@ Make a fetcher from a `fetch()` API. It is used for making a instance of provide
import { targets, makeProviders, makeDefaultFetcher } from "@movie-web/providers";
const providers = makeProviders({
fetcher: makeDefaultFetcher(fetch),
target: targets.NATIVE,
fetcher: makeStandardFetcher(fetch),
target: targets.ANY,
});
```
## Type
```ts
function makeDefaultFetcher(fetchApi: typeof fetch): Fetcher;
function makeStandardFetcher(fetchApi: typeof fetch): Fetcher;
```