Installation
npm install --save @types/react-cache
Summary
This package contains type definitions for react-cache (https://github.com/facebook/react/tree/master/packages/react-cache).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-cache.
index.d.ts
export interface Resource<Input, Value> {
read(key: Input): Value;
preload(key: Input): void;
}
export function unstable_createResource<Input, Value>(
fetch: (input: Input) => PromiseLike<Value>,
maybeHashInput?: (input: Input) => string | number,
): Resource<Input, Value>;
Additional Details
- Last updated: Tue, 07 Nov 2023 09:09:39 GMT
- Dependencies: none
Credits
These definitions were written by Spencer Miskoviak.