New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

miniprogram-api-typings

Package Overview
Dependencies
Maintainers
1
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

miniprogram-api-typings - npm Package Compare versions

Comparing version 2.10.4 to 2.11.0-1

12

CHANGELOG.md

@@ -0,1 +1,13 @@

## 2020-06-15 v2.11.0-1
- 该版本继续合并了一部分完全相同的 interface / callback,是一个 **破坏性改动**,原本字面上引用了这些 interface / callback 的代码可能会报错。
- 为 `Component` 构造器增加第四个泛型,以允许在自定义组件上挂载自定义的字段 ([#133](https://github.com/wechat-miniprogram/api-typings/issues/133))
- 修复一些接口错误 ([#134](https://github.com/wechat-miniprogram/api-typings/issues/134))
- 补齐 `App` 的 `onThemeChange` ([#135](https://github.com/wechat-miniprogram/api-typings/issues/135))
- 补齐 `Page` 的 `onAddToFavorites` ([#136](https://github.com/wechat-miniprogram/api-typings/issues/136))
## 2020-05-20 v2.11.0
- 同步 API 定义到基础库 2.11.0
- 该版本继续合并了一部分完全相同的 interface / callback,是一个 **破坏性改动**,原本字面上引用了这些 interface / callback 的代码可能会报错。
- 修复接口错误 ([#126](https://github.com/wechat-miniprogram/api-typings/issues/126))
## 2020-04-20 v2.10.4

@@ -2,0 +14,0 @@ - 同步 API 定义到基础库 2.10.4

2

package.json
{
"name": "miniprogram-api-typings",
"version": "2.10.4",
"version": "2.11.0-1",
"description": "Type definitions for APIs of Wechat Mini Program in TypeScript",

@@ -5,0 +5,0 @@ "main": "./index.d.ts",

@@ -239,2 +239,8 @@ /*! *****************************************************************************

onUnhandledRejection: OnUnhandledRejectionCallback
/**
* 系统切换主题时触发。也可以使用 wx.onThemeChange 绑定监听。
*
* 最低基础库: 2.11.0
*/
onThemeChange: OnThemeChangeCallback
}

@@ -241,0 +247,0 @@

@@ -28,6 +28,8 @@ /*! *****************************************************************************

TProperty extends PropertyOption,
TMethod extends Partial<MethodOption>
TMethod extends Partial<MethodOption>,
TCustomInstanceProperty extends IAnyObject = {}
> = InstanceProperties &
InstanceMethods<TData> &
TMethod & {
TMethod &
TCustomInstanceProperty & {
/** 组件数据,**包括内部数据和属性值** */

@@ -38,8 +40,19 @@ data: TData & PropertyOptionToData<TProperty>

}
type TrivialInstance = Instance<IAnyObject, IAnyObject, IAnyObject>
type TrivialOption = Options<IAnyObject, IAnyObject, IAnyObject>
type TrivialInstance = Instance<
IAnyObject,
IAnyObject,
IAnyObject,
IAnyObject
>
type TrivialOption = Options<
IAnyObject,
IAnyObject,
IAnyObject,
IAnyObject
>
type Options<
TData extends DataOption,
TProperty extends PropertyOption,
TMethod extends MethodOption
TMethod extends MethodOption,
TCustomInstanceProperty extends IAnyObject = {}
> = Partial<Data<TData>> &

@@ -50,3 +63,5 @@ Partial<Property<TProperty>> &

Partial<Lifetimes> &
ThisType<Instance<TData, TProperty, TMethod>>
ThisType<
Instance<TData, TProperty, TMethod, TCustomInstanceProperty>
>
interface Constructor {

@@ -56,5 +71,11 @@ <

TProperty extends PropertyOption,
TMethod extends MethodOption
TMethod extends MethodOption,
TCustomInstanceProperty extends IAnyObject = {}
>(
options: Options<TData, TProperty, TMethod>
options: Options<
TData,
TProperty,
TMethod,
TCustomInstanceProperty
>
): string

@@ -61,0 +82,0 @@ }

@@ -123,2 +123,10 @@ /*! *****************************************************************************

): void
/**
* 监听用户点击右上角菜单“收藏”按钮的行为,并自定义收藏内容。
* 基础库 2.10.3,安卓 7.0.15 版本起支持,iOS 暂不支持
*/
onAddToFavorites(
options: IAddToFavoritesOption
): IAddToFavoritesContent
}

@@ -208,2 +216,16 @@ interface InstanceProperties {

interface IAddToFavoritesOption {
/** 页面中包含web-view组件时,返回当前web-view的url */
webviewUrl?: string
}
interface IAddToFavoritesContent {
/** 自定义标题,默认值:页面标题或账号名称 */
title?: string
/** 自定义图片,显示图片长宽比为 1:1,默认值:页面截图 */
imageUrl?: string
/** 自定义query字段,默认值:当前页面的query */
query?: string
}
interface getCurrentPages {

@@ -210,0 +232,0 @@ (): Array<Instance<IAnyObject, IAnyObject>>

@@ -5,2 +5,3 @@ ## 所有可用版本

-|-|-
[v2.11.0](https://developers.weixin.qq.com/miniprogram/dev/framework/release/#v2-11-0-2020-04-24) | [2.11.0-1](https://www.npmjs.com/package/miniprogram-api-typings/v/2.11.0-1) | `npm install miniprogram-api-typings@2.11.0-1`
[v2.10.4](https://developers.weixin.qq.com/miniprogram/dev/framework/release/#v2-10-4-2020-03-24) | [2.10.4](https://www.npmjs.com/package/miniprogram-api-typings/v/2.10.4) | `npm install miniprogram-api-typings@2.10.4`

@@ -7,0 +8,0 @@ [v2.10.3](https://developers.weixin.qq.com/miniprogram/dev/framework/release/#v2-10-3-2020-03-06) | [2.10.3-1](https://www.npmjs.com/package/miniprogram-api-typings/v/2.10.3-1) | `npm install miniprogram-api-typings@2.10.3-1`

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc