@rest-hooks/endpoint
Advanced tools
Comparing version 2.2.0-beta.4 to 2.2.0
@@ -6,2 +6,19 @@ # Change Log | ||
## [2.2.0](https://github.com/coinbase/rest-hooks/compare/@rest-hooks/endpoint@2.1.0...@rest-hooks/endpoint@2.2.0) (2022-03-17) | ||
### 🚀 Features | ||
* Add endpoint.optimisticUpdater ([#1616](https://github.com/coinbase/rest-hooks/issues/1616)) ([7a99fae](https://github.com/coinbase/rest-hooks/commit/7a99fae20ee9abf5f2121c1f1719bdcce3e78d98)) | ||
### 💅 Enhancement | ||
* Fetch resolution only removes the optimistic update corresponding to that fetch ([#1653](https://github.com/coinbase/rest-hooks/issues/1653)) ([2fd93f2](https://github.com/coinbase/rest-hooks/commit/2fd93f235074d134200e81ddb16792647b3cffad)) | ||
* Hooks should type return value based on 'null' arg ([#1783](https://github.com/coinbase/rest-hooks/issues/1783)) ([d14673e](https://github.com/coinbase/rest-hooks/commit/d14673eab0dad3f02edb54f7bf37e6fed1c47a62)) | ||
* Loosen SnapshotInterface to allow compatible but distinct versions ([#1786](https://github.com/coinbase/rest-hooks/issues/1786)) ([7b31f4d](https://github.com/coinbase/rest-hooks/commit/7b31f4df787e4c0a838dc897a81755abbccf1984)) | ||
* optimisticUpdater -> getOptimisticResponse ([#1769](https://github.com/coinbase/rest-hooks/issues/1769)) ([4d1cd66](https://github.com/coinbase/rest-hooks/commit/4d1cd66ea2677868aba402d362b9896dffc24462)) | ||
## [2.2.0-beta.4](https://github.com/coinbase/rest-hooks/compare/@rest-hooks/endpoint@2.2.0-beta.3...@rest-hooks/endpoint@2.2.0-beta.4) (2022-03-10) | ||
@@ -8,0 +25,0 @@ |
@@ -11,3 +11,3 @@ 'use strict'; | ||
Valid: 3 | ||
}; | ||
}; // looser version to allow for cross-package version compatibility | ||
@@ -14,0 +14,0 @@ function runCompat(endpoint, options) { |
@@ -5,3 +5,3 @@ export var ExpiryStatus = { | ||
Valid: 3 | ||
}; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9FeHBpcnkudHMiXSwibmFtZXMiOlsiRXhwaXJ5U3RhdHVzIl0sIm1hcHBpbmdzIjoiQUFBQSxXQUFrQkEsWUFBbEI7QUFBQTtBQUFBO0FBQUE7QUFBQSIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBjb25zdCBlbnVtIEV4cGlyeVN0YXR1cyB7XG4gIEludmFsaWQgPSAxLFxuICBJbnZhbGlkSWZTdGFsZSxcbiAgVmFsaWQsXG59XG4iXX0= | ||
}; // looser version to allow for cross-package version compatibility | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9FeHBpcnkudHMiXSwibmFtZXMiOlsiRXhwaXJ5U3RhdHVzIl0sIm1hcHBpbmdzIjoiQUFBQSxXQUFrQkEsWUFBbEI7QUFBQTtBQUFBO0FBQUE7QUFBQSxFLENBS0EiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY29uc3QgZW51bSBFeHBpcnlTdGF0dXMge1xuICBJbnZhbGlkID0gMSxcbiAgSW52YWxpZElmU3RhbGUsXG4gIFZhbGlkLFxufVxuLy8gbG9vc2VyIHZlcnNpb24gdG8gYWxsb3cgZm9yIGNyb3NzLXBhY2thZ2UgdmVyc2lvbiBjb21wYXRpYmlsaXR5XG5leHBvcnQgdHlwZSBFeHBpcnlTdGF0dXNJbnRlcmZhY2UgPSAxIHwgMiB8IDM7XG4iXX0= |
@@ -6,2 +6,2 @@ export { schema, Entity, isEntity, DELETED } from '@rest-hooks/normalizr'; | ||
export { default as AbortOptimistic } from "./AbortOptimistic.js"; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6WyJzY2hlbWEiLCJFbnRpdHkiLCJpc0VudGl0eSIsIk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lIHtcbiAgRW5kcG9pbnRFeHRyYU9wdGlvbnMsXG4gIEZldGNoRnVuY3Rpb24sXG4gIE9wdGltaXN0aWNVcGRhdGVQYXJhbXMsXG4gIFVwZGF0ZUZ1bmN0aW9uLFxuICBTY2hlbWFEZXRhaWwsXG4gIFNjaGVtYUxpc3QsXG4gIFNuYXBzaG90SW50ZXJmYWNlLFxuICBOZXR3b3JrRXJyb3IsXG4gIFVua25vd25FcnJvcixcbiAgRXJyb3JUeXBlcyxcbn0gZnJvbSAnQHJlc3QtaG9va3MvZW5kcG9pbnQvdHlwZXMnO1xuZXhwb3J0IHsgRXhwaXJ5U3RhdHVzIH0gZnJvbSAnQHJlc3QtaG9va3MvZW5kcG9pbnQvRXhwaXJ5JztcbmV4cG9ydCB0eXBlIHsgRXhwaXJ5U3RhdHVzSW50ZXJmYWNlIH0gZnJvbSAnQHJlc3QtaG9va3MvZW5kcG9pbnQvRXhwaXJ5JztcbmV4cG9ydCB0eXBlIHtcbiAgUmVzb2x2ZVR5cGUsXG4gIEVuZHBvaW50UGFyYW0sXG4gIEluZmVyUmV0dXJuLFxufSBmcm9tICdAcmVzdC1ob29rcy9lbmRwb2ludC91dGlsaXR5JztcblxuZXhwb3J0IHsgZGVmYXVsdCBhcyBFbmRwb2ludCB9IGZyb20gJ0ByZXN0LWhvb2tzL2VuZHBvaW50L2VuZHBvaW50JztcbmV4cG9ydCB7IGRlZmF1bHQgYXMgSW5kZXggfSBmcm9tICdAcmVzdC1ob29rcy9lbmRwb2ludC9pbmRleEVuZHBvaW50JztcbmV4cG9ydCB7IGRlZmF1bHQgYXMgQWJvcnRPcHRpbWlzdGljIH0gZnJvbSAnQHJlc3QtaG9va3MvZW5kcG9pbnQvQWJvcnRPcHRpbWlzdGljJztcbiJdfQ== |
export * from "./ErrorTypes.js"; | ||
export { default as SnapshotInterface } from "./SnapshotInterface.js"; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2V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GRhdGVGdW5jdGlvbjxTb3VyY2VTY2hlbWEsIEV4Y2x1ZGU8RGVzdFsnc2NoZW1hJ10sIHVuZGVmaW5lZD4+LFxuXTtcblxuZXhwb3J0IHR5cGUgVXBkYXRlRnVuY3Rpb248XG4gIFNvdXJjZVNjaGVtYSBleHRlbmRzIFNjaGVtYSB8IHVuZGVmaW5lZCxcbiAgRGVzdFNjaGVtYSBleHRlbmRzIFNjaGVtYSxcbj4gPSAoXG4gIHNvdXJjZVJlc3VsdHM6IE5vcm1hbGl6ZTxTb3VyY2VTY2hlbWE+LFxuICBkZXN0UmVzdWx0czogTm9ybWFsaXplPERlc3RTY2hlbWE+IHwgdW5kZWZpbmVkLFxuKSA9PiBOb3JtYWxpemU8RGVzdFNjaGVtYT47XG5cbmV4cG9ydCB0eXBlIFNjaGVtYURldGFpbDxUPiA9XG4gIHwgc2NoZW1hLkVudGl0eUludGVyZmFjZTxUPlxuICB8IHsgW0s6IHN0cmluZ106IGFueSB9XG4gIHwgc2NoZW1hLlNjaGVtYUNsYXNzO1xuXG5leHBvcnQgdHlwZSBTY2hlbWFMaXN0PFQ+ID1cbiAgfCBzY2hlbWEuRW50aXR5SW50ZXJmYWNlPFQ+W11cbiAgfCB7IFtLOiBzdHJpbmddOiBhbnkgfVxuICB8IFNjaGVtYVtdXG4gIHwgc2NoZW1hLlNjaGVtYUNsYXNzO1xuXG5leHBvcnQgKiBmcm9tICdAcmVzdC1ob29rcy9lbmRwb2ludC9FcnJvclR5cGVzJztcbmV4cG9ydCB7IGRlZmF1bHQgYXMgU25hcHNob3RJbnRlcmZhY2UgfSBmcm9tICdAcmVzdC1ob29rcy9lbmRwb2ludC9TbmFwc2hvdEludGVyZmFjZSc7XG4iXX0= |
@@ -6,2 +6,3 @@ export declare const enum ExpiryStatus { | ||
} | ||
export declare type ExpiryStatusInterface = 1 | 2 | 3; | ||
//# sourceMappingURL=Expiry.d.ts.map |
@@ -5,3 +5,3 @@ export var ExpiryStatus = { | ||
Valid: 3 | ||
}; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9FeHBpcnkudHMiXSwibmFtZXMiOlsiRXhwaXJ5U3RhdHVzIl0sIm1hcHBpbmdzIjoiQUFBQSxXQUFrQkEsWUFBbEI7QUFBQTtBQUFBO0FBQUE7QUFBQSIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBjb25zdCBlbnVtIEV4cGlyeVN0YXR1cyB7XG4gIEludmFsaWQgPSAxLFxuICBJbnZhbGlkSWZTdGFsZSxcbiAgVmFsaWQsXG59XG4iXX0= | ||
}; // looser version to allow for cross-package version compatibility | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9FeHBpcnkudHMiXSwibmFtZXMiOlsiRXhwaXJ5U3RhdHVzIl0sIm1hcHBpbmdzIjoiQUFBQSxXQUFrQkEsWUFBbEI7QUFBQTtBQUFBO0FBQUE7QUFBQSxFLENBS0EiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY29uc3QgZW51bSBFeHBpcnlTdGF0dXMge1xuICBJbnZhbGlkID0gMSxcbiAgSW52YWxpZElmU3RhbGUsXG4gIFZhbGlkLFxufVxuLy8gbG9vc2VyIHZlcnNpb24gdG8gYWxsb3cgZm9yIGNyb3NzLXBhY2thZ2UgdmVyc2lvbiBjb21wYXRpYmlsaXR5XG5leHBvcnQgdHlwZSBFeHBpcnlTdGF0dXNJbnRlcmZhY2UgPSAxIHwgMiB8IDM7XG4iXX0= |
@@ -8,2 +8,3 @@ export { EndpointInterface, ReadEndpoint, MutateEndpoint, IndexInterface, IndexParams, ArrayElement, } from "./interface"; | ||
export { ExpiryStatus } from "./Expiry"; | ||
export { ExpiryStatusInterface } from "./Expiry"; | ||
export { ResolveType, EndpointParam, InferReturn, } from "./utility"; | ||
@@ -10,0 +11,0 @@ export { default as Endpoint } from "./endpoint"; |
@@ -6,2 +6,2 @@ export { schema, Entity, isEntity, DELETED } from '@rest-hooks/normalizr'; | ||
export { default as AbortOptimistic } from "./AbortOptimistic.js"; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6WyJzY2hlbWEiLCJFbnRpdHkiLCJpc0VudGl0eSIsIkRFTEVURUQiLCJFeHBpcnlTdGF0dXMiLCJkZWZhdWx0IiwiRW5kcG9pbnQiLCJJbmRleCIsIkFib3J0T3B0aW1pc3RpYyJdLCJtYXBwaW5ncyI6IkFBa0JBLFNBQVNBLE1BQVQsRUFBaUJDLE1BQWpCLEVBQXlCQyxRQUF6QixFQUFtQ0MsT0FBbkMsUUFBa0QsdUJBQWxEO0FBY0EsU0FBU0MsWUFBVDtBQU9BLFNBQVNDLE9BQU8sSUFBSUMsUUFBcEI7QUFDQSxTQUFTRCxPQUFPLElBQUlFLEtBQXBCO0FBQ0EsU0FBU0YsT0FBTyxJQUFJRyxlQUFwQiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCB0eXBlIHtcbiAgRW5kcG9pbnRJbnRlcmZhY2UsXG4gIFJlYWRFbmRwb2ludCxcbiAgTXV0YXRlRW5kcG9pbnQsXG4gIEluZGV4SW50ZXJmYWNlLFxuICBJbmRleFBhcmFtcyxcbiAgQXJyYXlFbGVtZW50LFxufSBmcm9tICdAcmVzdC1ob29rcy9lbmRwb2ludC9pbnRlcmZhY2UnO1xuZXhwb3J0IHR5cGUge1xuICBFbmRwb2ludE9wdGlvbnMsXG4gIEVuZHBvaW50SW5zdGFuY2UsXG59IGZyb20gJ0ByZXN0LWhvb2tzL2VuZHBvaW50L2VuZHBvaW50JztcbmV4cG9ydCB0eXBlIHtcbiAgTm9ybWFsaXplLFxuICBOb3JtYWxpemVOdWxsYWJsZSxcbiAgRGVub3JtYWxpemUsXG4gIERlbm9ybWFsaXpl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vaW50JztcbmV4cG9ydCB7IGRlZmF1bHQgYXMgQWJvcnRPcHRpbWlzdGljIH0gZnJvbSAnQHJlc3QtaG9va3MvZW5kcG9pbnQvQWJvcnRPcHRpbWlzdGljJztcbiJdfQ== |
import type { DenormalizeNullable } from "./normal"; | ||
import type { EndpointInterface } from "./interface"; | ||
import type { ExpiryStatus } from "./Expiry"; | ||
import type { ExpiryStatusInterface } from "./Expiry"; | ||
import type { ErrorTypes } from "./ErrorTypes"; | ||
export default interface SnapshotInterface { | ||
getResponse: <E extends Pick<EndpointInterface, 'key' | 'schema' | 'invalidIfStale'>>(endpoint: E, ...args: readonly [...Parameters<E['key']>] | readonly [null]) => { | ||
getResponse: <E extends Pick<EndpointInterface, 'key' | 'schema' | 'invalidIfStale'>, Args extends readonly [...Parameters<E['key']>]>(endpoint: E, ...args: Args) => { | ||
data: DenormalizeNullable<E['schema']>; | ||
expiryStatus: ExpiryStatus; | ||
expiryStatus: ExpiryStatusInterface; | ||
expiresAt: number; | ||
}; | ||
getError: <E extends Pick<EndpointInterface, 'key'>>(endpoint: E, ...args: readonly [...Parameters<E['key']>] | readonly [null]) => ErrorTypes | undefined; | ||
getError: <E extends Pick<EndpointInterface, 'key'>, Args extends readonly [...Parameters<E['key']>]>(endpoint: E, ...args: Args) => ErrorTypes | undefined; | ||
readonly fetchedAt: number; | ||
} | ||
//# sourceMappingURL=SnapshotInterface.d.ts.map |
export * from "./ErrorTypes.js"; | ||
export { default as SnapshotInterface } from "./SnapshotInterface.js"; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy90eXBlcy50cyJdLCJuYW1lcyI6WyJkZWZhdWx0IiwiU25hcHNob3RJbnRlcmZhY2UiXSwibWFwcGluZ3MiOiJBQStEQTtBQUNBLFNBQVNBLE9BQU8sSUFBSUMsaUJBQXBCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgc2NoZW1hLCB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CxcbiAgRGVzdFNjaGVtYSBleHRlbmRzIFNjaGVtYSxcbj4gPSAoXG4gIHNvdXJjZVJlc3VsdHM6IE5vcm1hbGl6ZTxTb3VyY2VTY2hlbWE+LFxuICBkZXN0UmVzdWx0czogTm9ybWFsaXplPERlc3RTY2hlbWE+IHwgdW5kZWZpbmVkLFxuKSA9PiBOb3JtYWxpemU8RGVzdFNjaGVtYT47XG5cbmV4cG9ydCB0eXBlIFNjaGVtYURldGFpbDxUPiA9XG4gIHwgc2NoZW1hLkVudGl0eUludGVyZmFjZTxUPlxuICB8IHsgW0s6IHN0cmluZ106IGFueSB9XG4gIHwgc2NoZW1hLlNjaGVtYUNsYXNzO1xuXG5leHBvcnQgdHlwZSBTY2hlbWFMaXN0PFQ+ID1cbiAgfCBzY2hlbWEuRW50aXR5SW50ZXJmYWNlPFQ+W11cbiAgfCB7IFtLOiBzdHJpbmddOiBhbnkgfVxuICB8IFNjaGVtYVtdXG4gIHwgc2NoZW1hLlNjaGVtYUNsYXNzO1xuXG5leHBvcnQgKiBmcm9tICdAcmVzdC1ob29rcy9lbmRwb2ludC9FcnJvclR5cGVzJztcbmV4cG9ydCB7IGRlZmF1bHQgYXMgU25hcHNob3RJbnRlcmZhY2UgfSBmcm9tICdAcmVzdC1ob29rcy9lbmRwb2ludC9TbmFwc2hvdEludGVyZmFjZSc7XG4iXX0= |
{ | ||
"name": "@rest-hooks/endpoint", | ||
"version": "2.2.0-beta.4", | ||
"version": "2.2.0", | ||
"description": "Declarative Network Interface Definitions", | ||
@@ -100,5 +100,5 @@ "sideEffects": false, | ||
"@babel/runtime": "^7.7.2", | ||
"@rest-hooks/normalizr": "^8.2.0-beta.2" | ||
"@rest-hooks/normalizr": "^8.2.0" | ||
}, | ||
"gitHead": "b435cd1165a996730b9353875603bfb97add2cdd" | ||
"gitHead": "1300e60bb71b7f2687802fe13a52a04f88fc304b" | ||
} |
@@ -6,1 +6,3 @@ export const enum ExpiryStatus { | ||
} | ||
// looser version to allow for cross-package version compatibility | ||
export type ExpiryStatusInterface = 1 | 2 | 3; |
@@ -34,2 +34,3 @@ export type { | ||
export { ExpiryStatus } from '@rest-hooks/endpoint/Expiry'; | ||
export type { ExpiryStatusInterface } from '@rest-hooks/endpoint/Expiry'; | ||
export type { | ||
@@ -36,0 +37,0 @@ ResolveType, |
import type { DenormalizeNullable } from '@rest-hooks/endpoint/normal'; | ||
import type { EndpointInterface } from '@rest-hooks/endpoint/interface'; | ||
import type { ExpiryStatus } from '@rest-hooks/endpoint/Expiry'; | ||
import type { ExpiryStatusInterface } from '@rest-hooks/endpoint/Expiry'; | ||
import type { ErrorTypes } from '@rest-hooks/endpoint/ErrorTypes'; | ||
@@ -9,14 +9,18 @@ | ||
E extends Pick<EndpointInterface, 'key' | 'schema' | 'invalidIfStale'>, | ||
Args extends readonly [...Parameters<E['key']>], | ||
>( | ||
endpoint: E, | ||
...args: readonly [...Parameters<E['key']>] | readonly [null] | ||
...args: Args | ||
) => { | ||
data: DenormalizeNullable<E['schema']>; | ||
expiryStatus: ExpiryStatus; | ||
expiryStatus: ExpiryStatusInterface; | ||
expiresAt: number; | ||
}; | ||
getError: <E extends Pick<EndpointInterface, 'key'>>( | ||
getError: < | ||
E extends Pick<EndpointInterface, 'key'>, | ||
Args extends readonly [...Parameters<E['key']>], | ||
>( | ||
endpoint: E, | ||
...args: readonly [...Parameters<E['key']>] | readonly [null] | ||
...args: Args | ||
) => ErrorTypes | undefined; | ||
@@ -23,0 +27,0 @@ |
import { schema, Schema } from '@rest-hooks/normalizr'; | ||
import { Normalize, DenormalizeNullable } from '@rest-hooks/endpoint/normal'; | ||
import { Normalize } from '@rest-hooks/endpoint/normal'; | ||
import { EndpointInterface } from '@rest-hooks/endpoint/interface'; | ||
import { ResolveType } from '@rest-hooks/endpoint/utility'; | ||
import { ExpiryStatus } from '@rest-hooks/endpoint/Expiry'; | ||
import SnapshotInterface from '@rest-hooks/endpoint/SnapshotInterface'; | ||
@@ -7,0 +6,0 @@ |
@@ -6,2 +6,3 @@ export declare const enum ExpiryStatus { | ||
} | ||
export declare type ExpiryStatusInterface = 1 | 2 | 3; | ||
//# sourceMappingURL=Expiry.d.ts.map |
@@ -8,2 +8,3 @@ export { EndpointInterface, ReadEndpoint, MutateEndpoint, IndexInterface, IndexParams, ArrayElement, } from "./interface"; | ||
export { ExpiryStatus } from "./Expiry"; | ||
export { ExpiryStatusInterface } from "./Expiry"; | ||
export { ResolveType, EndpointParam, InferReturn, } from "./utility"; | ||
@@ -10,0 +11,0 @@ export { default as Endpoint } from "./endpoint"; |
import { DenormalizeNullable } from "./normal"; | ||
import { EndpointInterface } from "./interface"; | ||
import { ExpiryStatus } from "./Expiry"; | ||
import { ExpiryStatusInterface } from "./Expiry"; | ||
import { ErrorTypes } from "./ErrorTypes"; | ||
export default interface SnapshotInterface { | ||
getResponse: <E extends Pick<EndpointInterface, 'key' | 'schema' | 'invalidIfStale'>>(endpoint: E, ...args: readonly [ | ||
getResponse: <E extends Pick<EndpointInterface, 'key' | 'schema' | 'invalidIfStale'>, Args extends readonly [ | ||
...Parameters<E['key']> | ||
] | readonly [ | ||
null | ||
]) => { | ||
]>(endpoint: E, ...args: Args) => { | ||
data: DenormalizeNullable<E['schema']>; | ||
expiryStatus: ExpiryStatus; | ||
expiryStatus: ExpiryStatusInterface; | ||
expiresAt: number; | ||
}; | ||
getError: <E extends Pick<EndpointInterface, 'key'>>(endpoint: E, ...args: readonly [ | ||
getError: <E extends Pick<EndpointInterface, 'key'>, Args extends readonly [ | ||
...Parameters<E['key']> | ||
] | readonly [ | ||
null | ||
]) => ErrorTypes | undefined; | ||
]>(endpoint: E, ...args: Args) => ErrorTypes | undefined; | ||
readonly fetchedAt: number; | ||
} | ||
//# sourceMappingURL=SnapshotInterface.d.ts.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
174244
2191
1
Updated@rest-hooks/normalizr@^8.2.0