typed-we-app

1.7.0-update.9 • Public • Published

typed-we-app

TypeScript declaration file for WeApp API

NPM

Install

  • With npm installed

    npm install typed-we-app --save-dev
  • With typings installed

    typings install github:Emeryao/typed-we-app -SG
  • Or get the declaration file here and include it to your project

About

Based on the official WeApp API documentation
Wechat Web DevTool Version 1.01.1712150
WAService.js Version 1.7.0

Sample

  • TypeScript
wx.request({
    url: 'request/url',
    success: (res) => {
        console.log(res.data);
    }
});
 
let ctx = wx.createCanvasContext();
ctx.fillText('hello', 0, 0);
 
let actions = ctx.getActions();
wx.drawCanvas({
    canvasId: 'canvas-id',
    actions 
});
 
wx.getBLEDeviceServices({
    deviceId: '',
    success: (res) => {
        console.log(res.services[0].uuid);
    },
});

Last Update

2019.05.19

Package Sidebar

Install

npm i typed-we-app

Weekly Downloads

1

Version

1.7.0-update.9

License

MIT

Unpacked Size

90 kB

Total Files

5

Last publish

Collaborators

  • emeryao