Skip to content
This repository has been archived by the owner on Apr 21, 2020. It is now read-only.

[pull] master from wechat-miniprogram:master #3

Open
wants to merge 165 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
165 commits
Select commit Hold shift + click to select a range
f05af85
fix(api): fix some api type mistake
SgLy Jan 8, 2020
6113474
feat(baselib): definition for 2.10.1 and bug fix
SgLy Jan 19, 2020
36613f9
feat(page): 暴露 page 的 options
baranwang Feb 1, 2020
693d4ef
Merge pull request #101 from baranwang
SgLy Feb 10, 2020
abb25c0
fix: minor fixes, see below
SgLy Feb 10, 2020
f9af0f8
feat(baselib): definition for 2.10.2
SgLy Mar 6, 2020
94a01f9
feat(api): support api promisify in 2.10.2
SgLy Mar 18, 2020
4f12387
feat(baselib): definition for 2.10.3
SgLy Mar 26, 2020
806f66c
fix(component): getOpenerEventChannel
baranwang Mar 31, 2020
6cff144
Merge pull request #112 from baranwang/patch-1
SgLy Mar 31, 2020
dad454b
test: add openerEventChannel test
SgLy Mar 31, 2020
0e9121a
refactor: remove redundant defs
SgLy Mar 31, 2020
371dda6
feat(event): definition for event
mlzzen Apr 2, 2020
21e87e5
feat(event): import event
mlzzen Apr 2, 2020
0029275
Merge pull request #115 from zenml/master
SgLy Apr 3, 2020
f3d700b
feat: update cloud api
SgLy Apr 3, 2020
9ba99c2
Merge branch 'master' of https://github.com/wechat-miniprogram/api-ty…
SgLy Apr 3, 2020
9f70f56
chore: publish 2.10.3-1
SgLy Apr 3, 2020
cfe8a0c
fix(animation): fix animation.export() return types
Garfield550 Apr 18, 2020
207a536
feat(baselib): definition for 2.10.4
SgLy Apr 20, 2020
348b171
feat(baselib): definition for 2.11.0
SgLy May 21, 2020
1ae404c
fix: several bugs, see changelog for detail
SgLy Jun 15, 2020
3c473cb
2.11.0-1
wechat-miniprogram-admin Jul 15, 2020
1ee86dc
2.11.2-beta
wechat-miniprogram-admin Jul 15, 2020
33cf08f
2.11.2-beta
wechat-miniprogram-admin Jul 15, 2020
a00b89c
2.11.3-beta
wechat-miniprogram-admin Jul 17, 2020
41cfcde
2.11.3-beta
wechat-miniprogram-admin Jul 24, 2020
bdf14e9
2.12.0
wechat-miniprogram-admin Jul 28, 2020
97bd643
2.12.0
wechat-miniprogram-admin Jul 28, 2020
a36e18e
2.12.0
wechat-miniprogram-admin Jul 29, 2020
adb7d69
feat: bump version to 3.0.0
SgLy Jul 30, 2020
d7161a2
feat: update api tp baselib
SgLy Aug 3, 2020
89af833
fix: animate api issue
Mister-Hope Aug 17, 2020
37ac873
Merge pull request #145 from Mister-Hope/animate-fix
wechat-miniprogram-admin Aug 19, 2020
d35941e
Merge pull request #124 from Garfield550/master
wechat-miniprogram-admin Aug 19, 2020
cc0d4df
feat: regular bug fix and update
SgLy Aug 19, 2020
6be8dc9
feat: rebuild event type
Mister-Hope Aug 30, 2020
ca5df11
fix: RegionChange type issue
Mister-Hope Sep 3, 2020
ab11feb
feat: add onShareTimeline
Mister-Hope Sep 3, 2020
b70f3bd
fix: query is an Object
Mister-Hope Sep 3, 2020
b4bdf1a
Merge pull request #152 from Mister-Hope/page
SgLy Sep 17, 2020
14e9d7e
Merge pull request #151 from Mister-Hope/event
SgLy Sep 17, 2020
655e66f
docs: add contributors to readme
SgLy Sep 17, 2020
b24d8fc
style: format contributed code
Mister-Hope Sep 22, 2020
bcfbbad
style: migrate from tslint to eslint
SgLy Sep 22, 2020
0c0e86d
feat: update api to baselib 2.13.0
SgLy Sep 22, 2020
e930e54
doc: fix chinese in english readme
SgLy Sep 22, 2020
79ebe8b
refactor: nested namespace
SgLy Sep 24, 2020
07a400f
feat: support component as page
SgLy Sep 24, 2020
903ddd4
feat: update definition to baselib 2.13.1
SgLy Sep 30, 2020
61b6980
fix: type of query in ICustomTimelineContent
SgLy Oct 14, 2020
8f59fec
feat: update to baselib 2.13.2
SgLy Oct 28, 2020
6744f83
feat: update baselib
SgLy Oct 29, 2020
f704467
fix: requirePlugin && requireMiniProgram
SgLy Nov 4, 2020
c7fb54c
feat: update to baselib 2.14.0
SgLy Nov 13, 2020
43c0a22
feat: update baselib 2.14.1
SgLy Jan 8, 2021
0e75402
chore(deps): bump ini from 1.3.5 to 1.3.8
dependabot[bot] Jan 8, 2021
90e20af
docs: format markdown files and update links
Mister-Hope Jan 9, 2021
3894635
Merge pull request #179 from Mister-Hope/format-readme
SgLy Jan 11, 2021
6604bd2
ci: use github action
Mister-Hope Jan 12, 2021
d3b6436
style: use 4 tabs to pass the new linter
Mister-Hope Jan 12, 2021
8e89191
Merge pull request #172 from wechat-miniprogram/dependabot/npm_and_ya…
SgLy Jan 12, 2021
384b8d6
Merge pull request #182 from Mister-Hope/github-action
SgLy Jan 12, 2021
44c1fdb
fix: several promisified api
SgLy Jan 14, 2021
005756b
feat(component): add export function to other options
chs97 Jan 22, 2021
9bdcf28
Merge pull request #187 from chs97/types/components
SgLy Jan 22, 2021
5b107de
feat: update to 2.15.0 and bug fixes
SgLy Feb 22, 2021
0e72ac7
Merge branch 'master' of http://github.com/wechat-miniprogram/api-typ…
SgLy Feb 22, 2021
8dbf0fa
feat: update to 3.3.0
SgLy Mar 3, 2021
e3246bc
feat: update to baselib 2.16.0
SgLy Apr 9, 2021
15ac1fc
feat: update to baselib 2.16.1
SgLy Apr 21, 2021
a534f96
feat: update to baselib 2.18.0
SgLy Jul 2, 2021
151fb80
feat: add some test cases from doc
SgLy Jul 2, 2021
2222854
chore: update packages
SgLy Jul 2, 2021
95861ee
docs: update github actions badge
SgLy Jul 2, 2021
e966032
docs: add contributor
SgLy Jul 7, 2021
7590cd1
fix: #204 and #202
SgLy Jul 7, 2021
7595236
test: add a component type test
SgLy Jul 7, 2021
6177876
3.4.0
SgLy Jul 7, 2021
f810ac8
chore: add .npmrc
SgLy Jul 7, 2021
efde0cd
fix: remove unexpected char
SgLy Jul 7, 2021
6b07cf1
chore: bump to npm 3.4.1
SgLy Jul 7, 2021
08f64e6
chore: remove beta tag
SgLy Jul 7, 2021
eebdc03
feat: update baselib defs to 2.19.0
SgLy Aug 2, 2021
cba3766
refactor: improve comments
SgLy Aug 2, 2021
d8269ee
feat: update baselib defs to 2.19.2
SgLy Aug 24, 2021
dd6b9d3
feat: update baselib defs to 2.20.1
SgLy Oct 29, 2021
5dab2fb
feat: update baselib defs to 2.21.3
SgLy Jan 20, 2022
08f9ff4
feat: update baselib defs to 2.23.2
TtTRz Apr 1, 2022
36f991f
3.4.6
TtTRz Apr 1, 2022
006bfe2
fix: type fix
TtTRz Apr 2, 2022
aa73e6b
fix: hideToast optional args
TtTRz Apr 6, 2022
1cc8ccb
feat: update baselib defs to 2.24.6
SgLy Jun 24, 2022
0080a92
fix(page): Autocomplete IShareOption 'from' field
xieyhn Aug 1, 2022
13c21b7
feat: update version of tsd
SgLy Sep 9, 2022
b9c51b7
feat: update baselib defs to 2.26.0
SgLy Sep 9, 2022
5625675
fix(page): normalize IShareOption 'from' field
xieyhn Sep 14, 2022
37f4065
chore(ButtonGetPhoneNumber): improve types
okxiaoliang4 Nov 9, 2022
746ae44
feat: bump dependencies version
SgLy Dec 13, 2022
70f2dbd
feat: update baselib defs to 2.28.0
SgLy Dec 13, 2022
78986d1
feat: bump npm package version
SgLy Dec 13, 2022
507bdc7
feat: add missing scene-list (#269)
SgLy Dec 13, 2022
55344e1
feat: support xr-frame
SgLy Dec 13, 2022
9ab0c8b
Merge pull request #267 from okxiaoliang4/master
SgLy Dec 13, 2022
b60cb4b
Merge pull request #259 from haiya6/master
SgLy Dec 13, 2022
9abb5c0
feat: bump npm package version
SgLy Dec 13, 2022
36eb6a2
调整安装命令顺序
Megasu Dec 28, 2022
c4f4e7e
feat: update baselib defs to 2.29.1
SgLy Jan 12, 2023
daaffe5
style: fix
SgLy Apr 10, 2023
739a95c
feat: update baselib defs to 2.30.4
SgLy Apr 10, 2023
32e9a91
Update CHANGELOG.md
Megasu May 4, 2023
8367d7c
Merge pull request #287 from Megasu/patch-4
SgLy May 5, 2023
c0f01bb
Merge pull request #274 from Megasu/patch-1
SgLy May 5, 2023
f2fafa1
docs: update readme
SgLy May 5, 2023
82d28b6
feat: update to v2.32.2 & add canvas rendering context typings. close…
Tidyzq Jun 9, 2023
9136ba4
Merge pull request #292 from wechat-miniprogram/v2.32.2
SgLy Jun 9, 2023
c6e2285
chore: update npm version
SgLy Jun 9, 2023
a56354e
test: add test case for offscreenCanvas
SgLy Jun 9, 2023
9f9da24
feat: update to v3.0.0 and add WXWebAssembly
SgLy Aug 4, 2023
f7ab924
3.11.0
SgLy Aug 4, 2023
3076f88
docs: update date typo in CHANGELOG
SgLy Aug 4, 2023
3e2f8fb
feat: update baselib defs to 3.0.1
SgLy Aug 24, 2023
754672c
3.11.1
SgLy Aug 24, 2023
7c22bf6
fix: remove unintended invisible characters
SgLy Aug 24, 2023
7da83ca
fix: typing of referrerInfo in App#onShow and query in LaunchOptions
SgLy Aug 24, 2023
c20a945
3.12.0
SgLy Aug 24, 2023
fe39ffd
feat: bump lock by npm audit fix
SgLy Aug 24, 2023
a20a689
feat: update baselib defs to 3.1.2
SgLy Oct 17, 2023
5363e95
3.12.1
SgLy Oct 17, 2023
89ae58a
feat: update baselib defs to 3.2.3
SgLy Dec 5, 2023
9f98eb4
3.12.2
SgLy Dec 5, 2023
89e7dfe
feat: add missing types
yangmingshan Jan 25, 2024
6191ce5
fix: format
yangmingshan Jan 25, 2024
4864c77
Merge pull request #317 from yangmingshan/missing
SgLy Jun 26, 2024
74d2597
feat: update baselib defs to 3.3.3
SgLy Aug 8, 2024
fa965f6
docs: add contributor
SgLy Aug 8, 2024
77f276f
feat: update baselib defs to 3.5.2
SgLy Aug 8, 2024
6a7f4f9
3.12.3
SgLy Aug 8, 2024
c54c382
feat: supports the issues/331 mentioned in points 2, 3, 4
lv-z-l Sep 2, 2024
78a21eb
feat: issues/331 2,3,4 test case
lv-z-l Sep 2, 2024
40e11c6
feat: support behaviors mentioned in issues/331 point 1
lv-z-l Sep 3, 2024
8a05832
feat: comments resolve
lv-z-l Sep 3, 2024
14bb344
Merge branch 'master' into behavior-ts-support
lv-z-l Sep 3, 2024
5b43e54
revert: TCustomInstanceProperty
lv-z-l Sep 3, 2024
b9aacb6
revert: TCustomInstanceProperty
lv-z-l Sep 3, 2024
3a100d0
Merge branch 'master' into behavior-ts-support
lv-z-l Sep 3, 2024
7002da6
chore: remove useless comments
lv-z-l Sep 3, 2024
0a76c78
Merge pull request #332 from lv-z-l/master
SgLy Sep 3, 2024
56d3e56
Merge branch 'wechat-miniprogram:master' into behavior-ts-support
lv-z-l Sep 3, 2024
f78974b
chore: remove unuse comments
lv-z-l Sep 3, 2024
3af2210
feat: 优化实现
lv-z-l Sep 4, 2024
5e6a22b
feat: optimize the implementation of behavior type inference
lv-z-l Sep 5, 2024
57d4c82
feat: pull/333 issuecomment-2333434425 support
lv-z-l Sep 9, 2024
e940cb8
chore: resolve conversation
lv-z-l Sep 12, 2024
6b8e1d3
Merge pull request #333 from lv-z-l/behavior-ts-support
SgLy Sep 13, 2024
22eb0fe
fix: behavior data、properties、methods 没有全部存在时访问为定义的属性不报错问题修复
lv-z-l Sep 19, 2024
535264e
feat: rename
lv-z-l Sep 20, 2024
b7e6fe5
revert: package.json
lv-z-l Sep 20, 2024
32d8f29
Merge pull request #334 from lv-z-l/master
SgLy Sep 24, 2024
70a4db9
docs: 4.0.0
SgLy Sep 24, 2024
5c2b157
4.0.0
SgLy Sep 24, 2024
83e59b6
feat: update baselib defs to 3.5.7
SgLy Sep 24, 2024
4e9e50d
4.0.1
SgLy Sep 24, 2024
cfd31b5
fix: add RaycastHit
SgLy Nov 13, 2024
14df520
4.0.2
SgLy Nov 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json'
},
plugins: [
'@typescript-eslint',
],
rules: {
indent: ['error', 4],
'no-trailing-spaces': ['error'],
semi: ['off'],
'@typescript-eslint/semi': ['error', 'never'],
'@typescript-eslint/no-extra-semi': ['error'],
quotes: ['off'],
'@typescript-eslint/quotes': ['error', 'single'],
'@typescript-eslint/ban-ts-comment': ['off'],
'@typescript-eslint/adjacent-overload-signatures': ['error'],
'@typescript-eslint/ban-types': ['error', {
extendDefaults: true,
types: {
/**
* we are using `{}` as noop
* e.g. `type A<P> = B & (P extends Q ? C : {})`
* will get `B & C` when `P extends Q` and `B` otherwise
*/
'{}': false,
/**
* we actually need a type accepting any function-like value
* e.g. `type Methods = Record<string, Function>`
*/
'Function': false,
}
}],
'@typescript-eslint/member-delimiter-style': ['error', {
multiline: {
delimiter: 'none',
requireLast: false,
},
singleline: {
delimiter: 'comma',
requireLast: false
}
}],
'@typescript-eslint/naming-convention': ['error', {
selector: 'enum',
format: ['PascalCase', 'UPPER_CASE'],
leadingUnderscore: 'forbid',
trailingUnderscore: 'forbid',
}, {
selector: 'typeLike',
format: ['PascalCase'],
leadingUnderscore: 'forbid',
trailingUnderscore: 'forbid',
}],
'@typescript-eslint/array-type': ['error', {
default: 'array-simple',
readonly: 'array-simple'
}],
'@typescript-eslint/no-unnecessary-qualifier': ['error'],
},
}
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Test

on:
- push
- pull_request

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false

- name: restore node modules
uses: actions/cache@v2
id: node-modules-cache
with:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }}

- name: Install Deps
if: steps.node-modules-cache.outputs.cache-hit != 'true'
run: npm install

- name: Run test
run: npm run test
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry=https://registry.npmjs.org
4 changes: 0 additions & 4 deletions .travis.yml

This file was deleted.

222 changes: 211 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,213 @@
## 2024-11-13 v4.0.2
- 补齐 `RaycastHit` ([#337](https://github.com/wechat-miniprogram/api-typings/issues/337))

## 2024-09-24 v4.0.1
- 更新 API 定义到 3.5.7

## 2024-09-24 v4.0.0
合入 [#332](https://github.com/wechat-miniprogram/api-typings/pull/332), [#333](https://github.com/wechat-miniprogram/api-typings/pull/333), [#334](https://github.com/wechat-miniprogram/api-typings/pull/334) by [@lvzl](https://github.com/lv-z-l)。这几个 Pull Request 对 `Component` 和 `Behavior` 的实现进行了较大改动,以支持:
1. 对于 `Array` 和 `Object` 类型的 `property` 和 `data`,以值的实际类型作为泛型推导的结果,而非固定推导为 `any[]` 和 `Record<string, any>`;
2. 改变了 `BehaviorIdentifier` 的类型,通过为其交叉一个带有 `Behavior` 定义信息的虚假类型,使 `Component` 和 `Behavior` 能自动推导其使用到的 `Behavior` 的 `data`, `properties` 及 `methods`;

这是一个比较大的 **破坏性改动**,从低于 4.0.0 的版本升级时,可能需要进行一些适配:
1. 全局函数 `Component` 和 `Behavior` 的第四个泛型现在是新的 `TBehavior`,如果之前的代码中有为这两个函数手动指定泛型的用例,需要手动添加这个泛型;
2. `Behavior()` 的返回值不再是 `string`(或者说不完全是),之前使用 `string` 接受 `Behavior()` 返回值的实现需要修改为 `WechatMiniprogram.Behavior.BehaviorIdentifier`;
3. 自定义组件的 `this.data` 和 `this.property` 的推导类型可能会有所变化,需要根据推导类型进行响应改动。

## 2024-08-08 v3.12.3
- 更新 API 定义到 3.5.2
- 修复 [#235](https://github.com/wechat-miniprogram/api-typings/issues/235), [#302](https://github.com/wechat-miniprogram/api-typings/issues/302), [#303](https://github.com/wechat-miniprogram/api-typings/issues/303), [#304](https://github.com/wechat-miniprogram/api-typings/issues/304) by [@Yang Mingshan](https://github.com/yangmingshan)

## 2023-12-01 v3.12.2
- 更新 API 定义到 3.2.3

## 2023-10-17 v3.12.1
- 更新 API 定义到 3.1.2
- 补齐自定义组件实例的 `getPassiveEvent`, `setPassiveEvent` 方法

## 2023-08-24 v3.12.0
- `App` 生命周期 `onLaunch`, `onShow` 参数中的 `referrerInfo` 字段类型对齐 API 定义中的 `ReferrerInfo`。这是一个 **破坏性改动**,其中 `extraData` 的类型从 `any` 收窄到了 `Record<string, any>`
- 根据实际实现,修改了 `LaunchOptions` 中 `query` 字段的类型。这是一个 **破坏性改动**,该类型从 `Record<string, any>` 收窄到了 `Record<string, string>`

## 2023-08-24 v3.11.1
- 更新 API 定义到 3.0.1

## 2023-08-04 v3.11.0
- 更新 API 定义到 3.0.0
- 暂未支持 [glass-easel](https://github.com/wechat-miniprogram/glass-easel) [Chaining API](https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/glass-easel/chaining-api.html) 的类型定义
- 补齐 `WXWebAssembly` 定义

## 2023-06-09 v3.10.0
- 更新 API 定义到 2.32.1
- 新增 CanvasRenderingContext 类型定义 [#111](https://github.com/wechat-miniprogram/api-typings/issues/111)

## 2023-04-10 v3.9.1
- 更新 API 定义到 2.30.4
- 修复页面 `onShareAppMessage` 异步形式的定义错误

## 2023-01-12 v3.9.0
- 更新 API 定义到 2.29.1
- 将 xr-frame 的命名空间由 `WechatXrFrame` 改为 `XrFrame`。这是一个 **破坏性改动**

## 2022-09-09 v3.6.0
- 更新 API 定义到 2.26.0
- 更改了部分监听方法及其参数的命名

## 2022-06-24 v3.5.0
- 更新 API 定义到 2.24.6

## 2022-04-01 v3.4.6
- 更新 API 定义到 2.23.2

## 2022-01-20 v3.4.5
- 更新 API 定义到 2.21.3

## 2021-08-24 v3.4.4
- 更新 API 定义到 2.20.1

## 2021-08-24 v3.4.3
- 更新 API 定义到 2.19.2
- 补充自定义组件获取更新性能接口定义

## 2021-08-02 v3.4.2
- 更新 API 定义到 2.19.0
- 重新整理了注释,包括:
- 加入插件支持情况、版本和说明
- 将支持和废弃情况挪到前面,使其更不容易因为接口说明太长而被忽略
- 移除文首、文末和多余(连续超过两个)的空行
- 修复几个链接

## 2021-07-07 v3.4.1
- 移除一个意外加入的非预期字符

## 2021-07-07 v3.4.0
- 更新 API 定义到 2.18.0
- 更新来自文档代码示例的测试用例
- 更新 npm 依赖以解决安全问题
- 修复 [#202](https://github.com/wechat-miniprogram/api-typings/issues/202), [#204](https://github.com/wechat-miniprogram/api-typings/issues/204)

## 2021-04-21 v3.3.2
- 更新 API 定义到 2.16.1

## 2021-04-09 v3.3.1
- 更新 API 定义到 2.16.0

## 2021-03-02 v3.3.0
- 更新部分新接口定义
- 支持泛型([#177](https://github.com/wechat-miniprogram/api-typings/issues/177))
- 支持索引签名,以支持 `wx.requestSubscribeMessage`([#175](https://github.com/wechat-miniprogram/api-typings/issues/175))

## 2021-02-22 v3.2.3
- 更新 API 定义到 2.15.0
- 修复 `Component.triggerEvent` 的 `detail` 类型
- 修复几个接口的定义([#193](https://github.com/wechat-miniprogram/api-typings/issues/193), [#185](https://github.com/wechat-miniprogram/api-typings/issues/185), [#180](https://github.com/wechat-miniprogram/api-typings/issues/180))
- 修改 `MethodOption` 以解决 [#161](https://github.com/wechat-miniprogram/api-typings/issues/161)(鸣谢:[@Lienviws](https://github.com/Lienviws))

## 2021-01-14 v3.2.2
- 修复几个接口未 Promise 化的问题

## 2021-01-06 v3.2.1
- 更新 API 定义到 2.14.1
- 补齐 `virtualHost` ([#174](https://github.com/wechat-miniprogram/api-typings/issues/174))

## 2020-11-13 v3.2.0
- 更新 API 定义到 2.14.0
- 补齐 NFC 接口的错误码

## 2020-11-04 v3.1.6
- 补齐 `requirePlugin` 和 `requireMiniProgram`

## 2020-10-29 v3.1.5
- 更新 API 定义
- 修复代码格式问题(`no-unnecessary-qualifier`)

## 2020-10-28 v3.1.4
- 更新 API 定义到 2.13.2
- 为被废弃的接口增加了 `@deprecated` 标识

## 2020-10-14 v3.1.3
- 修复 `ICustomTimelineContent` 的 `query` 的类型

## 2020-09-30 v3.1.2
- 更新 API 定义到 2.13.1

## 2020-09-24 v3.1.1
- 更新 API 定义到 2.13.0
- 改变了嵌套命名空间的写法
- 支持 `Component` 的第五个泛型参数,用于将自定义组件作为页面根组件使用的情况

## 2020-09-22 v3.1.0
- 将代码风格检查从 tslint 迁移到 eslint

## 2020-08-19 v3.0.2
- 更新 API 定义
- 合并 PR [#151](https://github.com/wechat-miniprogram/api-typings/pull/151), [#152](https://github.com/wechat-miniprogram/api-typings/pull/152),补齐事件类型,补齐 `onShareTimeline`

## 2020-08-19 v3.0.2
- 更新 API 定义
- 合并 PR [#124](https://github.com/wechat-miniprogram/api-typings/pull/124), [#145](https://github.com/wechat-miniprogram/api-typings/pull/145),修复两个动画接口的问题

## 2020-08-03 v3.0.1
- 更新 API 定义
- 修复某些取消监听的接口(`off`)的参数不为可选值的问题

## 2020-07-30 v3.0.0
- 由于基础库接口基本向前兼容,不再与基础库保持版本同步
- 更新 API 定义到 2.12.0

## 2020-06-15 v2.11.0-1
- 该版本继续合并了一部分完全相同的 interface / callback,是一个 **破坏性改动**,原本字面上引用了这些 interface / callback 的代码可能会报错。
- 为 `Component` 构造器增加第四个泛型,以允许在自定义组件上挂载自定义的字段 ([#133](https://github.com/wechat-miniprogram/api-typings/issues/133))
- 修复一些接口错误 ([#134](https://github.com/wechat-miniprogram/api-typings/issues/134))
- 补齐 `App` 的 `onThemeChange` ([#135](https://github.com/wechat-miniprogram/api-typings/issues/135))
- 补齐 `Page` 的 `onAddToFavorites` ([#136](https://github.com/wechat-miniprogram/api-typings/issues/136))

## 2020-05-20 v2.11.0
- 同步 API 定义到基础库 2.11.0
- 该版本继续合并了一部分完全相同的 interface / callback,是一个 **破坏性改动**,原本字面上引用了这些 interface / callback 的代码可能会报错。
- 修复接口错误 ([#126](https://github.com/wechat-miniprogram/api-typings/issues/126))

## 2020-04-20 v2.10.4
- 同步 API 定义到基础库 2.10.4
- 在之前的版本中,分属于不同接口的两个 interface / callback 即使完全相同,也会拥有不同的名字。在这次更新中,他们将合并为同一个(如 `FileSystemManagerGetFileInfoCompleteCallback` 和 `WxGetFileInfoCompleteCallback` 都变成了 `GetFileInfoCompleteCallback`)。这是一个 **破坏性改动**,原本字面上引用了这些 interface / callback 的代码可能会报错。
- 修复了一些取消监听接口(off callback)的参数错误 ([#120](https://github.com/wechat-miniprogram/api-typings/issues/120))

## 2020-04-03 v2.10.3-1
- 补齐 `Component` 的 `getOpenerEventChannel` ([#112](https://github.com/wechat-miniprogram/api-typings/issues/113) by [@baranwang](https://github.com/baranwang))
- 加入了部分事件的定义 ([#115](https://github.com/wechat-miniprogram/api-typings/issues/115) by [@zenml](https://github.com/zenml))
- 更新了小程序·云开发的 API 定义 ([#92](https://github.com/wechat-miniprogram/api-typings/issues/92))

## 2020-03-26 v2.10.3
- 同步 API 定义到基础库 2.10.3

## 2020-03-18 v2.10.2-1
- 支持 API Promise 化调用 ([#105](https://github.com/wechat-miniprogram/api-typings/issues/105))

## 2020-03-06 v2.10.2
- 同步 API 定义到基础库 2.10.2

## 2020-02-10 v2.10.1-1
- 允许重写部分全局变量 (由 `const` 改为 `let`) ([#102](https://github.com/wechat-miniprogram/api-typings/issues/102))
- 补齐 `Page` 上的 `options` 字段 ([#101](https://github.com/wechat-miniprogram/api-typings/issues/101) by [@baranwang](https://github.com/baranwang))

## 2020-01-19 v2.10.1
- 同步 API 定义到基础库 2.10.1
- 补齐 `Component` `selectOwnerComponent`, `animate`, `clearAnimation` ([#96](https://github.com/wechat-miniprogram/api-typings/issues/96))
- 补齐 `App` `onUnhandledRejection` ([#99](https://github.com/wechat-miniprogram/api-typings/issues/99))

## 2020-01-07 v2.10.0-1
- 修复接口错误 ([#95](https://github.com/wechat-miniprogram/api-typings/issues/95))

## 2020-01-07 v2.10.0
- 同步 API 定义到基础库 2.10.0

## 2019-12-20 v2.9.4
- 同步 API 定义到基础库 2.9.4
- 修正一些接口错误#88#89#91
- 修正一些接口错误 ([#88](https://github.com/wechat-miniprogram/api-typings/issues/88),[#89](https://github.com/wechat-miniprogram/api-typings/issues/89),[#91](https://github.com/wechat-miniprogram/api-typings/issues/91))

## 2019-12-06 v2.9.3
- 同步 API 定义到基础库 2.9.3
- 补齐 `Component` 纯数据字段`pureDataPattern`
- 补齐 `Component` 纯数据字段 (`pureDataPattern`)
- 支持 `Component` 的属性监听器使用 `string` 类型

## 2019-11-14 v2.9.2
Expand All @@ -22,17 +222,17 @@

## 2019-10-10 v2.8.3-1
- 修复注释文档中不可用的链接
- 组件实例类型支持 `Partial` 的自定义方法[用例](https://github.com/wechat-miniprogram/api-typings/blob/master/test/issue.test.ts#L170-L185)
- 组件实例类型支持 `Partial` 的自定义方法 ([用例](https://github.com/wechat-miniprogram/api-typings/blob/master/test/issue.test.ts#L170-L185))

## 2019-09-19 v2.8.3
- 同步 API 定义到基础库 2.8.3
- `getApp` 支持范型#77
- 修正一些接口错误#73, #75, #79
- `getApp` 支持范型 ([#77](https://github.com/wechat-miniprogram/api-typings/issues/77))
- 修正一些接口错误 ([#73](https://github.com/wechat-miniprogram/api-typings/issues/73), [#75](https://github.com/wechat-miniprogram/api-typings/issues/75), [#79](https://github.com/wechat-miniprogram/api-typings/issues/79))
- 补齐 `require`, `exports`, `module.exports` 定义,以支持在没有 `@types/node` 下编译

## 2019-09-10 v2.8.2
- 同步 API 定义到基础库 2.8.2
- 加强了参数为可选值的方法参数类型定义和注释如 `FileSystemManager.appendFileSync` 的 `encoding`
- 加强了参数为可选值的方法参数类型定义和注释 (如 `FileSystemManager.appendFileSync` 的 `encoding`)

## 2019-08-30 v2.8.1
- 同步 API 定义到基础库 2.8.1
Expand All @@ -56,19 +256,19 @@
- 不再向全局暴露 `IAnyObject`,收回到命名空间 `WechatMiniprogram` 内
- 对齐代码规范,使用 4 空格缩进,不再使用分号等
- 小幅改动 behavior, component 和 page 的定义,使其对 data 和 properties 等的类型推断更准确
- 修复了一些其他问题#60, #59, #48, #47, #45, #33, #13
- 修复了一些其他问题 ([#60](https://github.com/wechat-miniprogram/api-typings/issues/60), [#59](https://github.com/wechat-miniprogram/api-typings/issues/59), [#48](https://github.com/wechat-miniprogram/api-typings/issues/48), [#47](https://github.com/wechat-miniprogram/api-typings/issues/47), [#45](https://github.com/wechat-miniprogram/api-typings/issues/45), [#33](https://github.com/wechat-miniprogram/api-typings/issues/33), [#13](https://github.com/wechat-miniprogram/api-typings/issues/13))

## 2019-08-08 v2.7.7-2

- 补齐了部分接口 fail 回调的错误码#51
- 补齐了部分接口 fail 回调的错误码 ([#51](https://github.com/wechat-miniprogram/api-typings/issues/51))

## 2019-08-06 v2.7.7-1

- 重写了 page, component 和 behavior 的定义,替换原来不完整的定义,使其更全面,更准确#46, #40, #30, #28, #27
- 重写了 page, component 和 behavior 的定义,替换原来不完整的定义,使其更全面,更准确 ([#46](https://github.com/wechat-miniprogram/api-typings/issues/46), [#40](https://github.com/wechat-miniprogram/api-typings/issues/40), [#30](https://github.com/wechat-miniprogram/api-typings/issues/30), [#28](https://github.com/wechat-miniprogram/api-typings/issues/28), [#27](https://github.com/wechat-miniprogram/api-typings/issues/27))

## 2019-07-31 v2.7.7

- 同步 API 定义到基础库 2.7.7
- 将命名空间从 `Wx` 更改为更正式的 `WechatMiniprogram`,这是一个 **破坏性改动**,原本字面上引用了 `Wx` 命名空间的代码可能失效
- 修复了云开发的定义无法使用的问题#25, #32, #42
- 修复了一些其它问题#11, #35, #43)
- 修复了云开发的定义无法使用的问题 ([#25](https://github.com/wechat-miniprogram/api-typings/issues/25), [#32](https://github.com/wechat-miniprogram/api-typings/issues/32), [#42](https://github.com/wechat-miniprogram/api-typings/issues/42))
- 修复了一些其它问题 ([#11](https://github.com/wechat-miniprogram/api-typings/issues/11), [#35](https://github.com/wechat-miniprogram/api-typings/issues/35), [#43](https://github.com/wechat-miniprogram/api-typings/issues/43))
Loading