/** * This function provides `getItem` method from {@link telegram!CloudStorage} as Promise * @throws */ export type GetItemFunction = (key: string) => Promise; /** * This function provides `setItem` method from {@link telegram!CloudStorage} as Promise * @throws */ export type SetItemFunction = (key: string, value: string) => Promise; /** * This function provides `getItems` method from {@link telegram!CloudStorage} as Promise * @throws */ export type GetItemsFunction = (keys: string[]) => Promise; /** * This function provides `removeItem` method from {@link telegram!CloudStorage} as Promise * @throws */ export type RemoveItemFunction = (key: string) => Promise; /** * This function provides `removeItems` method from {@link telegram!CloudStorage} as Promise * @throws */ export type RemoveItemsFunction = (key: string[]) => Promise; /** * This function provides `getKeys` method from {@link telegram!CloudStorage} as Promise * @throws */ export type GetKeysFunction = () => Promise; /** * This hook provides {@link telegram!CloudStorage} object with promises functions, * so you don't have to pass `callback` argument * You have to look original description CloudStorage object in {@link telegram!CloudStorage} * @group Hooks */ declare const useCloudStorage: () => { getItem: GetItemFunction; setItem: SetItemFunction; getItems: GetItemsFunction; removeItem: RemoveItemFunction; getKeys: GetKeysFunction; }; export default useCloudStorage;