From 19867156a106c08343113fe899eeb80fff260dae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E9=B9=8F=E6=B3=A2?= Date: Fri, 11 Jan 2019 16:16:03 +0800 Subject: [PATCH] fix CI build error. export App --- types/weapp-api/index.d.ts | 13 +++++++++++-- types/weapp-api/weapp-api-tests.ts | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/types/weapp-api/index.d.ts b/types/weapp-api/index.d.ts index 1007429649..3bc0200fa6 100644 --- a/types/weapp-api/index.d.ts +++ b/types/weapp-api/index.d.ts @@ -1728,7 +1728,7 @@ declare function getApp(): App; * @param delay 延迟的时间,函数的调用会在该延迟之后发生,单位 ms。 * @param rest param1, param2, ..., paramN 等附加参数,它们会作为参数传递给回调函数。 */ -declare function setTimeout(callback: any, delay: number, rest: any): number; +declare function setTimeout(callback: any, delay: number, rest?: any): number; /** * 取消由 setTimeout 设置的定时器。 @@ -1750,4 +1750,13 @@ declare function setInterval(callback: any, delay: number, rest: any): number; */ declare function clearInterval(timeoutID: number): number; -export default wx +export { + wx, + App, + Page, + getApp, + setTimeout, + clearTimeout, + setInterval, + clearInterval +} diff --git a/types/weapp-api/weapp-api-tests.ts b/types/weapp-api/weapp-api-tests.ts index 5b2b0616a2..73f86e31f5 100644 --- a/types/weapp-api/weapp-api-tests.ts +++ b/types/weapp-api/weapp-api-tests.ts @@ -1,4 +1,4 @@ -import wx from './index' +import {wx, App, Page, getApp, setTimeout, clearTimeout, setInterval, clearInterval} from './index' App({ onLaunch: function () { //调用API从本地缓存中获取数据