Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jarvisjiang committed Jul 17, 2024
1 parent e5aa635 commit 714ea94
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 35 deletions.
24 changes: 12 additions & 12 deletions docs/functions/fetchT.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ A `FetchTask` representing the operation with a `string` response.

### Defined in

[src/fetch/fetch.ts:14](https://github.com/JiangJie/fetch-t/blob/9e5c4ce034f7bf6add07f55044bccbb16a68960c/src/fetch/fetch.ts#L14)
[fetch.ts:14](https://github.com/JiangJie/fetch-t/blob/e5aa635435bb73b90ba7373357fa4cc6928da1b3/src/fetch/fetch.ts#L14)

## fetchT(url, init)

Expand All @@ -68,7 +68,7 @@ A `FetchTask` representing the operation with an `ArrayBuffer` response.

### Defined in

[src/fetch/fetch.ts:26](https://github.com/JiangJie/fetch-t/blob/9e5c4ce034f7bf6add07f55044bccbb16a68960c/src/fetch/fetch.ts#L26)
[fetch.ts:26](https://github.com/JiangJie/fetch-t/blob/e5aa635435bb73b90ba7373357fa4cc6928da1b3/src/fetch/fetch.ts#L26)

## fetchT(url, init)

Expand All @@ -93,7 +93,7 @@ A `FetchTask` representing the operation with a `Blob` response.

### Defined in

[src/fetch/fetch.ts:38](https://github.com/JiangJie/fetch-t/blob/9e5c4ce034f7bf6add07f55044bccbb16a68960c/src/fetch/fetch.ts#L38)
[fetch.ts:38](https://github.com/JiangJie/fetch-t/blob/e5aa635435bb73b90ba7373357fa4cc6928da1b3/src/fetch/fetch.ts#L38)

## fetchT(url, init)

Expand Down Expand Up @@ -124,7 +124,7 @@ A `FetchTask` representing the operation with a response parsed as JSON.

### Defined in

[src/fetch/fetch.ts:51](https://github.com/JiangJie/fetch-t/blob/9e5c4ce034f7bf6add07f55044bccbb16a68960c/src/fetch/fetch.ts#L51)
[fetch.ts:51](https://github.com/JiangJie/fetch-t/blob/e5aa635435bb73b90ba7373357fa4cc6928da1b3/src/fetch/fetch.ts#L51)

## fetchT(url, init)

Expand All @@ -149,7 +149,7 @@ A `FetchResponse` representing the operation with a `string` response.

### Defined in

[src/fetch/fetch.ts:63](https://github.com/JiangJie/fetch-t/blob/9e5c4ce034f7bf6add07f55044bccbb16a68960c/src/fetch/fetch.ts#L63)
[fetch.ts:63](https://github.com/JiangJie/fetch-t/blob/e5aa635435bb73b90ba7373357fa4cc6928da1b3/src/fetch/fetch.ts#L63)

## fetchT(url, init)

Expand All @@ -174,7 +174,7 @@ A `FetchResponse` representing the operation with an `ArrayBuffer` response.

### Defined in

[src/fetch/fetch.ts:74](https://github.com/JiangJie/fetch-t/blob/9e5c4ce034f7bf6add07f55044bccbb16a68960c/src/fetch/fetch.ts#L74)
[fetch.ts:74](https://github.com/JiangJie/fetch-t/blob/e5aa635435bb73b90ba7373357fa4cc6928da1b3/src/fetch/fetch.ts#L74)

## fetchT(url, init)

Expand All @@ -199,7 +199,7 @@ A `FetchResponse` representing the operation with a `Blob` response.

### Defined in

[src/fetch/fetch.ts:85](https://github.com/JiangJie/fetch-t/blob/9e5c4ce034f7bf6add07f55044bccbb16a68960c/src/fetch/fetch.ts#L85)
[fetch.ts:85](https://github.com/JiangJie/fetch-t/blob/e5aa635435bb73b90ba7373357fa4cc6928da1b3/src/fetch/fetch.ts#L85)

## fetchT(url, init)

Expand Down Expand Up @@ -230,7 +230,7 @@ A `FetchResponse` representing the operation with a response parsed as JSON.

### Defined in

[src/fetch/fetch.ts:97](https://github.com/JiangJie/fetch-t/blob/9e5c4ce034f7bf6add07f55044bccbb16a68960c/src/fetch/fetch.ts#L97)
[fetch.ts:97](https://github.com/JiangJie/fetch-t/blob/e5aa635435bb73b90ba7373357fa4cc6928da1b3/src/fetch/fetch.ts#L97)

## fetchT(url, init)

Expand All @@ -255,7 +255,7 @@ A `FetchTask` representing the operation with a generic `Response`.

### Defined in

[src/fetch/fetch.ts:108](https://github.com/JiangJie/fetch-t/blob/9e5c4ce034f7bf6add07f55044bccbb16a68960c/src/fetch/fetch.ts#L108)
[fetch.ts:108](https://github.com/JiangJie/fetch-t/blob/e5aa635435bb73b90ba7373357fa4cc6928da1b3/src/fetch/fetch.ts#L108)

## fetchT(url, init)

Expand All @@ -280,7 +280,7 @@ A `FetchResponse` representing the operation with a generic `Response`.

### Defined in

[src/fetch/fetch.ts:119](https://github.com/JiangJie/fetch-t/blob/9e5c4ce034f7bf6add07f55044bccbb16a68960c/src/fetch/fetch.ts#L119)
[fetch.ts:119](https://github.com/JiangJie/fetch-t/blob/e5aa635435bb73b90ba7373357fa4cc6928da1b3/src/fetch/fetch.ts#L119)

## fetchT(url, init)

Expand Down Expand Up @@ -311,7 +311,7 @@ A `FetchResponse` or `FetchTask` depending on the `abortable` option in `init`.

### Defined in

[src/fetch/fetch.ts:131](https://github.com/JiangJie/fetch-t/blob/9e5c4ce034f7bf6add07f55044bccbb16a68960c/src/fetch/fetch.ts#L131)
[fetch.ts:131](https://github.com/JiangJie/fetch-t/blob/e5aa635435bb73b90ba7373357fa4cc6928da1b3/src/fetch/fetch.ts#L131)

## fetchT(url, init)

Expand All @@ -336,4 +336,4 @@ A `FetchResponse` representing the operation with a `Response` object.

### Defined in

[src/fetch/fetch.ts:140](https://github.com/JiangJie/fetch-t/blob/9e5c4ce034f7bf6add07f55044bccbb16a68960c/src/fetch/fetch.ts#L140)
[fetch.ts:140](https://github.com/JiangJie/fetch-t/blob/e5aa635435bb73b90ba7373357fa4cc6928da1b3/src/fetch/fetch.ts#L140)
22 changes: 4 additions & 18 deletions docs/interfaces/FetchInit.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,7 @@ Extends the standard `RequestInit` interface from the Fetch API to include addit

## Properties

| Property | Type | Description | Inherited from | Defined in |
| ------ | ------ | ------ | ------ | ------ |
| `abortable?` | `boolean` | Indicates whether the fetch request should be abortable. | - | [src/fetch/defines.ts:42](https://github.com/JiangJie/fetch-t/blob/9e5c4ce034f7bf6add07f55044bccbb16a68960c/src/fetch/defines.ts#L42) |
| `body?` | `null` \| `BodyInit` | A BodyInit object or null to set request's body. | `RequestInit.body` | node\_modules/.deno/[email protected]/node\_modules/typescript/lib/lib.dom.d.ts:1693 |
| `cache?` | `RequestCache` | A string indicating how the request will interact with the browser's cache to set request's cache. | `RequestInit.cache` | node\_modules/.deno/[email protected]/node\_modules/typescript/lib/lib.dom.d.ts:1695 |
| `credentials?` | `RequestCredentials` | A string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. Sets request's credentials. | `RequestInit.credentials` | node\_modules/.deno/[email protected]/node\_modules/typescript/lib/lib.dom.d.ts:1697 |
| `headers?` | `HeadersInit` | A Headers object, an object literal, or an array of two-item arrays to set request's headers. | `RequestInit.headers` | node\_modules/.deno/[email protected]/node\_modules/typescript/lib/lib.dom.d.ts:1699 |
| `integrity?` | `string` | A cryptographic hash of the resource to be fetched by request. Sets request's integrity. | `RequestInit.integrity` | node\_modules/.deno/[email protected]/node\_modules/typescript/lib/lib.dom.d.ts:1701 |
| `keepalive?` | `boolean` | A boolean to set request's keepalive. | `RequestInit.keepalive` | node\_modules/.deno/[email protected]/node\_modules/typescript/lib/lib.dom.d.ts:1703 |
| `method?` | `string` | A string to set request's method. | `RequestInit.method` | node\_modules/.deno/[email protected]/node\_modules/typescript/lib/lib.dom.d.ts:1705 |
| `mode?` | `RequestMode` | A string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request's mode. | `RequestInit.mode` | node\_modules/.deno/[email protected]/node\_modules/typescript/lib/lib.dom.d.ts:1707 |
| `priority?` | `RequestPriority` | - | `RequestInit.priority` | node\_modules/.deno/[email protected]/node\_modules/typescript/lib/lib.dom.d.ts:1708 |
| `redirect?` | `RequestRedirect` | A string indicating whether request follows redirects, results in an error upon encountering a redirect, or returns the redirect (in an opaque fashion). Sets request's redirect. | `RequestInit.redirect` | node\_modules/.deno/[email protected]/node\_modules/typescript/lib/lib.dom.d.ts:1710 |
| `referrer?` | `string` | A string whose value is a same-origin URL, "about:client", or the empty string, to set request's referrer. | `RequestInit.referrer` | node\_modules/.deno/[email protected]/node\_modules/typescript/lib/lib.dom.d.ts:1712 |
| `referrerPolicy?` | `ReferrerPolicy` | A referrer policy to set request's referrerPolicy. | `RequestInit.referrerPolicy` | node\_modules/.deno/[email protected]/node\_modules/typescript/lib/lib.dom.d.ts:1714 |
| `responseType?` | `"text"` \| `"arraybuffer"` \| `"blob"` \| `"json"` | Specifies the expected response type of the fetch request. | - | [src/fetch/defines.ts:47](https://github.com/JiangJie/fetch-t/blob/9e5c4ce034f7bf6add07f55044bccbb16a68960c/src/fetch/defines.ts#L47) |
| `signal?` | `null` \| `AbortSignal` | An AbortSignal to set request's signal. | `RequestInit.signal` | node\_modules/.deno/[email protected]/node\_modules/typescript/lib/lib.dom.d.ts:1716 |
| `window?` | `null` | Can only be null. Used to disassociate request from any Window. | `RequestInit.window` | node\_modules/.deno/[email protected]/node\_modules/typescript/lib/lib.dom.d.ts:1718 |
| 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/e5aa635435bb73b90ba7373357fa4cc6928da1b3/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/e5aa635435bb73b90ba7373357fa4cc6928da1b3/src/fetch/defines.ts#L47) |
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 | Type | Description | Defined in |
| ------ | ------ | ------ | ------ |
| `aborted` | `boolean` | Indicates whether the fetch task has been aborted. | [src/fetch/defines.ts:27](https://github.com/JiangJie/fetch-t/blob/9e5c4ce034f7bf6add07f55044bccbb16a68960c/src/fetch/defines.ts#L27) |
| `response` | [`FetchResponse`](../type-aliases/FetchResponse.md)\<`T`\> | The response of the fetch task, represented as an `AsyncResult`. | [src/fetch/defines.ts:32](https://github.com/JiangJie/fetch-t/blob/9e5c4ce034f7bf6add07f55044bccbb16a68960c/src/fetch/defines.ts#L32) |
| `aborted` | `boolean` | Indicates whether the fetch task has been aborted. | [defines.ts:27](https://github.com/JiangJie/fetch-t/blob/e5aa635435bb73b90ba7373357fa4cc6928da1b3/src/fetch/defines.ts#L27) |
| `response` | [`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/e5aa635435bb73b90ba7373357fa4cc6928da1b3/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
[src/fetch/defines.ts:22](https://github.com/JiangJie/fetch-t/blob/9e5c4ce034f7bf6add07f55044bccbb16a68960c/src/fetch/defines.ts#L22)
[defines.ts:22](https://github.com/JiangJie/fetch-t/blob/e5aa635435bb73b90ba7373357fa4cc6928da1b3/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

[src/fetch/defines.ts:9](https://github.com/JiangJie/fetch-t/blob/9e5c4ce034f7bf6add07f55044bccbb16a68960c/src/fetch/defines.ts#L9)
[defines.ts:9](https://github.com/JiangJie/fetch-t/blob/e5aa635435bb73b90ba7373357fa4cc6928da1b3/src/fetch/defines.ts#L9)
3 changes: 2 additions & 1 deletion typedoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
"typeDeclarationFormat": "table",
"indexFormat": "table",
"useCodeBlocks": true,
"expandObjects": true
"expandObjects": true,
"exclude": ["**/node_modules/**"]
}

0 comments on commit 714ea94

Please sign in to comment.