UNPKG

taro-hooks

Version:
11 lines (10 loc) 459 B
import type { ExcludeOption, PromiseOptionalAction, PromiseWithoutOptionAction } from '../type'; export type LoadingOption = ExcludeOption<Taro.showLoading.Option>; export type PartialLoadingOption = Partial<LoadingOption>; export type Show = PromiseOptionalAction<PartialLoadingOption>; export type Hide = PromiseWithoutOptionAction; declare function useLoading(option?: PartialLoadingOption): { show: Show; hide: Hide; }; export default useLoading;