import { scanCode } from '@tarojs/taro'; export interface IOptions { onlyFromCamera?: boolean; scanType?: keyof scanCode.ScanType; } export declare type IScanAction = (options?: IOptions) => Promise; export declare type ICameraScanAction = (scanType?: keyof scanCode.ScanType) => Promise; declare function useScanCode({ onlyFromCamera, scanType }?: IOptions): [ IScanAction, ICameraScanAction ]; export default useScanCode;