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 CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  _Simple, scalable state management_
6
6
 
7
- [![Build Status](https://travis-ci.org/mobxjs/mobx.svg?branch=master)](https://travis-ci.org/mobxjs/mobx)
7
+ [![CircleCI](https://circleci.com/gh/mobxjs/mobx/tree/mobx4-master.svg?style=svg)](https://circleci.com/gh/mobxjs/mobx/tree/mobx4-master)
8
8
  [![Coverage Status](https://coveralls.io/repos/mobxjs/mobx/badge.svg?branch=master&service=github)](https://coveralls.io/github/mobxjs/mobx?branch=master)
9
9
  [![Join the chat at https://gitter.im/mobxjs/mobx](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mobxjs/mobx?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
10
10
  [![Discuss MobX on Hashnode](https://hashnode.github.io/badges/mobx.svg)](https://hashnode.com/n/mobx)
@@ -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;
@@ -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;
@@ -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
  }