Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wechat-miniprogram/minigame-api-typings
Type definitions for APIs of Wechat Mini Game in TypeScript
https://github.com/wechat-miniprogram/minigame-api-typings
Last synced: 6 days ago
JSON representation
Type definitions for APIs of Wechat Mini Game in TypeScript
- Host: GitHub
- URL: https://github.com/wechat-miniprogram/minigame-api-typings
- Owner: wechat-miniprogram
- License: mit
- Created: 2019-04-16T12:46:42.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-09T12:35:17.000Z (3 months ago)
- Last Synced: 2024-12-21T09:04:51.697Z (13 days ago)
- Language: TypeScript
- Homepage: https://developers.weixin.qq.com/minigame/dev/guide/
- Size: 1.47 MB
- Stars: 132
- Watchers: 12
- Forks: 26
- Open Issues: 12
-
Metadata Files:
- Readme: README-en.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Wechat MiniGame API Typings
> [中文版本](./README.md)
[![Published on NPM](https://img.shields.io/npm/v/minigame-api-typings.svg?style=flat)](https://www.npmjs.com/package/minigame-api-typings)
[![MIT License](https://img.shields.io/github/license/wechat-miniprogram/minigame-api-typings.svg)](https://github.com/wechat-miniprogram/minigame-api-typings)
[![GitHub Actions Test Status](https://github.com/wechat-miniprogram/minigame-api-typings/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/wechat-miniprogram/minigame-api-typings/actions/workflows/test.yml)Type definitions for APIs of Wechat Mini Game in TypeScript
## Install
Install by NPM:
```bash
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](https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html):
- `/// `## Changelog
See [CHANGELOG.md](https://github.com/wechat-miniprogram/minigame-api-typings/blob/master/CHANGELOG.md) (Chinese only)
## Contribution
Definitions of Wechat APIs (`lib.wx.api.d.ts`) are auto-generated together with our [documentations](https://developers.weixin.qq.com/minigame/en/dev/api/), 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`](https://github.com/SamVerschueren/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.