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.8.0 to 2.8.1

16

CHANGELOG.md

@@ -0,1 +1,17 @@

## 2019-08-30 v2.8.1
- 同步 API 定义到基础库 2.8.1
- 修复了部分最低基础库显示为 `[object Object]` 的问题
## 2019-08-20 v2.8.0-2
- 将 `object` 改为 `Record<string, any>`,以允许任意属性和方法
- 自定义组件属性构造器为 `ObjectConstructor` 时,类型推导为 `Record<string, any>` 而不是 `object`
- 修正 `component` 参数的类型为页面或自定义组件实例
- 补齐 `console: WechatMiniprogram.Console` 全局变量
- 修正一些其他的接口类型错误
## 2019-08-14 v2.8.0-1
- 补齐 `styleIsolation` 到 `ComponentOption`
## 2019-08-14 v2.8.0

@@ -2,0 +18,0 @@

26

package.json
{
"name": "miniprogram-api-typings",
"version": "2.8.0",
"version": "2.8.1",
"description": "Type definitions for APIs of Wechat Mini Program in TypeScript",
"main": "./index.d.ts",
"types": "./index.d.ts",
"scripts": {
"test": "mkdir -p ~/.dts && dtslint . --localTs ./node_modules/typescript/lib",
"dtslint": "npm test"
},
"repository": {

@@ -11,8 +15,22 @@ "type": "git",

},
"author": "wechat-miniprogram",
"license": "MIT",
"author": "Wechat Miniprogram <wx-miniprogram@qq.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/wechat-miniprogram/api-typings/issues"
},
"homepage": "https://github.com/wechat-miniprogram/api-typings#readme"
"homepage": "https://github.com/wechat-miniprogram/api-typings#readme",
"dependencies": {},
"devDependencies": {
"dtslint": "^0.9.1",
"typescript": "^3.5.3"
},
"files": [
"LICENSE",
"CHANGELOG.md",
"README.md",
"README-en.md",
"index.d.ts",
"typings.json",
"types/"
]
}

20

README-en.md

@@ -5,4 +5,5 @@ # Wechat Mini Program API Typings

[![](https://img.shields.io/npm/v/miniprogram-api-typings.svg?style=flat)](https://www.npmjs.com/package/miniprogram-api-typings)
[![](https://img.shields.io/github/license/wechat-miniprogram/api-typings.svg)](https://github.com/wechat-miniprogram/api-typings)
[![Published on NPM](https://img.shields.io/npm/v/miniprogram-api-typings.svg?style=flat)](https://www.npmjs.com/package/miniprogram-api-typings)
[![MIT License](https://img.shields.io/github/license/wechat-miniprogram/api-typings.svg)](https://github.com/wechat-miniprogram/api-typings)
[![Travis CI Test Status](https://travis-ci.org/wechat-miniprogram/api-typings.svg?branch=master)](https://travis-ci.org/wechat-miniprogram/api-typings)

@@ -30,3 +31,4 @@ Type definitions for APIs of Wechat Mini Program in TypeScript

-|-|-
[v2.8.0](https://developers.weixin.qq.com/miniprogram/dev/framework/release/#v2-8-0-2019-07-30) | [2.8.0](https://www.npmjs.com/package/miniprogram-api-typings/v/2.8.0) | `npm install miniprogram-api-typings@2.8.0`
[v2.8.1](https://developers.weixin.qq.com/miniprogram/dev/framework/release/#v2-8-1-2019-08-22) | [2.8.1](https://www.npmjs.com/package/miniprogram-api-typings/v/2.8.1) | `npm install miniprogram-api-typings@2.8.1`
[v2.8.0](https://developers.weixin.qq.com/miniprogram/dev/framework/release/#v2-8-0-2019-07-30) | [2.8.0-2](https://www.npmjs.com/package/miniprogram-api-typings/v/2.8.0-2) | `npm install miniprogram-api-typings@2.8.0-2`
[v2.7.7](https://developers.weixin.qq.com/miniprogram/dev/framework/release/) | [2.7.7-2](https://www.npmjs.com/package/miniprogram-api-typings/v/2.7.7-2) | `npm install miniprogram-api-typings@2.7.7-2`

@@ -40,2 +42,12 @@ [v2.6.5](https://developers.weixin.qq.com/miniprogram/dev/framework/release/#v2-6-5-2019-04-02) | [2.6.5-2](https://www.npmjs.com/package/miniprogram-api-typings/v/2.6.5-2) | `npm install miniprogram-api-typings@2.6.5-2`

Since definitions are auto-generated together with [documentations](https://developers.weixin.qq.com/miniprogram/dev/index.html), all PRs will __not__ be merged. If you have any bug reports or suggestions, create an issue instead. Thanks for contributing!
Definitions of Wechat APIs (`lib.wx.api.d.ts`) are auto-generated together with our [documentations](https://developers.weixin.qq.com/miniprogram/dev/index.html), therefore PRs including that file will __not__ be merged. If you found some APIs defined wrongly, create an issue instead.
Both PR and issue are welcomed for definitions of pages (`Page`), custom components (`Component`) and other else, since they are written manually. Help us improve this definition if you have any bug reports or suggestions! Thanks for contributing!
### Automated tests
We use [`dtslint`](https://github.com/Microsoft/dtslint) to check if this definition is working properly. All test cases are under folder `test`.
To perform an automated test, clone this repo, `npm install --save-dev` and `npm test`.
If you have test case that fails the test, an issue or PR will be great. Strong test case that passes are also welcomed.

@@ -5,4 +5,5 @@ # 微信小程序定义文件

[![](https://img.shields.io/npm/v/miniprogram-api-typings.svg?style=flat)](https://www.npmjs.com/package/miniprogram-api-typings)
[![](https://img.shields.io/github/license/wechat-miniprogram/api-typings.svg)](https://github.com/wechat-miniprogram/miniprogram-api-typings)
[![已在 NPM 发布](https://img.shields.io/npm/v/miniprogram-api-typings.svg?style=flat)](https://www.npmjs.com/package/miniprogram-api-typings)
[![MIT 协议](https://img.shields.io/github/license/wechat-miniprogram/api-typings.svg)](https://github.com/wechat-miniprogram/api-typings)
[![Travis CI 测试状况](https://travis-ci.org/wechat-miniprogram/api-typings.svg?branch=master)](https://travis-ci.org/wechat-miniprogram/api-typings)

@@ -29,3 +30,4 @@ 微信小程序 API 的 TypeScript 类型定义文件

-|-|-
[v2.8.0](https://developers.weixin.qq.com/miniprogram/dev/framework/release/#v2-8-0-2019-07-30) | [2.8.0](https://www.npmjs.com/package/miniprogram-api-typings/v/2.8.0) | `npm install miniprogram-api-typings@2.8.0`
[v2.8.1](https://developers.weixin.qq.com/miniprogram/dev/framework/release/#v2-8-1-2019-08-22) | [2.8.1](https://www.npmjs.com/package/miniprogram-api-typings/v/2.8.1) | `npm install miniprogram-api-typings@2.8.1`
[v2.8.0](https://developers.weixin.qq.com/miniprogram/dev/framework/release/#v2-8-0-2019-07-30) | [2.8.0-2](https://www.npmjs.com/package/miniprogram-api-typings/v/2.8.0-2) | `npm install miniprogram-api-typings@2.8.0-2`
[v2.7.7](https://developers.weixin.qq.com/miniprogram/dev/framework/release/) | [2.7.7-2](https://www.npmjs.com/package/miniprogram-api-typings/v/2.7.7-2) | `npm install miniprogram-api-typings@2.7.7-2`

@@ -39,2 +41,12 @@ [v2.6.5](https://developers.weixin.qq.com/miniprogram/dev/framework/release/#v2-6-5-2019-04-02) | [2.6.5-2](https://www.npmjs.com/package/miniprogram-api-typings/v/2.6.5-2) | `npm install miniprogram-api-typings@2.6.5-2`

定义文件是随 [文档](https://developers.weixin.qq.com/miniprogram/dev/index.html) 一起自动生成的,所以所有的 PR 都将 __不会__ 被接受。如果您有 bug 反馈或建议,请提一个 issue 给我们。非常感谢!
API 的定义文件(`lib.wx.api.d.ts`)是随 [文档](https://developers.weixin.qq.com/miniprogram/dev/index.html) 一起自动生成的,如果发现了 API 接口的定义错误,请提一个 issue 给我们,关于 API 的 PR 将 __不会__ 被接受。
如果有针对页面(`Page`)、自定义组件(`Component`)等接口的 bug 和建议,欢迎 PR 或提一个 issue 给我们。非常感谢!
### 测试
本定义文件使用 [`dtslint`](https://github.com/Microsoft/dtslint) 进行测试,所有的测试样例放在 `test` 目录下。
想执行测试的话,克隆本项目并完成 `npm install --save-dev` 后执行 `npm test` 即可。
如果您发现了不能通过自动化测试的测试样例,可以提交 PR 或者提一个 issue。当然,能通过自动化测试的强有力的测试样例也是欢迎的。

@@ -78,3 +78,3 @@ /*! *****************************************************************************

? any[]
: T extends ObjectConstructor ? object : any
: T extends ObjectConstructor ? IAnyObject : any
interface FullProperty<T extends PropertyType> {

@@ -180,6 +180,20 @@ /** 属性类型 */

interface ComponentOptions {
/** 启用多slot支持 */
/**
* [启用多slot支持](https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/wxml-wxss.html#组件wxml的slot)
*/
multipleSlots?: boolean
/** https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/wxml-wxss.html#组件样式隔离 */
/**
* [组件样式隔离](https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/wxml-wxss.html#组件样式隔离)
*/
addGlobalClass?: boolean
/**
* [组件样式隔离](https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/wxml-wxss.html#组件样式隔离)
*/
styleIsolation?:
| 'isolated'
| 'apply-shared'
| 'shared'
| 'page-isolated'
| 'page-apply-shared'
| 'page-shared'
}

@@ -186,0 +200,0 @@

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