taro-hooks
Version:
为 Taro 而设计的 Hooks Library
10 lines (9 loc) • 383 B
TypeScript
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;