From abe6d3e1f2fdb34ee002003ad249aa5f48c4f6ff Mon Sep 17 00:00:00 2001 From: Bao Hua Date: Wed, 3 Jan 2018 16:27:39 +0800 Subject: [PATCH] add missing function definition for jweixin (#22550) * Update index.d.ts add wx.getLocalImgData definition * add getLocalImgData definition which was missed wx.getLocalImgData definition is missed, add it * fix trailing whitespace --- types/jweixin/index.d.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/types/jweixin/index.d.ts b/types/jweixin/index.d.ts index ef6e3a9b41..6db4ac213f 100644 --- a/types/jweixin/index.d.ts +++ b/types/jweixin/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for jweixin 1.0 // Project: https://mp.weixin.qq.com/wiki/11/74ad127cc054f6b80759c40f77ec03db.html // Definitions by: taoqf +// gomydodo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /* =================== USAGE =================== import * as wx from 'jweixin'; @@ -245,6 +246,17 @@ declare namespace wx { * 下载图片接口 */ function downloadImage(params: IdownloadImage): void; + + interface IgetLocalImgData extends BaseParams { + localId: string; // 图片的localID + // localData是图片的base64数据,可以用img标签显示 + success(res: { localData: string }): void; + } + + /** + * 获取本地图片接口 + */ + function getLocalImgData(params: IgetLocalImgData): void; /*=============================图像接口================================*/ /*=============================音频接口================================*/ /**