mobx 4.9.4 → 4.13.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/README.md +1 -1
- package/lib/api/configure.d.ts +1 -0
- package/lib/api/object-api.d.ts +1 -0
- package/lib/api/observable.d.ts +1 -0
- package/lib/core/globalstate.d.ts +5 -0
- package/lib/mobx.es6.js +4322 -0
- package/lib/mobx.js +1170 -1173
- package/lib/mobx.js.flow +175 -160
- package/lib/mobx.min.js +1 -4
- package/lib/mobx.module.js +1115 -1118
- package/lib/mobx.umd.js +4252 -4441
- package/lib/mobx.umd.min.js +1 -4
- package/lib/types/observableset.d.ts +1 -1
- package/package.json +48 -42
- package/lib/mobx.min.js.map +0 -1
- package/lib/mobx.umd.min.js.map +0 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
_Simple, scalable state management_
|
|
6
6
|
|
|
7
|
-
[](https://circleci.com/gh/mobxjs/mobx/tree/mobx4-master)
|
|
8
8
|
[](https://coveralls.io/github/mobxjs/mobx?branch=master)
|
|
9
9
|
[](https://gitter.im/mobxjs/mobx?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
|
10
10
|
[](https://hashnode.com/n/mobx)
|
package/lib/api/configure.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare function configure(options: {
|
|
2
2
|
enforceActions?: boolean | "strict" | "never" | "always" | "observed";
|
|
3
3
|
computedRequiresReaction?: boolean;
|
|
4
|
+
computedConfigurable?: boolean;
|
|
4
5
|
isolateGlobalState?: boolean;
|
|
5
6
|
disableErrorBoundaries?: boolean;
|
|
6
7
|
arrayBuffer?: number;
|
package/lib/api/object-api.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export declare function set<V>(obj: ObservableMap<string, V>, values: {
|
|
|
15
15
|
[key: string]: V;
|
|
16
16
|
}): any;
|
|
17
17
|
export declare function set<K, V>(obj: ObservableMap<K, V>, key: K, value: V): any;
|
|
18
|
+
export declare function set<T>(obj: ObservableSet<T>, value: T): any;
|
|
18
19
|
export declare function set<T>(obj: IObservableArray<T>, index: number, value: T): any;
|
|
19
20
|
export declare function set<T extends Object>(obj: T, values: {
|
|
20
21
|
[key: string]: any;
|
package/lib/api/observable.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export interface IObservableFactory {
|
|
|
18
18
|
(value: number | string | null | undefined | boolean): never;
|
|
19
19
|
(target: Object, key: string | symbol, baseDescriptor?: PropertyDescriptor): any;
|
|
20
20
|
<T = any>(value: T[], options?: CreateObservableOptions): IObservableArray<T>;
|
|
21
|
+
<T = any>(value: Set<T>, options?: CreateObservableOptions): ObservableSet<T>;
|
|
21
22
|
<K = any, V = any>(value: Map<K, V>, options?: CreateObservableOptions): ObservableMap<K, V>;
|
|
22
23
|
<T extends Object>(value: T, decorators?: {
|
|
23
24
|
[K in keyof T]?: Function;
|
|
@@ -73,6 +73,11 @@ export declare class MobXGlobals {
|
|
|
73
73
|
* Warn if computed values are accessed outside a reactive context
|
|
74
74
|
*/
|
|
75
75
|
computedRequiresReaction: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Allows overwriting of computed properties, useful in tests but not prod as it can cause
|
|
78
|
+
* memory leaks. See https://github.com/mobxjs/mobx/issues/1867
|
|
79
|
+
*/
|
|
80
|
+
computedConfigurable: boolean;
|
|
76
81
|
disableErrorBoundaries: boolean;
|
|
77
82
|
suppressReactionErrors: boolean;
|
|
78
83
|
}
|