UNPKG

taro-hooks

Version:
13 lines (12 loc) 564 B
import type { PromiseOptionalAction, ExcludeOption } from '../type'; export type ActionSheetOption = Partial<ExcludeOption<Taro.showActionSheet.Option>>; export type ActionSheetResult = Taro.showActionSheet.SuccessCallbackResult; export type ActionSheetTapItem = Omit<ActionSheetResult, 'errMsg'> & { tapItem: string; }; export type Show = PromiseOptionalAction<ActionSheetOption, ActionSheetTapItem>; declare function useActionSheet(option?: ActionSheetOption): { tapItem: ActionSheetTapItem | undefined; show: Show; }; export default useActionSheet;