@serwist/core
Advanced tools
Comparing version 9.0.0-preview.7 to 9.0.0-preview.8
@@ -0,1 +1,2 @@ | ||
export type PromiseOrNot<T> = T | Promise<T>; | ||
export interface MapLikeObject { | ||
@@ -134,3 +135,3 @@ [key: string]: any; | ||
export interface CacheDidUpdateCallback { | ||
(param: CacheDidUpdateCallbackParam): Promise<any>; | ||
(param: CacheDidUpdateCallbackParam): PromiseOrNot<any>; | ||
} | ||
@@ -145,3 +146,3 @@ export interface CacheKeyWillBeUsedCallbackParam { | ||
export interface CacheKeyWillBeUsedCallback { | ||
(param: CacheKeyWillBeUsedCallbackParam): Promise<Request | string>; | ||
(param: CacheKeyWillBeUsedCallbackParam): PromiseOrNot<Request | string>; | ||
} | ||
@@ -155,3 +156,3 @@ export interface CacheWillUpdateCallbackParam { | ||
export interface CacheWillUpdateCallback { | ||
(param: CacheWillUpdateCallbackParam): Promise<any>; | ||
(param: CacheWillUpdateCallbackParam): PromiseOrNot<any>; | ||
} | ||
@@ -178,3 +179,3 @@ export interface CachedResponseWillBeUsedCallbackParam { | ||
export interface CachedResponseWillBeUsedCallback { | ||
(param: CachedResponseWillBeUsedCallbackParam): Promise<any>; | ||
(param: CachedResponseWillBeUsedCallbackParam): PromiseOrNot<any>; | ||
} | ||
@@ -189,3 +190,3 @@ export interface FetchDidFailCallbackParam { | ||
export interface FetchDidFailCallback { | ||
(param: FetchDidFailCallbackParam): Promise<any>; | ||
(param: FetchDidFailCallbackParam): PromiseOrNot<any>; | ||
} | ||
@@ -199,3 +200,3 @@ export interface FetchDidSucceedCallbackParam { | ||
export interface FetchDidSucceedCallback { | ||
(param: FetchDidSucceedCallbackParam): Promise<Response>; | ||
(param: FetchDidSucceedCallbackParam): PromiseOrNot<Response>; | ||
} | ||
@@ -208,3 +209,3 @@ export interface RequestWillFetchCallbackParam { | ||
export interface RequestWillFetchCallback { | ||
(param: RequestWillFetchCallbackParam): Promise<Request>; | ||
(param: RequestWillFetchCallbackParam): PromiseOrNot<Request>; | ||
} | ||
@@ -218,3 +219,3 @@ export interface HandlerWillRespondCallbackParam { | ||
export interface HandlerWillRespondCallback { | ||
(param: HandlerWillRespondCallbackParam): Promise<Response>; | ||
(param: HandlerWillRespondCallbackParam): PromiseOrNot<Response>; | ||
} | ||
@@ -228,3 +229,3 @@ export interface HandlerDidErrorCallbackParam { | ||
export interface HandlerDidErrorCallback { | ||
(param: HandlerDidErrorCallbackParam): Promise<Response | undefined>; | ||
(param: HandlerDidErrorCallbackParam): PromiseOrNot<Response | undefined>; | ||
} | ||
@@ -238,3 +239,3 @@ export interface HandlerDidRespondCallbackParam { | ||
export interface HandlerDidRespondCallback { | ||
(param: HandlerDidRespondCallbackParam): Promise<any>; | ||
(param: HandlerDidRespondCallbackParam): PromiseOrNot<any>; | ||
} | ||
@@ -249,3 +250,3 @@ export interface HandlerDidCompleteCallbackParam { | ||
export interface HandlerDidCompleteCallback { | ||
(param: HandlerDidCompleteCallbackParam): Promise<any>; | ||
(param: HandlerDidCompleteCallbackParam): PromiseOrNot<any>; | ||
} | ||
@@ -252,0 +253,0 @@ /** |
{ | ||
"name": "@serwist/core", | ||
"version": "9.0.0-preview.7", | ||
"version": "9.0.0-preview.8", | ||
"type": "module", | ||
@@ -43,3 +43,3 @@ "description": "This module is used by a number of the other Serwist modules to share common code.", | ||
"typescript": "5.4.0-dev.20240206", | ||
"@serwist/constants": "9.0.0-preview.7" | ||
"@serwist/constants": "9.0.0-preview.8" | ||
}, | ||
@@ -46,0 +46,0 @@ "peerDependencies": { |
@@ -8,2 +8,3 @@ /* | ||
*/ | ||
export type PromiseOrNot<T> = T | Promise<T>; | ||
@@ -156,3 +157,3 @@ export interface MapLikeObject { | ||
export interface CacheDidUpdateCallback { | ||
(param: CacheDidUpdateCallbackParam): Promise<any>; | ||
(param: CacheDidUpdateCallbackParam): PromiseOrNot<any>; | ||
} | ||
@@ -169,3 +170,3 @@ | ||
export interface CacheKeyWillBeUsedCallback { | ||
(param: CacheKeyWillBeUsedCallbackParam): Promise<Request | string>; | ||
(param: CacheKeyWillBeUsedCallbackParam): PromiseOrNot<Request | string>; | ||
} | ||
@@ -181,3 +182,3 @@ | ||
export interface CacheWillUpdateCallback { | ||
(param: CacheWillUpdateCallbackParam): Promise<any>; | ||
(param: CacheWillUpdateCallbackParam): PromiseOrNot<any>; | ||
} | ||
@@ -206,3 +207,3 @@ | ||
export interface CachedResponseWillBeUsedCallback { | ||
(param: CachedResponseWillBeUsedCallbackParam): Promise<any>; | ||
(param: CachedResponseWillBeUsedCallbackParam): PromiseOrNot<any>; | ||
} | ||
@@ -219,3 +220,3 @@ | ||
export interface FetchDidFailCallback { | ||
(param: FetchDidFailCallbackParam): Promise<any>; | ||
(param: FetchDidFailCallbackParam): PromiseOrNot<any>; | ||
} | ||
@@ -231,3 +232,3 @@ | ||
export interface FetchDidSucceedCallback { | ||
(param: FetchDidSucceedCallbackParam): Promise<Response>; | ||
(param: FetchDidSucceedCallbackParam): PromiseOrNot<Response>; | ||
} | ||
@@ -242,3 +243,3 @@ | ||
export interface RequestWillFetchCallback { | ||
(param: RequestWillFetchCallbackParam): Promise<Request>; | ||
(param: RequestWillFetchCallbackParam): PromiseOrNot<Request>; | ||
} | ||
@@ -254,3 +255,3 @@ | ||
export interface HandlerWillRespondCallback { | ||
(param: HandlerWillRespondCallbackParam): Promise<Response>; | ||
(param: HandlerWillRespondCallbackParam): PromiseOrNot<Response>; | ||
} | ||
@@ -266,3 +267,3 @@ | ||
export interface HandlerDidErrorCallback { | ||
(param: HandlerDidErrorCallbackParam): Promise<Response | undefined>; | ||
(param: HandlerDidErrorCallbackParam): PromiseOrNot<Response | undefined>; | ||
} | ||
@@ -278,3 +279,3 @@ | ||
export interface HandlerDidRespondCallback { | ||
(param: HandlerDidRespondCallbackParam): Promise<any>; | ||
(param: HandlerDidRespondCallbackParam): PromiseOrNot<any>; | ||
} | ||
@@ -291,3 +292,3 @@ | ||
export interface HandlerDidCompleteCallback { | ||
(param: HandlerDidCompleteCallbackParam): Promise<any>; | ||
(param: HandlerDidCompleteCallbackParam): PromiseOrNot<any>; | ||
} | ||
@@ -294,0 +295,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 4 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 4 instances in 1 package
113726
2504