Skip to content

Commit

Permalink
fix(weapp): incorrect Taro.canvasToTempFilePath typing (#5250)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpyzo0o authored and Garfield550 committed Jan 6, 2020
1 parent 60e5691 commit 317604c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/taro/types/api/canvas/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ declare namespace Taro {
option: canvasToTempFilePath.Option,
/** 在自定义组件下,当前组件实例的this,以操作组件内 [canvas](https://developers.weixin.qq.com/miniprogram/dev/component/canvas.html) 组件 */
component?: General.IAnyObject,
): void
): Promise<canvasToTempFilePath.SuccessCallbackResult>
namespace canvasToTempFilePath {
interface Option {
/** 画布标识,传入 [canvas](https://developers.weixin.qq.com/miniprogram/dev/component/canvas.html) 组件实例 (canvas type="2d" 时使用该属性)。 */
canvas: string
canvas?: string
/** 画布标识,传入 [canvas](https://developers.weixin.qq.com/miniprogram/dev/component/canvas.html) 组件的 canvas-id */
canvasId: string
/** 图片的质量,目前仅对 jpg 有效。取值范围为 (0, 1],不在范围内时当作 1.0 处理。 */
quality: number
quality?: number
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
complete?: (res: General.CallbackResult) => void
/** 输出的图片的高度 */
Expand Down

0 comments on commit 317604c

Please sign in to comment.