Entry points
Find which entry point exports what, and the reference page that lists it.
This page lists Effetch's entry points and what each one exports. Each has a reference page that lists every export, with the first paragraph of its docs and a link to the guide that covers it.
The entry points
Effetch has three entry points:
| Import | What it exports | Reference |
|---|---|---|
@monarcode/effetch | The Fetch namespace: clients, calls, errors, plugins, endpoints, streams and pages | Fetch |
@monarcode/effetch/plugins | The built-in plugins: bearer, retry, timeout, logger and consoleLogger | Plugins |
@monarcode/effetch/test | The FetchTest namespace: a fake backend for tests | FetchTest |
Two more subpaths export the same members without their namespace, for the declaration files TypeScript writes. In your own code, import from the entry points above, as Installation explains.
Every export is also documented, with an example, in the type declarations your editor shows: hover a name, or go to its definition.
Types for your own functions
To wrap the client in a function of your own, type it with the option and
result types under Calls, such as
Fetch.RequestOptions and Fetch.CallEffect. CallEffect types a function
that returns a call. To take a call as an argument, accept any
Effect.Effect<A, E, R>.
What's next
- Compatibility: the Effect versions, runtimes and TypeScript settings Effetch supports.
- Limitations: the known limits of paths, plugins and streams.