-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f0164e6
commit 6d22c08
Showing
11 changed files
with
607 additions
and
6 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
remote_theme: mikearnaldi/just-the-docs | ||
|
||
# Enable or disable the site search | ||
search_enabled: true | ||
|
||
# Aux links for the upper right navigation | ||
aux_links: | ||
'effect-fetch on GitHub': | ||
- 'https://github.com/joshamaju/effect-fetch' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
title: Home | ||
nav_order: 1 | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
--- | ||
title: Error.ts | ||
nav_order: 1 | ||
parent: Modules | ||
--- | ||
|
||
## Error overview | ||
|
||
Added in v1.1.0 | ||
|
||
--- | ||
|
||
<h2 class="text-delta">Table of contents</h2> | ||
|
||
- [error](#error) | ||
- [DecodeError](#decodeerror) | ||
- [HttpError](#httperror) | ||
- [StatusError](#statuserror) | ||
- [StatusErrorT](#statuserrort) | ||
|
||
--- | ||
|
||
# error | ||
|
||
## DecodeError | ||
|
||
**Signature** | ||
|
||
```ts | ||
export declare const DecodeError: typeof DecodeError | ||
``` | ||
Added in v1.1.0 | ||
## HttpError | ||
**Signature** | ||
```ts | ||
export declare const HttpError: typeof HttpError | ||
``` | ||
Added in v1.1.0 | ||
## StatusError | ||
**Signature** | ||
```ts | ||
export declare const StatusError: typeof StatusError | ||
``` | ||
Added in v1.1.0 | ||
## StatusErrorT | ||
**Signature** | ||
```ts | ||
export declare const StatusErrorT: any | ||
``` | ||
Added in v1.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
--- | ||
title: Fetch.ts | ||
nav_order: 2 | ||
parent: Modules | ||
--- | ||
|
||
## Fetch overview | ||
|
||
Added in v1.0.0 | ||
|
||
--- | ||
|
||
<h2 class="text-delta">Table of contents</h2> | ||
|
||
- [constructors](#constructors) | ||
- [effect](#effect) | ||
- [fetch](#fetch) | ||
- [fetch\_](#fetch_) | ||
- [make](#make) | ||
- [model](#model) | ||
- [Fetch (interface)](#fetch-interface) | ||
- [tag](#tag) | ||
- [Fetch](#fetch-1) | ||
|
||
--- | ||
|
||
# constructors | ||
|
||
## effect | ||
|
||
Constructs a `Fetch` layer from the specified effect that produces the given platform adapter | ||
|
||
**Signature** | ||
|
||
```ts | ||
export declare const effect: <R, E>(fetch: Effect<R, E, Fetch>) => Layer<R, E, Fetch> | ||
``` | ||
Added in v1.0.0 | ||
## fetch | ||
**Signature** | ||
```ts | ||
export declare const fetch: (url: string | URL, init?: RequestInit | undefined) => Effect<Fetch, HttpError, Response> | ||
``` | ||
Added in v1.0.0 | ||
## fetch\_ | ||
Constructs a request whose response is a `Response` wrapper with the decode methods replace with their `Effect` conterparts | ||
**Signature** | ||
```ts | ||
export declare const fetch_: ( | ||
url: string | URL, | ||
init?: RequestInit | undefined | ||
) => Effect<Fetch, HttpError, HttpResponse> | ||
``` | ||
Added in v1.0.0 | ||
## make | ||
Constructs a `Fetch` layer using the given platform adapter | ||
**Signature** | ||
```ts | ||
export declare const make: (fetch: Fetch) => Layer<never, never, Fetch> | ||
``` | ||
Added in v1.0.0 | ||
# model | ||
## Fetch (interface) | ||
**Signature** | ||
```ts | ||
export interface Fetch { | ||
(url: string | URL | HttpRequest, init?: RequestInit): Effect<never, HttpError, Response> | ||
} | ||
``` | ||
|
||
Added in v1.0.0 | ||
|
||
# tag | ||
|
||
## Fetch | ||
|
||
**Signature** | ||
|
||
```ts | ||
export declare const Fetch: Tag<Fetch, Fetch> | ||
``` | ||
Added in v1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
--- | ||
title: Interceptor.ts | ||
nav_order: 3 | ||
parent: Modules | ||
--- | ||
|
||
## Interceptor overview | ||
|
||
Added in v1.0.0 | ||
|
||
--- | ||
|
||
<h2 class="text-delta">Table of contents</h2> | ||
|
||
- [combinators](#combinators) | ||
- [add](#add) | ||
- [constructors](#constructors) | ||
- [empty](#empty) | ||
- [makeAdapter](#makeadapter) | ||
- [makeFetch](#makefetch) | ||
- [of](#of) | ||
- [model](#model) | ||
- [Context (interface)](#context-interface) | ||
- [tag](#tag) | ||
- [Context](#context) | ||
|
||
--- | ||
|
||
# combinators | ||
|
||
## add | ||
|
||
**Signature** | ||
|
||
```ts | ||
export declare const add: { | ||
<T extends internal.Interceptor<any, any>>( | ||
interceptor: T | ||
): <R, E>( | ||
interceptors: internal.Interceptors<R, E> | ||
) => T extends internal.Interceptor<infer R2, infer E2> ? internal.Interceptors<R | R2, E | E2> : never | ||
<R, E, T extends internal.Interceptor<any, any>>( | ||
interceptors: internal.Interceptors<R, E>, | ||
interceptor: T | ||
): T extends internal.Interceptor<infer R2, infer E2> ? internal.Interceptors<R | R2, E | E2> : never | ||
} | ||
``` | ||
Added in v1.0.0 | ||
# constructors | ||
## empty | ||
**Signature** | ||
```ts | ||
export declare const empty: () => Interceptors<never, never> | ||
``` | ||
Added in v1.0.0 | ||
## makeAdapter | ||
Provides the given platform adapter to the interceptor `Fetch` wrapper | ||
**Signature** | ||
```ts | ||
export declare const makeAdapter: { | ||
<R, E>(interceptors: internal.Interceptors<R, E>): (fetch: Fetch) => Effect<Exclude<R, Context>, E, Fetch> | ||
<R, E>(fetch: Fetch, interceptors: internal.Interceptors<R, E>): Effect<Exclude<R, Context>, E, Fetch> | ||
} | ||
``` | ||
Added in v1.0.0 | ||
## makeFetch | ||
Creates the intercepting wrapper around the provided platform adapter | ||
**Signature** | ||
```ts | ||
export declare const makeFetch: <R, E>( | ||
interceptors: internal.Interceptors<R, E> | ||
) => Effect<Exclude<R, Context> | Fetch, E, Fetch> | ||
``` | ||
Added in v1.0.0 | ||
## of | ||
**Signature** | ||
```ts | ||
export declare const of: <R, E>(interceptor: internal.Interceptor<R, E>) => internal.Interceptors<R, E> | ||
``` | ||
Added in v1.2.0 | ||
# model | ||
## Context (interface) | ||
**Signature** | ||
```ts | ||
export interface Context extends internal.Context {} | ||
``` | ||
|
||
Added in v1.0.0 | ||
|
||
# tag | ||
|
||
## Context | ||
|
||
**Signature** | ||
|
||
```ts | ||
export declare const Context: Tag<internal.Context, internal.Context> | ||
``` | ||
Added in v1.0.0 |
Oops, something went wrong.