Skip to content

Commit

Permalink
给类型声明文件添加注释
Browse files Browse the repository at this point in the history
  • Loading branch information
youngjuning committed Jun 19, 2019
1 parent f952dcb commit af5b5fa
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,58 @@
export interface filePropsType {
/**
* 文件id,android only
*/
id?: string
/**
* 文件name,android only
*/
fileName?: string
/**
* 用于上传文件用的文件路径
*/
path: string
/**
* 用于展示的文件路径
*/
uri: string
}

export interface optionsPropsType {
/**
* 图片宽
*/
width?: number
/**
* 截图高
*/
height?: number
/**
* 截图格式,默认 png
*/
format?: 'png' | 'jpg' | 'webm'
/**
* 截图质量
*/
quality?: 0.0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 |0.8 | 0.9| 1.0
/**
* 截图存放位置,默认 tmpfile
*/
result?: 'tmpfile' | 'base64' | 'data-uri'
}

export interface screenshotPropsType {
ViewShot: any
/**
* 手动截图方法,接收一个回调函数用于接收截图和一个配置项对象
*/
captureScreen: (callback: (file: filePropsType) => void, options?: optionsPropsType) => void
/**
* 开始监听截图事件,接收一个回调函数用于接收截图
*/
startListener: (callback: (file: filePropsType) => void) => void
/**
* 停止监听截图事件
*/
stopListener: () => void
}

Expand Down

0 comments on commit af5b5fa

Please sign in to comment.