lissa 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +4 -4
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -317,14 +317,14 @@ export interface Lissa extends MakeRequest {
|
|
|
317
317
|
*
|
|
318
318
|
* Modify the given options as argument or return a new options object.
|
|
319
319
|
*/
|
|
320
|
-
beforeRequest(hook: (options: LissaOptions) => void | LissaOptions): Lissa;
|
|
320
|
+
beforeRequest(hook: (options: LissaOptions) => void | LissaOptions | Promise<void | LissaOptions>): Lissa;
|
|
321
321
|
|
|
322
322
|
/**
|
|
323
323
|
* Add a beforeFetch hook into the request cycle.
|
|
324
324
|
*
|
|
325
325
|
* Modify the actual fetch arguments or return new arguments.
|
|
326
326
|
*/
|
|
327
|
-
beforeFetch(hook: (request: FetchArguments) => void | FetchArguments): Lissa;
|
|
327
|
+
beforeFetch(hook: (request: FetchArguments) => void | FetchArguments | Promise<void | FetchArguments>): Lissa;
|
|
328
328
|
|
|
329
329
|
/**
|
|
330
330
|
* Add an onResponse hook into the request cycle.
|
|
@@ -333,7 +333,7 @@ export interface Lissa extends MakeRequest {
|
|
|
333
333
|
* stop looping over existing hooks and instantly returns this value (if it
|
|
334
334
|
* is an instance of Error it will get thrown).
|
|
335
335
|
*/
|
|
336
|
-
onResponse(hook: (result: LissaResult) => void | Exclude<any, undefined>): Lissa;
|
|
336
|
+
onResponse(hook: (result: LissaResult) => void | Exclude<any, undefined> | Promise<void | Exclude<any, undefined>>): Lissa;
|
|
337
337
|
|
|
338
338
|
/**
|
|
339
339
|
* Add an onError hook into the request cycle.
|
|
@@ -342,7 +342,7 @@ export interface Lissa extends MakeRequest {
|
|
|
342
342
|
* over existing hooks and instantly returns this value (if it is an instance
|
|
343
343
|
* of Error it will get thrown).
|
|
344
344
|
*/
|
|
345
|
-
onError(hook: (error: ResponseError | ConnectionError | GeneralErrorResponse) => void | Exclude<any, undefined>): Lissa;
|
|
345
|
+
onError(hook: (error: ResponseError | ConnectionError | GeneralErrorResponse) => void | Exclude<any, undefined> | Promise<void | Exclude<any, undefined>>): Lissa;
|
|
346
346
|
|
|
347
347
|
/**
|
|
348
348
|
* Copy the current instance with all its options and hooks.
|
package/package.json
CHANGED