@graphiql/react
Version:
[Changelog](https://github.com/graphql/graphiql/blob/main/packages/graphiql-react/CHANGELOG.md) | [API Docs](https://graphiql-test.netlify.app/typedoc/modules/graphiql_react.html) | [NPM](https://www.npmjs.com/package/@graphiql/react)
19 lines (18 loc) • 686 B
TypeScript
import { Storage, StorageAPI } from '@graphiql/toolkit';
import { StateCreator } from 'zustand';
import { SlicesWithActions } from '../types';
export interface StorageSlice {
storage: StorageAPI;
}
export interface StorageProps {
/**
* Provide a custom storage API.
* @default localStorage
* @see {@link https://graphiql-test.netlify.app/typedoc/modules/graphiql_toolkit.html#storage-2|API docs}
* for details on the required interface.
*/
storage?: Storage;
}
declare type CreateStorageSlice = (initial: StorageSlice) => StateCreator<SlicesWithActions, [], [], StorageSlice>;
export declare const createStorageSlice: CreateStorageSlice;
export {};