Skip to content

Commit ed41548

Browse files
committed
init (2.4.0)
1 parent 3f972da commit ed41548

File tree

7 files changed

+12946
-1
lines changed

7 files changed

+12946
-1
lines changed

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,15 @@
1-
# api-typings
1+
# Wechat MiniProgram API Typings
2+
23
Type definitions for APIs of Wechat Mini Program in TypeScript
4+
5+
## Install
6+
7+
```
8+
npm install miniprogram-api-typings
9+
```
10+
11+
or specify a base library version:
12+
13+
```
14+
npm install [email protected]
15+
```

package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "miniprogram-api-typings",
3+
"version": "2.4.0",
4+
"description": "Type definitions for APIs of Wechat Mini Program in TypeScript",
5+
"repository": {
6+
"type": "git",
7+
"url": "git+https://github.com/wechat-miniprogram/api-typings.git"
8+
},
9+
"author": "wechat-miniprogram",
10+
"license": "MIT",
11+
"bugs": {
12+
"url": "https://github.com/wechat-miniprogram/api-typings/issues"
13+
},
14+
"homepage": "https://github.com/wechat-miniprogram/api-typings#readme"
15+
}

types/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference path="./wx/index.d.ts" />

types/wx/index.d.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/// <reference path="./lib.wx.app.d.ts" />
2+
/// <reference path="./lib.wx.page.d.ts" />
3+
/// <reference path="./lib.wx.api.d.ts" />
4+
5+
declare type IAnyObject = Record<string, any>
6+
7+
declare type KVInfer<T> = {
8+
[K in keyof T]: T[K]
9+
}
10+
11+
declare type Void<T> = T | undefined | null
12+
type PartialOptional<T, K extends keyof T> = Partial<Pick<T, K>> & Pick<T, Exclude<keyof T, K>>
13+

0 commit comments

Comments
 (0)