From 2c955ca7176eb1dc1b703bd585e545bea5c8aacf Mon Sep 17 00:00:00 2001 From: Jiayu Liu Date: Tue, 26 Jun 2018 22:03:45 +0800 Subject: [PATCH 1/2] adding namespace wepy for wepy --- types/wepy/index.d.ts | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/types/wepy/index.d.ts b/types/wepy/index.d.ts index bff673ee8c..e15de0964a 100644 --- a/types/wepy/index.d.ts +++ b/types/wepy/index.d.ts @@ -13,12 +13,20 @@ import util from "./util"; import base from "./base"; import { WxEnhances } from "./wx_enhanced"; +export as namespace wepy; + +export type event = typeof event; +export type component = typeof component; +export type app = typeof app; +export type page = typeof page; +export type mixin = typeof mixin; + interface DefaultExport extends WxEnhances { - event: typeof event; - app: typeof app; - component: typeof component; - page: typeof page; - mixin: typeof mixin; + event: wepy.event; + app: wepy.app; + component: wepy.component; + page: wepy.page; + mixin: wepy.mixin; $createApp: typeof base.$createApp; $createPage: typeof base.$createPage; $isEmpty: typeof util.$isEmpty; From 95e51553f520ae9e29d44deabb6ae2ed12141167 Mon Sep 17 00:00:00 2001 From: Jiayu Liu Date: Tue, 26 Jun 2018 22:12:08 +0800 Subject: [PATCH 2/2] rename namespace type name --- types/wepy/index.d.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/types/wepy/index.d.ts b/types/wepy/index.d.ts index e15de0964a..08a22f2596 100644 --- a/types/wepy/index.d.ts +++ b/types/wepy/index.d.ts @@ -15,18 +15,18 @@ import { WxEnhances } from "./wx_enhanced"; export as namespace wepy; -export type event = typeof event; -export type component = typeof component; -export type app = typeof app; -export type page = typeof page; -export type mixin = typeof mixin; +export type Event = typeof event; +export type Component = typeof component; +export type App = typeof app; +export type Page = typeof page; +export type Mixin = typeof mixin; interface DefaultExport extends WxEnhances { - event: wepy.event; - app: wepy.app; - component: wepy.component; - page: wepy.page; - mixin: wepy.mixin; + event: wepy.Event; + app: wepy.App; + component: wepy.Component; + page: wepy.Page; + mixin: wepy.Mixin; $createApp: typeof base.$createApp; $createPage: typeof base.$createPage; $isEmpty: typeof util.$isEmpty;