@lemon-fe/mini-app 1.1.5 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/global.d.ts CHANGED
@@ -45,8 +45,8 @@ declare const bridge: {
45
45
  success?: () => void;
46
46
  params: 'default' | 'light-content' | 'dark-content';
47
47
  }): void;
48
- getUserInfo(opts: {
49
- success?: ((user: UserInfo) => void) | undefined;
48
+ getUserInfo<T = UserInfo>(opts: {
49
+ success?: ((user: T) => void) | undefined;
50
50
  }): void;
51
51
  getAccessToken(opts: {
52
52
  success?: ((token: string | null) => void) | undefined;
@@ -141,8 +141,8 @@ export declare const mini: {
141
141
  success?: () => void;
142
142
  params: 'default' | 'light-content' | 'dark-content';
143
143
  }) => void;
144
- getUserInfo: (opts: {
145
- success?: ((user: UserInfo) => void) | undefined;
144
+ getUserInfo: <T = UserInfo>(opts: {
145
+ success?: ((user: T) => void) | undefined;
146
146
  }) => void;
147
147
  getAccessToken: (opts: {
148
148
  success?: ((token: string | null) => void) | undefined;
package/es/global.js CHANGED
@@ -155,9 +155,7 @@ var bridge = {
155
155
  * @param opts
156
156
  */
157
157
  syncRoutes: function syncRoutes(opts) {
158
- bridge.methodRegister(SYNC_ROUTES, {
159
- params: opts
160
- });
158
+ bridge.methodRegister(SYNC_ROUTES, opts);
161
159
  },
162
160
 
163
161
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lemon-fe/mini-app",
3
- "version": "1.1.5",
3
+ "version": "1.2.0",
4
4
  "description": "> TODO: description",
5
5
  "author": "鲁盛杰 <lusj@cnlemon.net>",
6
6
  "homepage": "",
@@ -31,5 +31,5 @@
31
31
  "react": "^17.0.2",
32
32
  "react-dom": "17.0.2"
33
33
  },
34
- "gitHead": "e4b6e1f4d04b766d37ab7e5914bc7a5e02f0eb9c"
34
+ "gitHead": "a2027e9e0d57e66684b9fbe3478cd42e1ec18cad"
35
35
  }