mobx 6.3.6 → 6.3.7
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/CHANGELOG.md +6 -0
- package/dist/api/intercept.d.ts +4 -4
- package/dist/api/observe.d.ts +3 -3
- package/dist/mobx.cjs.development.js.map +1 -1
- package/dist/mobx.cjs.production.min.js.map +1 -1
- package/dist/mobx.esm.development.js.map +1 -1
- package/dist/mobx.esm.js.map +1 -1
- package/dist/mobx.esm.production.min.js.map +1 -1
- package/dist/mobx.umd.development.js.map +1 -1
- package/dist/mobx.umd.production.min.js.map +1 -1
- package/package.json +1 -1
- package/src/api/intercept.ts +4 -4
- package/src/api/observe.ts +4 -3
package/package.json
CHANGED
package/src/api/intercept.ts
CHANGED
|
@@ -24,15 +24,15 @@ export function intercept<T>(
|
|
|
24
24
|
handler: IInterceptor<IArrayWillChange<T> | IArrayWillSplice<T>>
|
|
25
25
|
): Lambda
|
|
26
26
|
export function intercept<K, V>(
|
|
27
|
-
observableMap: ObservableMap<K, V>,
|
|
27
|
+
observableMap: ObservableMap<K, V> | Map<K, V>,
|
|
28
28
|
handler: IInterceptor<IMapWillChange<K, V>>
|
|
29
29
|
): Lambda
|
|
30
30
|
export function intercept<V>(
|
|
31
|
-
|
|
31
|
+
observableSet: ObservableSet<V> | Set<V>,
|
|
32
32
|
handler: IInterceptor<ISetWillChange<V>>
|
|
33
33
|
): Lambda
|
|
34
34
|
export function intercept<K, V>(
|
|
35
|
-
observableMap: ObservableMap<K, V>,
|
|
35
|
+
observableMap: ObservableMap<K, V> | Map<K, V>,
|
|
36
36
|
property: K,
|
|
37
37
|
handler: IInterceptor<IValueWillChange<V>>
|
|
38
38
|
): Lambda
|
|
@@ -40,7 +40,7 @@ export function intercept(object: object, handler: IInterceptor<IObjectWillChang
|
|
|
40
40
|
export function intercept<T extends object, K extends keyof T>(
|
|
41
41
|
object: T,
|
|
42
42
|
property: K,
|
|
43
|
-
handler: IInterceptor<IValueWillChange<
|
|
43
|
+
handler: IInterceptor<IValueWillChange<T[K]>>
|
|
44
44
|
): Lambda
|
|
45
45
|
export function intercept(thing, propOrHandler?, handler?): Lambda {
|
|
46
46
|
if (isFunction(handler)) return interceptProperty(thing, propOrHandler, handler)
|
package/src/api/observe.ts
CHANGED
|
@@ -25,17 +25,18 @@ export function observe<T>(
|
|
|
25
25
|
fireImmediately?: boolean
|
|
26
26
|
): Lambda
|
|
27
27
|
export function observe<V>(
|
|
28
|
-
|
|
28
|
+
// ObservableSet/ObservableMap are required despite they implement Set/Map: https://github.com/mobxjs/mobx/pull/3180#discussion_r746542929
|
|
29
|
+
observableSet: ObservableSet<V> | Set<V>,
|
|
29
30
|
listener: (change: ISetDidChange<V>) => void,
|
|
30
31
|
fireImmediately?: boolean
|
|
31
32
|
): Lambda
|
|
32
33
|
export function observe<K, V>(
|
|
33
|
-
observableMap: ObservableMap<K, V>,
|
|
34
|
+
observableMap: ObservableMap<K, V> | Map<K, V>,
|
|
34
35
|
listener: (change: IMapDidChange<K, V>) => void,
|
|
35
36
|
fireImmediately?: boolean
|
|
36
37
|
): Lambda
|
|
37
38
|
export function observe<K, V>(
|
|
38
|
-
observableMap: ObservableMap<K, V>,
|
|
39
|
+
observableMap: ObservableMap<K, V> | Map<K, V>,
|
|
39
40
|
property: K,
|
|
40
41
|
listener: (change: IValueDidChange<V>) => void,
|
|
41
42
|
fireImmediately?: boolean
|