Component
构造器增加第四个泛型,以允许在自定义组件上挂载自定义的字段 (#133)App
的 onThemeChange
(#135)Page
的 onAddToFavorites
(#136)FileSystemManagerGetFileInfoCompleteCallback
和 WxGetFileInfoCompleteCallback
都变成了 GetFileInfoCompleteCallback
)。这是一个 破坏性改动,原本字面上引用了这些 interface / callback 的代码可能会报错。Component
的 getOpenerEventChannel
(#112 by @baranwang)const
改为 let
) (#102)Page
上的 options
字段 (#101 by @baranwang)Component
selectOwnerComponent
, animate
, clearAnimation
(#96)App
onUnhandledRejection
(#99)Component
纯数据字段 (pureDataPattern
)Component
的属性监听器使用 string
类型Behaviors
中缺少的一些选项Partial
的自定义方法 (用例)getApp
支持范型 (#77)require
, exports
, module.exports
定义,以支持在没有 @types/node
下编译FileSystemManager.appendFileSync
的 encoding
)[object Object]
的问题object
改为 Record<string, any>
,以允许任意属性和方法ObjectConstructor
时,类型推导为 Record<string, any>
而不是 object
component
参数的类型为页面或自定义组件实例console: WechatMiniprogram.Console
全局变量styleIsolation
到 ComponentOption
IAnyObject
,收回到命名空间 WechatMiniprogram
内