Skip to Content
Reference

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:

ImportWhat it exportsReference
@monarcode/effetchThe Fetch namespace: clients, calls, errors, plugins, endpoints, streams and pagesFetch
@monarcode/effetch/pluginsThe built-in plugins: bearer, retry, timeout, logger and consoleLoggerPlugins
@monarcode/effetch/testThe FetchTest namespace: a fake backend for testsFetchTest

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.

On this page