@types/react-cache
TypeScript icon, indicating that this package has built-in type declarations

2.0.4 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/react-cache

Weekly Downloads

205

Version

2.0.4

License

MIT

Unpacked Size

3.16 kB

Total Files

5

Last publish

Collaborators

  • types