Handy_Cao 93a1cc30f9 提交代码 3 năm trước cách đây
..
types 93a1cc30f9 提交代码 3 năm trước cách đây
CHANGELOG.md 93a1cc30f9 提交代码 3 năm trước cách đây
LICENSE 93a1cc30f9 提交代码 3 năm trước cách đây
README-en.md 93a1cc30f9 提交代码 3 năm trước cách đây
README.md 93a1cc30f9 提交代码 3 năm trước cách đây
VERSIONS.md 93a1cc30f9 提交代码 3 năm trước cách đây
index.d.ts 93a1cc30f9 提交代码 3 năm trước cách đây
package.json 93a1cc30f9 提交代码 3 năm trước cách đây
typings.json 93a1cc30f9 提交代码 3 năm trước cách đây

README-en.md

Wechat MiniGame API Typings

中文版本

Published on NPM MIT License GitHub Actions Test Status

Type definitions for APIs of Wechat Mini Game in TypeScript

Install

Install by NPM:

npm install minigame-api-typings

Manually import it after installed:

  • import 'minigame-api-typings';

Or specify types in typescript config:

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

Or reference by Triple-Slash Directives:

  • /// <reference path="node_modules/minigame-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.

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.