@dcloudio/uni-app-x 0.4.2 → 0.4.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-app-x",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "uni-app x types",
5
5
  "typings": "index.d.ts",
6
6
  "author": "DCloud",
@@ -1,16 +1,5 @@
1
- export interface AsyncApiResult {
2
- errMsg: string
3
- }
4
-
5
1
  export interface AsyncApiSuccessResult extends AsyncApiResult {}
6
2
 
7
- export interface UniError extends AsyncApiResult {
8
- errCode: number
9
- errSubject: string
10
- data: any | null
11
- cause: any | null
12
- }
13
-
14
3
  export type OnLaunchOptions = {
15
4
  path: string
16
5
  }
@@ -1,4 +1,4 @@
1
- import { AsyncApiResult, AsyncApiSuccessResult, UniError } from '../interface'
1
+ import { AsyncApiSuccessResult } from '../interface'
2
2
 
3
3
  export type NavigateTo = (options: NavigateToOptions) => void
4
4
  /**
@@ -129,7 +129,7 @@ export type SwitchTabOptions = {
129
129
  */
130
130
  complete?: SwitchTabCompleteCallback | null
131
131
  }
132
- export type NavigateBack = (options: NavigateBackOptions) => void
132
+ export type NavigateBack = (options: NavigateBackOptions | null) => void
133
133
  export type NavigateBackSuccess = AsyncApiSuccessResult
134
134
  type NavigateBackSuccessCallback = (result: NavigateBackSuccess) => void
135
135
  export type NavigateBackFail = UniError
@@ -1,8 +1,4 @@
1
- import {
2
- AsyncApiResult,
3
- AsyncApiSuccessResult,
4
- UniError
5
- } from '../../interface'
1
+ import { AsyncApiSuccessResult } from '../../interface'
6
2
 
7
3
  export type LoadFontFaceOptionDesc = {
8
4
  style: string | null
@@ -1,8 +1,4 @@
1
- import {
2
- AsyncApiResult,
3
- AsyncApiSuccessResult,
4
- UniError
5
- } from '../../interface'
1
+ import { AsyncApiSuccessResult } from '../../interface'
6
2
 
7
3
  export type PageScrollTo = (options: PageScrollToOptions) => void
8
4
  export type PageScrollToSuccess = AsyncApiSuccessResult
@@ -10,7 +6,9 @@ export type PageScrollToSuccessCallback = (result: PageScrollToSuccess) => void
10
6
  export type PageScrollToFail = UniError
11
7
  export type PageScrollToFailCallback = (result: PageScrollToFail) => void
12
8
  export type PageScrollToComplete = AsyncApiResult
13
- export type PageScrollToCompleteCallback = (result: PageScrollToComplete) => void
9
+ export type PageScrollToCompleteCallback = (
10
+ result: PageScrollToComplete
11
+ ) => void
14
12
  export type PageScrollToOptions = {
15
13
  /**
16
14
  * 滚动到页面的目标位置
@@ -1,11 +1,7 @@
1
- import {
2
- AsyncApiResult,
3
- AsyncApiSuccessResult,
4
- UniError
5
- } from '../../interface'
1
+ import { AsyncApiSuccessResult } from '../../interface'
6
2
 
7
3
  export type StartPullDownRefresh = (
8
- options: StartPullDownRefreshOptions
4
+ options: StartPullDownRefreshOptions | null
9
5
  ) => void
10
6
  export type StartPullDownRefreshOptions = {
11
7
  /**
@@ -1,8 +1,4 @@
1
- import {
2
- AsyncApiResult,
3
- AsyncApiSuccessResult,
4
- UniError
5
- } from '../../interface'
1
+ import { AsyncApiSuccessResult } from '../../interface'
6
2
 
7
3
  export type SetNavigationBarColorOptions = {
8
4
  /**
@@ -1,8 +1,4 @@
1
- import {
2
- AsyncApiResult,
3
- AsyncApiSuccessResult,
4
- UniError
5
- } from '../../interface'
1
+ import { AsyncApiSuccessResult } from '../../interface'
6
2
 
7
3
  export type SetTabBarBadge = (options: SetTabBarBadgeOptions) => void
8
4
  export type SetTabBarBadgeSuccess = AsyncApiSuccessResult
@@ -262,7 +258,7 @@ export type SetTabBarStyleOptions = {
262
258
  complete?: SetTabBarStyleCompleteCallback
263
259
  }
264
260
 
265
- export type HideTabBar = (options: HideTabBarOptions) => void
261
+ export type HideTabBar = (options: HideTabBarOptions | null) => void
266
262
  export type HideTabBarSuccess = AsyncApiSuccessResult
267
263
  export type HideTabBarSuccessCallback = (result: HideTabBarSuccess) => void
268
264
  export type HideTabBarFail = UniError
@@ -288,7 +284,7 @@ export type HideTabBarOptions = {
288
284
  complete?: HideTabBarCompleteCallback
289
285
  }
290
286
 
291
- export type ShowTabBar = (options: ShowTabBarOptions) => void
287
+ export type ShowTabBar = (options: ShowTabBarOptions | null) => void
292
288
  export type ShowTabBarSuccess = AsyncApiSuccessResult
293
289
  export type ShowTabBarSuccessCallback = (result: ShowTabBarSuccess) => void
294
290
  export type ShowTabBarFail = UniError