You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Timeout in milliseconds for getting a response. Each retry attempt gets the full timeout. Cannot be greater than 2147483647.
386
+
Per-attempt timeout in milliseconds for getting a response, applied independently to each retry. Cannot be greater than 2147483647. See also [`totalTimeout`](#totaltimeout).
387
387
388
-
If set to `false`, there will be no timeout.
388
+
If set to `false`, there will be no per-attempt timeout.
389
389
390
390
##### totalTimeout
391
391
392
392
Type: `number | false`\
393
393
Default: `false`
394
394
395
-
Total timeout in milliseconds for the entire operation, including all retries and delays. Cannot be greater than 2147483647. Throws a `TimeoutError` if exceeded.
395
+
Overall timeout in milliseconds for the entire operation, including retries and delays. Throws a `TimeoutError` if exceeded. Cannot be greater than 2147483647.
396
396
397
-
This is useful when you want to cap the total time spent on an operation, while still allowing each individual retry to use the full per-attempt `timeout`.
397
+
If set to `false` or not specified, there is no overall timeout.
Copy file name to clipboardExpand all lines: source/types/options.ts
+4-6Lines changed: 4 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -171,20 +171,18 @@ export type KyOptions = {
171
171
retry?: RetryOptions|number;
172
172
173
173
/**
174
-
Timeout in milliseconds for getting a response. Each retry attempt gets the full timeout. Cannot be greater than 2147483647.
174
+
Per-attempt timeout in milliseconds for getting a response, applied independently to each retry. Cannot be greater than 2147483647. See also `totalTimeout`.
175
175
176
-
If set to `false`, there will be no timeout.
176
+
If set to `false`, there will be no per-attempt timeout.
177
177
178
178
@default 10000
179
179
*/
180
180
timeout?: number|false;
181
181
182
182
/**
183
-
Total timeout in milliseconds for the entire operation, including all retries and delays. Cannot be greater than 2147483647. Throws a `TimeoutError` if exceeded.
183
+
Overall timeout in milliseconds for the entire operation, including retries and delays. Throws a `TimeoutError` if exceeded. Cannot be greater than 2147483647.
184
184
185
-
This is useful when you want to cap the total time spent on an operation, while still allowing each individual retry to use the full per-attempt `timeout`.
186
-
187
-
If set to `false` or not specified, there is no total timeout.
185
+
If set to `false` or not specified, there is no overall timeout.
0 commit comments