# mp-promise
**Repository Path**: yuanguolu/mp-promise
## Basic Information
- **Project Name**: mp-promise
- **Description**: No description available
- **Primary Language**: TypeScript
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-01-05
- **Last Updated**: 2020-12-19
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# mp-promise
api promisify
# Installation
```
npm install --save mp-promise
```
# Getting started
💨example:
``` typescript
import { promisifyAll, promisify } from 'mp-promise';
const asyncApi = promisifyAll(api)
const asyncFunc = promisify(func)
```
# WechatMiniprogram Example
``` typescript
// typings/index.d.ts
///
type WxApi = Omit;
declare namespace WechatMiniprogram {
interface Wx {
wxp: OmitNever>;
}
}
// miniprogram/app.ts
import { promisifyAll } from "mp-promise";
wx.wxp = promisifyAll(wx);
```