Skip to content

Commit 321d726

Browse files
author
jarvisjiang
committed
update docs
1 parent 9e5d8bc commit 321d726

File tree

8 files changed

+48
-26
lines changed

8 files changed

+48
-26
lines changed

docs/functions/fetchT.md

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ Fetches a resource from the network as a text string and returns a `FetchTask` r
4141

4242
A `FetchTask` or `FetchResponse` depending on the provided options in `init`.
4343

44+
A `FetchTask` representing the operation with a `string` response.
45+
4446
### Type Param
4547

4648
The expected type of the response data when not using a specific `responseType`.
@@ -55,7 +57,7 @@ Additional options for the fetch operation, including custom `FetchInit` propert
5557

5658
### Defined in
5759

58-
[fetch.ts:14](https://github.com/JiangJie/fetch-t/blob/e31c84b39da301aedb3faeb020c606fa1a2c6bcb/src/fetch/fetch.ts#L14)
60+
[fetch.ts:14](https://github.com/JiangJie/fetch-t/blob/9e5d8bc709fe9cc1630d97e0ca16ef403ee959bb/src/fetch/fetch.ts#L14)
5961

6062
## fetchT(url, init)
6163

@@ -78,6 +80,8 @@ Fetches a resource from the network as an ArrayBuffer and returns a `FetchTask`
7880

7981
A `FetchTask` or `FetchResponse` depending on the provided options in `init`.
8082

83+
A `FetchTask` representing the operation with an `ArrayBuffer` response.
84+
8185
### Type Param
8286

8387
The expected type of the response data when not using a specific `responseType`.
@@ -92,7 +96,7 @@ Additional options for the fetch operation, including custom `FetchInit` propert
9296

9397
### Defined in
9498

95-
[fetch.ts:26](https://github.com/JiangJie/fetch-t/blob/e31c84b39da301aedb3faeb020c606fa1a2c6bcb/src/fetch/fetch.ts#L26)
99+
[fetch.ts:26](https://github.com/JiangJie/fetch-t/blob/9e5d8bc709fe9cc1630d97e0ca16ef403ee959bb/src/fetch/fetch.ts#L26)
96100

97101
## fetchT(url, init)
98102

@@ -115,6 +119,8 @@ Fetches a resource from the network as a Blob and returns a `FetchTask` represen
115119

116120
A `FetchTask` or `FetchResponse` depending on the provided options in `init`.
117121

122+
A `FetchTask` representing the operation with a `Blob` response.
123+
118124
### Type Param
119125

120126
The expected type of the response data when not using a specific `responseType`.
@@ -129,7 +135,7 @@ Additional options for the fetch operation, including custom `FetchInit` propert
129135

130136
### Defined in
131137

132-
[fetch.ts:38](https://github.com/JiangJie/fetch-t/blob/e31c84b39da301aedb3faeb020c606fa1a2c6bcb/src/fetch/fetch.ts#L38)
138+
[fetch.ts:38](https://github.com/JiangJie/fetch-t/blob/9e5d8bc709fe9cc1630d97e0ca16ef403ee959bb/src/fetch/fetch.ts#L38)
133139

134140
## fetchT(url, init)
135141

@@ -158,6 +164,8 @@ Fetches a resource from the network and parses it as JSON, returning a `FetchTas
158164

159165
A `FetchTask` or `FetchResponse` depending on the provided options in `init`.
160166

167+
A `FetchTask` representing the operation with a response parsed as JSON.
168+
161169
### Type Param
162170

163171
The expected type of the response data when not using a specific `responseType`.
@@ -172,7 +180,7 @@ Additional options for the fetch operation, including custom `FetchInit` propert
172180

173181
### Defined in
174182

175-
[fetch.ts:51](https://github.com/JiangJie/fetch-t/blob/e31c84b39da301aedb3faeb020c606fa1a2c6bcb/src/fetch/fetch.ts#L51)
183+
[fetch.ts:51](https://github.com/JiangJie/fetch-t/blob/9e5d8bc709fe9cc1630d97e0ca16ef403ee959bb/src/fetch/fetch.ts#L51)
176184

177185
## fetchT(url, init)
178186

@@ -195,6 +203,8 @@ Fetches a resource from the network as a text string and returns a `FetchRespons
195203

196204
A `FetchTask` or `FetchResponse` depending on the provided options in `init`.
197205

206+
A `FetchResponse` representing the operation with a `string` response.
207+
198208
### Type Param
199209

200210
The expected type of the response data when not using a specific `responseType`.
@@ -209,7 +219,7 @@ Additional options for the fetch operation, including custom `FetchInit` propert
209219

210220
### Defined in
211221

212-
[fetch.ts:63](https://github.com/JiangJie/fetch-t/blob/e31c84b39da301aedb3faeb020c606fa1a2c6bcb/src/fetch/fetch.ts#L63)
222+
[fetch.ts:63](https://github.com/JiangJie/fetch-t/blob/9e5d8bc709fe9cc1630d97e0ca16ef403ee959bb/src/fetch/fetch.ts#L63)
213223

214224
## fetchT(url, init)
215225

@@ -232,6 +242,8 @@ Fetches a resource from the network as an ArrayBuffer and returns a `FetchRespon
232242

233243
A `FetchTask` or `FetchResponse` depending on the provided options in `init`.
234244

245+
A `FetchResponse` representing the operation with an `ArrayBuffer` response.
246+
235247
### Type Param
236248

237249
The expected type of the response data when not using a specific `responseType`.
@@ -246,7 +258,7 @@ Additional options for the fetch operation, including custom `FetchInit` propert
246258

247259
### Defined in
248260

249-
[fetch.ts:74](https://github.com/JiangJie/fetch-t/blob/e31c84b39da301aedb3faeb020c606fa1a2c6bcb/src/fetch/fetch.ts#L74)
261+
[fetch.ts:74](https://github.com/JiangJie/fetch-t/blob/9e5d8bc709fe9cc1630d97e0ca16ef403ee959bb/src/fetch/fetch.ts#L74)
250262

251263
## fetchT(url, init)
252264

@@ -269,6 +281,8 @@ Fetches a resource from the network as a Blob and returns a `FetchResponse` repr
269281

270282
A `FetchTask` or `FetchResponse` depending on the provided options in `init`.
271283

284+
A `FetchResponse` representing the operation with a `Blob` response.
285+
272286
### Type Param
273287

274288
The expected type of the response data when not using a specific `responseType`.
@@ -283,7 +297,7 @@ Additional options for the fetch operation, including custom `FetchInit` propert
283297

284298
### Defined in
285299

286-
[fetch.ts:85](https://github.com/JiangJie/fetch-t/blob/e31c84b39da301aedb3faeb020c606fa1a2c6bcb/src/fetch/fetch.ts#L85)
300+
[fetch.ts:85](https://github.com/JiangJie/fetch-t/blob/9e5d8bc709fe9cc1630d97e0ca16ef403ee959bb/src/fetch/fetch.ts#L85)
287301

288302
## fetchT(url, init)
289303

@@ -312,6 +326,8 @@ Fetches a resource from the network and parses it as JSON, returning a `FetchRes
312326

313327
A `FetchTask` or `FetchResponse` depending on the provided options in `init`.
314328

329+
A `FetchResponse` representing the operation with a response parsed as JSON.
330+
315331
### Type Param
316332

317333
The expected type of the response data when not using a specific `responseType`.
@@ -326,7 +342,7 @@ Additional options for the fetch operation, including custom `FetchInit` propert
326342

327343
### Defined in
328344

329-
[fetch.ts:97](https://github.com/JiangJie/fetch-t/blob/e31c84b39da301aedb3faeb020c606fa1a2c6bcb/src/fetch/fetch.ts#L97)
345+
[fetch.ts:97](https://github.com/JiangJie/fetch-t/blob/9e5d8bc709fe9cc1630d97e0ca16ef403ee959bb/src/fetch/fetch.ts#L97)
330346

331347
## fetchT(url, init)
332348

@@ -349,6 +365,8 @@ Fetches a resource from the network and returns a `FetchTask` representing the o
349365

350366
A `FetchTask` or `FetchResponse` depending on the provided options in `init`.
351367

368+
A `FetchTask` representing the operation with a generic `Response`.
369+
352370
### Type Param
353371

354372
The expected type of the response data when not using a specific `responseType`.
@@ -363,7 +381,7 @@ Additional options for the fetch operation, including custom `FetchInit` propert
363381

364382
### Defined in
365383

366-
[fetch.ts:108](https://github.com/JiangJie/fetch-t/blob/e31c84b39da301aedb3faeb020c606fa1a2c6bcb/src/fetch/fetch.ts#L108)
384+
[fetch.ts:108](https://github.com/JiangJie/fetch-t/blob/9e5d8bc709fe9cc1630d97e0ca16ef403ee959bb/src/fetch/fetch.ts#L108)
367385

368386
## fetchT(url)
369387

@@ -385,6 +403,8 @@ Fetches a resource from the network and returns a `FetchResponse` representing t
385403

386404
A `FetchTask` or `FetchResponse` depending on the provided options in `init`.
387405

406+
A `FetchResponse` representing the operation with a generic `Response`.
407+
388408
### Type Param
389409

390410
The expected type of the response data when not using a specific `responseType`.
@@ -399,7 +419,7 @@ Additional options for the fetch operation, including custom `FetchInit` propert
399419

400420
### Defined in
401421

402-
[fetch.ts:118](https://github.com/JiangJie/fetch-t/blob/e31c84b39da301aedb3faeb020c606fa1a2c6bcb/src/fetch/fetch.ts#L118)
422+
[fetch.ts:118](https://github.com/JiangJie/fetch-t/blob/9e5d8bc709fe9cc1630d97e0ca16ef403ee959bb/src/fetch/fetch.ts#L118)
403423

404424
## fetchT(url, init)
405425

@@ -422,6 +442,8 @@ Fetches a resource from the network and returns a `FetchResponse` or `FetchTask`
422442

423443
A `FetchTask` or `FetchResponse` depending on the provided options in `init`.
424444

445+
A `FetchResponse` representing the operation with a `Response` object.
446+
425447
### Type Param
426448

427449
The expected type of the response data when not using a specific `responseType`.
@@ -436,4 +458,4 @@ Additional options for the fetch operation, including custom `FetchInit` propert
436458

437459
### Defined in
438460

439-
[fetch.ts:128](https://github.com/JiangJie/fetch-t/blob/e31c84b39da301aedb3faeb020c606fa1a2c6bcb/src/fetch/fetch.ts#L128)
461+
[fetch.ts:128](https://github.com/JiangJie/fetch-t/blob/9e5d8bc709fe9cc1630d97e0ca16ef403ee959bb/src/fetch/fetch.ts#L128)

docs/interfaces/FetchInit.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ Extends the standard `RequestInit` interface from the Fetch API to include addit
1616

1717
| Property | Type | Description | Defined in |
1818
| ------ | ------ | ------ | ------ |
19-
| `abortable?` | `boolean` | Indicates whether the fetch request should be abortable. | [defines.ts:42](https://github.com/JiangJie/fetch-t/blob/e31c84b39da301aedb3faeb020c606fa1a2c6bcb/src/fetch/defines.ts#L42) |
20-
| `responseType?` | `"text"` \| `"arraybuffer"` \| `"blob"` \| `"json"` | Specifies the expected response type of the fetch request. | [defines.ts:47](https://github.com/JiangJie/fetch-t/blob/e31c84b39da301aedb3faeb020c606fa1a2c6bcb/src/fetch/defines.ts#L47) |
21-
| `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/e31c84b39da301aedb3faeb020c606fa1a2c6bcb/src/fetch/defines.ts#L52) |
19+
| `abortable?` | `boolean` | Indicates whether the fetch request should be abortable. | [defines.ts:42](https://github.com/JiangJie/fetch-t/blob/9e5d8bc709fe9cc1630d97e0ca16ef403ee959bb/src/fetch/defines.ts#L42) |
20+
| `responseType?` | `"text"` \| `"arraybuffer"` \| `"blob"` \| `"json"` | Specifies the expected response type of the fetch request. | [defines.ts:47](https://github.com/JiangJie/fetch-t/blob/9e5d8bc709fe9cc1630d97e0ca16ef403ee959bb/src/fetch/defines.ts#L47) |
21+
| `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/9e5d8bc709fe9cc1630d97e0ca16ef403ee959bb/src/fetch/defines.ts#L52) |

docs/interfaces/FetchTask.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ Defines the structure and behavior of a fetch task, including the ability to abo
1818

1919
| Property | Type | Description | Defined in |
2020
| ------ | ------ | ------ | ------ |
21-
| `aborted` | `boolean` | Indicates whether the fetch task has been aborted. | [defines.ts:27](https://github.com/JiangJie/fetch-t/blob/e31c84b39da301aedb3faeb020c606fa1a2c6bcb/src/fetch/defines.ts#L27) |
22-
| `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/e31c84b39da301aedb3faeb020c606fa1a2c6bcb/src/fetch/defines.ts#L32) |
21+
| `aborted` | `boolean` | Indicates whether the fetch task has been aborted. | [defines.ts:27](https://github.com/JiangJie/fetch-t/blob/9e5d8bc709fe9cc1630d97e0ca16ef403ee959bb/src/fetch/defines.ts#L27) |
22+
| `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/9e5d8bc709fe9cc1630d97e0ca16ef403ee959bb/src/fetch/defines.ts#L32) |
2323

2424
## Methods
2525

@@ -43,4 +43,4 @@ Aborts the fetch task, optionally with a reason for the abortion.
4343
4444
#### Defined in
4545
46-
[defines.ts:22](https://github.com/JiangJie/fetch-t/blob/e31c84b39da301aedb3faeb020c606fa1a2c6bcb/src/fetch/defines.ts#L22)
46+
[defines.ts:22](https://github.com/JiangJie/fetch-t/blob/9e5d8bc709fe9cc1630d97e0ca16ef403ee959bb/src/fetch/defines.ts#L22)

docs/type-aliases/FetchResponse.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ Represents the response of a fetch operation, encapsulating the result data or a
2020

2121
## Defined in
2222

23-
[defines.ts:9](https://github.com/JiangJie/fetch-t/blob/e31c84b39da301aedb3faeb020c606fa1a2c6bcb/src/fetch/defines.ts#L9)
23+
[defines.ts:9](https://github.com/JiangJie/fetch-t/blob/9e5d8bc709fe9cc1630d97e0ca16ef403ee959bb/src/fetch/defines.ts#L9)

docs/variables/ABORT_ERROR.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ Name of abort error;
1414

1515
## Defined in
1616

17-
[defines.ts:58](https://github.com/JiangJie/fetch-t/blob/e31c84b39da301aedb3faeb020c606fa1a2c6bcb/src/fetch/defines.ts#L58)
17+
[defines.ts:58](https://github.com/JiangJie/fetch-t/blob/9e5d8bc709fe9cc1630d97e0ca16ef403ee959bb/src/fetch/defines.ts#L58)

docs/variables/TIMEOUT_ERROR.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ Name of timeout error;
1414

1515
## Defined in
1616

17-
[defines.ts:63](https://github.com/JiangJie/fetch-t/blob/e31c84b39da301aedb3faeb020c606fa1a2c6bcb/src/fetch/defines.ts#L63)
17+
[defines.ts:63](https://github.com/JiangJie/fetch-t/blob/9e5d8bc709fe9cc1630d97e0ca16ef403ee959bb/src/fetch/defines.ts#L63)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"rollup-plugin-dts": "^6.1.1",
5151
"rollup-plugin-esbuild": "^6.1.1",
5252
"typedoc": "^0.26.5",
53-
"typedoc-plugin-markdown": "^4.2.2",
53+
"typedoc-plugin-markdown": "^4.2.3",
5454
"typescript": "^5.5.4"
5555
},
5656
"dependencies": {

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)