Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jarvisjiang committed Aug 2, 2024
1 parent 6db6e6b commit 2324628
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 19 deletions.
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
| Type alias | Description |
| ------ | ------ |
| [FetchResponse](type-aliases/FetchResponse.md) | Represents the response of a fetch operation, encapsulating the result data or any error that occurred. |
| [FetchResponseType](type-aliases/FetchResponseType.md) | Specifies the expected response type of the fetch request. |

## Variables

Expand Down
20 changes: 10 additions & 10 deletions docs/functions/fetchT.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Additional options for the fetch operation, including custom `FetchInit` propert

### Defined in

[fetch.ts:14](https://github.com/JiangJie/fetch-t/blob/d90c4d8dc6d5e11996ad3e2f1da5b1c12e4b5058/src/fetch/fetch.ts#L14)
[fetch.ts:14](https://github.com/JiangJie/fetch-t/blob/6db6e6bc264d2c2e0afd8a65220e2640b742b88b/src/fetch/fetch.ts#L14)

## fetchT(url, init)

Expand Down Expand Up @@ -96,7 +96,7 @@ Additional options for the fetch operation, including custom `FetchInit` propert

### Defined in

[fetch.ts:26](https://github.com/JiangJie/fetch-t/blob/d90c4d8dc6d5e11996ad3e2f1da5b1c12e4b5058/src/fetch/fetch.ts#L26)
[fetch.ts:26](https://github.com/JiangJie/fetch-t/blob/6db6e6bc264d2c2e0afd8a65220e2640b742b88b/src/fetch/fetch.ts#L26)

## fetchT(url, init)

Expand Down Expand Up @@ -135,7 +135,7 @@ Additional options for the fetch operation, including custom `FetchInit` propert

### Defined in

[fetch.ts:38](https://github.com/JiangJie/fetch-t/blob/d90c4d8dc6d5e11996ad3e2f1da5b1c12e4b5058/src/fetch/fetch.ts#L38)
[fetch.ts:38](https://github.com/JiangJie/fetch-t/blob/6db6e6bc264d2c2e0afd8a65220e2640b742b88b/src/fetch/fetch.ts#L38)

## fetchT(url, init)

Expand Down Expand Up @@ -180,7 +180,7 @@ Additional options for the fetch operation, including custom `FetchInit` propert

### Defined in

[fetch.ts:51](https://github.com/JiangJie/fetch-t/blob/d90c4d8dc6d5e11996ad3e2f1da5b1c12e4b5058/src/fetch/fetch.ts#L51)
[fetch.ts:51](https://github.com/JiangJie/fetch-t/blob/6db6e6bc264d2c2e0afd8a65220e2640b742b88b/src/fetch/fetch.ts#L51)

## fetchT(url, init)

Expand Down Expand Up @@ -219,7 +219,7 @@ Additional options for the fetch operation, including custom `FetchInit` propert

### Defined in

[fetch.ts:63](https://github.com/JiangJie/fetch-t/blob/d90c4d8dc6d5e11996ad3e2f1da5b1c12e4b5058/src/fetch/fetch.ts#L63)
[fetch.ts:63](https://github.com/JiangJie/fetch-t/blob/6db6e6bc264d2c2e0afd8a65220e2640b742b88b/src/fetch/fetch.ts#L63)

## fetchT(url, init)

Expand Down Expand Up @@ -258,7 +258,7 @@ Additional options for the fetch operation, including custom `FetchInit` propert

### Defined in

[fetch.ts:74](https://github.com/JiangJie/fetch-t/blob/d90c4d8dc6d5e11996ad3e2f1da5b1c12e4b5058/src/fetch/fetch.ts#L74)
[fetch.ts:74](https://github.com/JiangJie/fetch-t/blob/6db6e6bc264d2c2e0afd8a65220e2640b742b88b/src/fetch/fetch.ts#L74)

## fetchT(url, init)

Expand Down Expand Up @@ -297,7 +297,7 @@ Additional options for the fetch operation, including custom `FetchInit` propert

### Defined in

[fetch.ts:85](https://github.com/JiangJie/fetch-t/blob/d90c4d8dc6d5e11996ad3e2f1da5b1c12e4b5058/src/fetch/fetch.ts#L85)
[fetch.ts:85](https://github.com/JiangJie/fetch-t/blob/6db6e6bc264d2c2e0afd8a65220e2640b742b88b/src/fetch/fetch.ts#L85)

## fetchT(url, init)

Expand Down Expand Up @@ -342,7 +342,7 @@ Additional options for the fetch operation, including custom `FetchInit` propert

### Defined in

[fetch.ts:97](https://github.com/JiangJie/fetch-t/blob/d90c4d8dc6d5e11996ad3e2f1da5b1c12e4b5058/src/fetch/fetch.ts#L97)
[fetch.ts:97](https://github.com/JiangJie/fetch-t/blob/6db6e6bc264d2c2e0afd8a65220e2640b742b88b/src/fetch/fetch.ts#L97)

## fetchT(url, init)

Expand Down Expand Up @@ -381,7 +381,7 @@ Additional options for the fetch operation, including custom `FetchInit` propert

### Defined in

[fetch.ts:108](https://github.com/JiangJie/fetch-t/blob/d90c4d8dc6d5e11996ad3e2f1da5b1c12e4b5058/src/fetch/fetch.ts#L108)
[fetch.ts:108](https://github.com/JiangJie/fetch-t/blob/6db6e6bc264d2c2e0afd8a65220e2640b742b88b/src/fetch/fetch.ts#L108)

## fetchT(url, init)

Expand Down Expand Up @@ -420,4 +420,4 @@ Additional options for the fetch operation, including custom `FetchInit` propert

### Defined in

[fetch.ts:120](https://github.com/JiangJie/fetch-t/blob/d90c4d8dc6d5e11996ad3e2f1da5b1c12e4b5058/src/fetch/fetch.ts#L120)
[fetch.ts:120](https://github.com/JiangJie/fetch-t/blob/6db6e6bc264d2c2e0afd8a65220e2640b742b88b/src/fetch/fetch.ts#L120)
6 changes: 3 additions & 3 deletions docs/interfaces/FetchInit.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ Extends the standard `RequestInit` interface from the Fetch API to include addit

| Property | Type | Description | Defined in |
| ------ | ------ | ------ | ------ |
| `abortable?` | `boolean` | Indicates whether the fetch request should be abortable. | [defines.ts:42](https://github.com/JiangJie/fetch-t/blob/d90c4d8dc6d5e11996ad3e2f1da5b1c12e4b5058/src/fetch/defines.ts#L42) |
| `responseType?` | `"text"` \| `"arraybuffer"` \| `"blob"` \| `"json"` | Specifies the expected response type of the fetch request. | [defines.ts:47](https://github.com/JiangJie/fetch-t/blob/d90c4d8dc6d5e11996ad3e2f1da5b1c12e4b5058/src/fetch/defines.ts#L47) |
| `timeout?` | `number` | Specifies the maximum time in milliseconds to wait for the fetch request to complete. | [defines.ts:52](https://github.com/JiangJie/fetch-t/blob/d90c4d8dc6d5e11996ad3e2f1da5b1c12e4b5058/src/fetch/defines.ts#L52) |
| `abortable?` | `boolean` | Indicates whether the fetch request should be abortable. | [defines.ts:47](https://github.com/JiangJie/fetch-t/blob/6db6e6bc264d2c2e0afd8a65220e2640b742b88b/src/fetch/defines.ts#L47) |
| `responseType?` | [`FetchResponseType`](../type-aliases/FetchResponseType.md) | Specifies the expected response type of the fetch request. | [defines.ts:52](https://github.com/JiangJie/fetch-t/blob/6db6e6bc264d2c2e0afd8a65220e2640b742b88b/src/fetch/defines.ts#L52) |
| `timeout?` | `number` | Specifies the maximum time in milliseconds to wait for the fetch request to complete. | [defines.ts:57](https://github.com/JiangJie/fetch-t/blob/6db6e6bc264d2c2e0afd8a65220e2640b742b88b/src/fetch/defines.ts#L57) |
6 changes: 3 additions & 3 deletions docs/interfaces/FetchTask.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Defines the structure and behavior of a fetch task, including the ability to abo

| Property | Modifier | Type | Description | Defined in |
| ------ | ------ | ------ | ------ | ------ |
| `aborted` | `readonly` | `boolean` | Indicates whether the fetch task has been aborted. | [defines.ts:27](https://github.com/JiangJie/fetch-t/blob/d90c4d8dc6d5e11996ad3e2f1da5b1c12e4b5058/src/fetch/defines.ts#L27) |
| `response` | `readonly` | [`FetchResponse`](../type-aliases/FetchResponse.md)\<`T`\> | The response of the fetch task, represented as an `AsyncResult`. | [defines.ts:32](https://github.com/JiangJie/fetch-t/blob/d90c4d8dc6d5e11996ad3e2f1da5b1c12e4b5058/src/fetch/defines.ts#L32) |
| `aborted` | `readonly` | `boolean` | Indicates whether the fetch task has been aborted. | [defines.ts:27](https://github.com/JiangJie/fetch-t/blob/6db6e6bc264d2c2e0afd8a65220e2640b742b88b/src/fetch/defines.ts#L27) |
| `response` | `readonly` | [`FetchResponse`](../type-aliases/FetchResponse.md)\<`T`\> | The response of the fetch task, represented as an `AsyncResult`. | [defines.ts:32](https://github.com/JiangJie/fetch-t/blob/6db6e6bc264d2c2e0afd8a65220e2640b742b88b/src/fetch/defines.ts#L32) |

## Methods

Expand All @@ -43,4 +43,4 @@ Aborts the fetch task, optionally with a reason for the abortion.
#### Defined in
[defines.ts:22](https://github.com/JiangJie/fetch-t/blob/d90c4d8dc6d5e11996ad3e2f1da5b1c12e4b5058/src/fetch/defines.ts#L22)
[defines.ts:22](https://github.com/JiangJie/fetch-t/blob/6db6e6bc264d2c2e0afd8a65220e2640b742b88b/src/fetch/defines.ts#L22)
2 changes: 1 addition & 1 deletion docs/type-aliases/FetchResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ Represents the response of a fetch operation, encapsulating the result data or a

## Defined in

[defines.ts:9](https://github.com/JiangJie/fetch-t/blob/d90c4d8dc6d5e11996ad3e2f1da5b1c12e4b5058/src/fetch/defines.ts#L9)
[defines.ts:9](https://github.com/JiangJie/fetch-t/blob/6db6e6bc264d2c2e0afd8a65220e2640b742b88b/src/fetch/defines.ts#L9)
17 changes: 17 additions & 0 deletions docs/type-aliases/FetchResponseType.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[**@happy-ts/fetch-t**](../README.md)**Docs**

***

[@happy-ts/fetch-t](../README.md) / FetchResponseType

# Type Alias: FetchResponseType

```ts
type FetchResponseType: "text" | "arraybuffer" | "blob" | "json";
```

Specifies the expected response type of the fetch request.

## Defined in

[defines.ts:38](https://github.com/JiangJie/fetch-t/blob/6db6e6bc264d2c2e0afd8a65220e2640b742b88b/src/fetch/defines.ts#L38)
2 changes: 1 addition & 1 deletion docs/variables/ABORT_ERROR.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ Name of abort error;

## Defined in

[defines.ts:58](https://github.com/JiangJie/fetch-t/blob/d90c4d8dc6d5e11996ad3e2f1da5b1c12e4b5058/src/fetch/defines.ts#L58)
[constants.ts:4](https://github.com/JiangJie/fetch-t/blob/6db6e6bc264d2c2e0afd8a65220e2640b742b88b/src/fetch/constants.ts#L4)
2 changes: 1 addition & 1 deletion docs/variables/TIMEOUT_ERROR.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ Name of timeout error;

## Defined in

[defines.ts:63](https://github.com/JiangJie/fetch-t/blob/d90c4d8dc6d5e11996ad3e2f1da5b1c12e4b5058/src/fetch/defines.ts#L63)
[constants.ts:9](https://github.com/JiangJie/fetch-t/blob/6db6e6bc264d2c2e0afd8a65220e2640b742b88b/src/fetch/constants.ts#L9)

0 comments on commit 2324628

Please sign in to comment.