@open-chat/chat-bubble
Version:
Chat bubble component.
13 lines (12 loc) • 421 B
TypeScript
import { Dispatch, SetStateAction } from "react";
declare global {
interface WindowEventMap {
"local-storage": CustomEvent;
}
}
interface UseLocalStorageOptions {
onChange?: (newValue: any, oldValue: any) => void;
}
type SetValue<T> = Dispatch<SetStateAction<T>>;
export declare function useLocalStorage<T>(key: string, initialValue: T, options?: UseLocalStorageOptions): [T, SetValue<T>];
export {};