UNPKG

taro-hooks

Version:
10 lines (9 loc) 383 B
import type { PromiseOptionalAction, PromiseWithoutOptionAction, ExcludeOption } from '../type'; export type ToastOption = Partial<ExcludeOption<Taro.showToast.Option>>; export type Show = PromiseOptionalAction<ToastOption>; export type Hide = PromiseWithoutOptionAction; declare function useToast(option?: ToastOption): { show: Show; hide: Hide; }; export default useToast;