@mpxjs/core 2.8.4 → 2.8.5
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/@types/index.d.ts +10 -11
- package/package.json +2 -2
package/@types/index.d.ts
CHANGED
|
@@ -7,19 +7,10 @@
|
|
|
7
7
|
/// <reference path="./global.d.ts" />
|
|
8
8
|
/// <reference path="./node.d.ts" />
|
|
9
9
|
|
|
10
|
-
// @ts-ignore
|
|
11
|
-
import VueI18n from 'vue-i18n'
|
|
12
|
-
|
|
13
10
|
import type { GetComputedType } from '@mpxjs/store'
|
|
14
11
|
|
|
15
12
|
export * from '@mpxjs/store'
|
|
16
13
|
|
|
17
|
-
declare module 'vue-i18n' {
|
|
18
|
-
export default interface VueI18n {
|
|
19
|
-
mergeMessages (messages: { [index: string]: VueI18n.LocaleMessageObject }): void;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
14
|
// utils
|
|
24
15
|
type ObjectOf<T> = {
|
|
25
16
|
[key: string]: T
|
|
@@ -428,7 +419,7 @@ type WatchSource<T> =
|
|
|
428
419
|
| (() => T) // getter
|
|
429
420
|
| ComputedRef<T>
|
|
430
421
|
|
|
431
|
-
|
|
422
|
+
type MultiWatchSources = (WatchSource<unknown> | object)[]
|
|
432
423
|
|
|
433
424
|
interface WatchEffectOptions {
|
|
434
425
|
flush?: 'pre' | 'post' | 'sync' // default: 'pre'
|
|
@@ -528,7 +519,15 @@ export function watchPostEffect (
|
|
|
528
519
|
options?: WatchEffectOptions
|
|
529
520
|
): void
|
|
530
521
|
|
|
531
|
-
|
|
522
|
+
|
|
523
|
+
export function watch<T extends MultiWatchSources> (
|
|
524
|
+
sources: [...T],
|
|
525
|
+
callback: WatchCallback<{
|
|
526
|
+
[K in keyof T]: T[K] extends WatchSource<infer V> ? V : T[K] extends object ? T[K] : never
|
|
527
|
+
}>,
|
|
528
|
+
options?: WatchOptions
|
|
529
|
+
): () => void
|
|
530
|
+
export function watch<T extends Readonly<MultiWatchSources>> (
|
|
532
531
|
sources: T,
|
|
533
532
|
callback: WatchCallback<{
|
|
534
533
|
[K in keyof T]: T[K] extends WatchSource<infer V> ? V : T[K] extends object ? T[K] : never
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mpxjs/core",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.5",
|
|
4
4
|
"description": "mpx runtime core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"miniprogram",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"url": "https://github.com/didi/mpx/issues"
|
|
48
48
|
},
|
|
49
49
|
"sideEffects": false,
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "c4cb7f7244d13a59535891acf02c347960c52343"
|
|
51
51
|
}
|