interface.uts 396 B

12345678910111213141516171819202122
  1. /**
  2. * 请求参数。
  3. */
  4. export type ScanOptions = {
  5. scanType ?: string[]
  6. onlyFromCamera ?: boolean
  7. success ?: (res : ScanResult) => void
  8. fail ?: (res : ScanResult) => void
  9. complete ?: (res : ScanResult) => void
  10. }
  11. /**
  12. * 函数返回结果
  13. */
  14. export type ScanResult = {
  15. errCode : number,
  16. result : string,
  17. }
  18. /* 实现函数 */
  19. export type HmScanCode = (options ?: ScanOptions) => void