interface.uts 657 B

1234567891011121314151617181920212223242526
  1. export type NullableString = string | null
  2. export type ConversionType = 'toBase64' | 'toDataURL' | 'toFile'
  3. export type ProcessFileOptions = {
  4. type : ConversionType
  5. path: string
  6. filename?: string
  7. success ?: (res : string) => void
  8. fail ?: (res : any) => void
  9. complete ?: (res : any) => void
  10. }
  11. /**
  12. * 错误码
  13. * 根据uni错误码规范要求,建议错误码以90开头,以下是错误码示例:
  14. * - 9010001 错误信息1
  15. * - 9010002 错误信息2
  16. */
  17. export type ProcessFileErrorCode = 9010001 | 9010002;
  18. /**
  19. * myApi 的错误回调参数
  20. */
  21. export interface ProcessFileFail extends IUniError {
  22. errCode : ProcessFileErrorCode
  23. };