@rest-hooks/endpoint
Advanced tools
Comparing version 2.2.3 to 2.2.4
@@ -6,2 +6,11 @@ # Change Log | ||
### [2.2.4](https://github.com/coinbase/rest-hooks/compare/@rest-hooks/endpoint@2.2.3...@rest-hooks/endpoint@2.2.4) (2022-04-11) | ||
### 💅 Enhancement | ||
* Improve type inference for getFetchKey ([#1896](https://github.com/coinbase/rest-hooks/issues/1896)) ([36b11af](https://github.com/coinbase/rest-hooks/commit/36b11af67b08183288ad295ff0303eaf78f01dba)) | ||
### [2.2.3](https://github.com/coinbase/rest-hooks/compare/@rest-hooks/endpoint@2.2.2...@rest-hooks/endpoint@2.2.3) (2022-04-08) | ||
@@ -8,0 +17,0 @@ |
@@ -151,7 +151,3 @@ /* eslint-disable @typescript-eslint/ban-types */ | ||
/** @deprecated */ | ||
getFetchKey( | ||
...args: Parameters<F>[0] extends undefined | ||
? [] | ||
: [params: Parameters<F>[0]] | ||
): string; | ||
getFetchKey(...args: OnlyFirst<Parameters<F>>): string; | ||
/** @deprecated */ | ||
@@ -183,1 +179,3 @@ options?: EndpointExtraOptions<F>; | ||
type IfTypeScriptLooseNull<Y, N> = 1 | undefined extends 1 ? Y : N; | ||
type OnlyFirst<A extends unknown[]> = A extends [] ? [] : [A[0]]; |
{ | ||
"name": "@rest-hooks/endpoint", | ||
"version": "2.2.3", | ||
"version": "2.2.4", | ||
"description": "Declarative Network Interface Definitions", | ||
@@ -102,3 +102,3 @@ "sideEffects": false, | ||
}, | ||
"gitHead": "2f4974d8318442dca2206cc4dea85da34f07b371" | ||
"gitHead": "9ca7b83cc00374d2a0ea68f43a6ab2d3aad8cfd5" | ||
} |
@@ -151,7 +151,3 @@ /* eslint-disable @typescript-eslint/ban-types */ | ||
/** @deprecated */ | ||
getFetchKey( | ||
...args: Parameters<F>[0] extends undefined | ||
? [] | ||
: [params: Parameters<F>[0]] | ||
): string; | ||
getFetchKey(...args: OnlyFirst<Parameters<F>>): string; | ||
/** @deprecated */ | ||
@@ -183,1 +179,3 @@ options?: EndpointExtraOptions<F>; | ||
type IfTypeScriptLooseNull<Y, N> = 1 | undefined extends 1 ? Y : N; | ||
type OnlyFirst<A extends unknown[]> = A extends [] ? [] : [A[0]]; |
175610
2185