Skip to content

Commit

Permalink
Merge pull request #95 from wechat-miniprogram/feat-use-api-typing
Browse files Browse the repository at this point in the history
feat: using miniprogram-api-typing instead of @types/wechat-miniprogram
  • Loading branch information
SgLy committed Sep 15, 2023
2 parents f5a8faa + 6b5f1ae commit dc2d5b3
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 25 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

26 changes: 7 additions & 19 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"@swc/core": "^1.2.80",
"@types/jest": "^27.0.1",
"@types/rfdc": "^1.1.0",
"@types/wechat-miniprogram": "^3.0.0",
"@typescript-eslint/eslint-plugin": "^2.23.0",
"@typescript-eslint/parser": "^2.23.0",
"codecov": "^3.7.0",
Expand All @@ -55,6 +54,7 @@
"gulp-watch": "^5.0.1",
"husky": "^7.0.2",
"jest": "^27.0.6",
"miniprogram-api-typings": "^3.12.0",
"miniprogram-exparser": "^2.11.2",
"miniprogram-simulate": "^1.2.9",
"prettier": "^2.0.1",
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'miniprogram-api-typings'

import { behavior } from './behavior'

export { behavior } from './behavior'
Expand Down
2 changes: 2 additions & 0 deletions test/utils.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/// <reference types="node" />

import path from 'path'
import simulate from 'miniprogram-simulate'
import exparser from 'miniprogram-exparser'
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"declaration": true,
"declarationDir": "./types",
"emitDeclarationOnly": true,
"skipLibCheck": true
"types": ["jest", "rfdc"]
},
"include": ["./src/**/*.ts"]
}
4 changes: 1 addition & 3 deletions types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/// <reference types="wechat-miniprogram" />
/// <reference types="wechat-miniprogram" />
/// <reference types="wechat-miniprogram" />
import 'miniprogram-api-typings';
export { behavior } from './behavior';
declare type ComputedInstance<D extends WechatMiniprogram.Component.DataOption, P extends WechatMiniprogram.Component.PropertyOption, M extends WechatMiniprogram.Component.MethodOption, C extends Record<string, (data: D & {
[K in keyof P]: any;
Expand Down

0 comments on commit dc2d5b3

Please sign in to comment.