王大坤 e3db69ca94 首次更新 hai 1 ano
..
types e3db69ca94 首次更新 hai 1 ano
CHANGELOG.md e3db69ca94 首次更新 hai 1 ano
LICENSE e3db69ca94 首次更新 hai 1 ano
README-en.md e3db69ca94 首次更新 hai 1 ano
README.md e3db69ca94 首次更新 hai 1 ano
index.d.ts e3db69ca94 首次更新 hai 1 ano
package-lock.json e3db69ca94 首次更新 hai 1 ano
package.json e3db69ca94 首次更新 hai 1 ano
typings.json e3db69ca94 首次更新 hai 1 ano

README-en.md

Wechat Mini Program API Typings

中文版本

Published on DefinitelyTyped Published on NPM MIT License GitHub Actions Test Status

Type definitions for APIs of Wechat Mini Program in TypeScript

Install

By DefinitelyTyped

npm install @types/wechat-miniprogram

or:

By standalone npm package

npm install miniprogram-api-typings

Manually import it after installed:

  • import 'miniprogram-api-typings';

Or specify types in typescript config:

  • Specify types: ["miniprogram-api-typings"] in tsconfig.json

Or reference by Triple-Slash Directives:

  • /// <reference path="node_modules/miniprogram-api-typings/index.d.ts" />

Changelog

See CHANGELOG.md (Chinese only)

Contribution

Definitions of Wechat APIs (lib.wx.api.d.ts) are auto-generated together with our documentations, 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!

Contributors

Automated tests

We use tsd 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.