mobx 4.15.3 → 4.15.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.
Files changed (56) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +19 -10
  3. package/lib/api/action.d.ts +13 -13
  4. package/lib/api/actiondecorator.d.ts +27 -27
  5. package/lib/api/autorun.d.ts +24 -24
  6. package/lib/api/become-observed.d.ts +5 -5
  7. package/lib/api/computed.d.ts +14 -14
  8. package/lib/api/configure.d.ts +19 -19
  9. package/lib/api/decorate.d.ts +6 -6
  10. package/lib/api/extendobservable.d.ts +7 -7
  11. package/lib/api/extras.d.ts +10 -10
  12. package/lib/api/flow.d.ts +9 -9
  13. package/lib/api/intercept-read.d.ts +8 -8
  14. package/lib/api/intercept.d.ts +8 -8
  15. package/lib/api/iscomputed.d.ts +3 -3
  16. package/lib/api/isobservable.d.ts +2 -2
  17. package/lib/api/object-api.d.ts +34 -34
  18. package/lib/api/observable.d.ts +54 -54
  19. package/lib/api/observabledecorator.d.ts +6 -6
  20. package/lib/api/observe.d.ts +8 -8
  21. package/lib/api/tojs.d.ts +11 -11
  22. package/lib/api/trace.d.ts +3 -3
  23. package/lib/api/transaction.d.ts +8 -8
  24. package/lib/api/when.d.ts +15 -15
  25. package/lib/core/action.d.ts +22 -22
  26. package/lib/core/atom.d.ts +40 -40
  27. package/lib/core/computedvalue.d.ts +93 -93
  28. package/lib/core/derivation.d.ts +74 -74
  29. package/lib/core/globalstate.d.ts +106 -106
  30. package/lib/core/observable.d.ts +44 -44
  31. package/lib/core/reaction.d.ts +63 -63
  32. package/lib/core/spy.d.ts +6 -6
  33. package/lib/index.js +7 -0
  34. package/lib/internal.d.ts +44 -44
  35. package/lib/mobx.d.ts +19 -19
  36. package/lib/mobx.es6.js +4436 -4293
  37. package/lib/mobx.js +4520 -4387
  38. package/lib/mobx.min.js +15 -1
  39. package/lib/mobx.module.js +4535 -4388
  40. package/lib/mobx.umd.js +4536 -4389
  41. package/lib/mobx.umd.min.js +15 -1
  42. package/lib/types/intercept-utils.d.ts +9 -9
  43. package/lib/types/listen-utils.d.ts +8 -8
  44. package/lib/types/modifiers.d.ts +7 -7
  45. package/lib/types/observablearray.d.ts +78 -78
  46. package/lib/types/observablemap.d.ts +83 -83
  47. package/lib/types/observableobject.d.ts +65 -65
  48. package/lib/types/observableset.d.ts +49 -49
  49. package/lib/types/observablevalue.d.ts +37 -37
  50. package/lib/types/type-utils.d.ts +4 -4
  51. package/lib/utils/comparer.d.ts +14 -14
  52. package/lib/utils/decorators2.d.ts +7 -7
  53. package/lib/utils/eq.d.ts +1 -1
  54. package/lib/utils/iterable.d.ts +5 -5
  55. package/lib/utils/utils.d.ts +42 -43
  56. package/package.json +3 -13
@@ -1,83 +1,83 @@
1
- import { Lambda, IInterceptable, IListenable, IEnhancer, IInterceptor } from "../internal";
2
- export interface IKeyValueMap<V = any> {
3
- [key: string]: V;
4
- }
5
- export declare type IMapEntry<K = any, V = any> = [K, V];
6
- export declare type IMapEntries<K = any, V = any> = IMapEntry<K, V>[];
7
- export declare type IMapDidChange<K = any, V = any> = {
8
- object: ObservableMap<K, V>;
9
- name: K;
10
- type: "update";
11
- newValue: V;
12
- oldValue: V;
13
- } | {
14
- object: ObservableMap<K, V>;
15
- name: K;
16
- type: "add";
17
- newValue: V;
18
- } | {
19
- object: ObservableMap<K, V>;
20
- name: K;
21
- type: "delete";
22
- oldValue: V;
23
- };
24
- export interface IMapWillChange<K = any, V = any> {
25
- object: ObservableMap<K, V>;
26
- type: "update" | "add" | "delete";
27
- name: K;
28
- newValue?: V;
29
- }
30
- export declare type IObservableMapInitialValues<K = any, V = any> = IMapEntries<K, V> | IKeyValueMap<V> | Map<K, V>;
31
- export declare class ObservableMap<K = any, V = any> implements Map<K, V>, IInterceptable<IMapWillChange<K, V>>, IListenable {
32
- enhancer: IEnhancer<V>;
33
- name: string;
34
- $mobx: {};
35
- private _data;
36
- private _hasMap;
37
- private _keys;
38
- interceptors: any;
39
- changeListeners: any;
40
- dehancer: any;
41
- [Symbol.iterator]: () => IterableIterator<[K, V]>;
42
- [Symbol.toStringTag]: "Map";
43
- constructor(initialData?: IObservableMapInitialValues<K, V>, enhancer?: IEnhancer<V>, name?: string);
44
- private _has;
45
- has(key: K): boolean;
46
- set(key: K, value: V): this;
47
- delete(key: K): boolean;
48
- private _updateHasMapEntry;
49
- private _updateValue;
50
- private _addValue;
51
- get(key: K): V | undefined;
52
- private dehanceValue;
53
- keys(): IterableIterator<K>;
54
- values(): IterableIterator<V>;
55
- entries(): IterableIterator<IMapEntry<K, V>>;
56
- forEach(callback: (value: V, key: K, object: Map<K, V>) => void, thisArg?: any): void;
57
- /** Merge another object into this object, returns this. */
58
- merge(other: ObservableMap<K, V> | IKeyValueMap<V> | any): ObservableMap<K, V>;
59
- clear(): void;
60
- replace(values: ObservableMap<K, V> | IKeyValueMap<V> | any): ObservableMap<K, V>;
61
- readonly size: number;
62
- /**
63
- * Returns a plain object that represents this map.
64
- * Note that all the keys being stringified.
65
- * If there are duplicating keys after converting them to strings, behaviour is undetermined.
66
- */
67
- toPOJO(): IKeyValueMap<V>;
68
- /**
69
- * Returns a shallow non observable object clone of this map.
70
- * Note that the values migth still be observable. For a deep clone use mobx.toJS.
71
- */
72
- toJS(): Map<K, V>;
73
- toJSON(): IKeyValueMap<V>;
74
- toString(): string;
75
- /**
76
- * Observes this object. Triggers for the events 'add', 'update' and 'delete'.
77
- * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe
78
- * for callback details
79
- */
80
- observe(listener: (changes: IMapDidChange<K, V>) => void, fireImmediately?: boolean): Lambda;
81
- intercept(handler: IInterceptor<IMapWillChange<K, V>>): Lambda;
82
- }
83
- export declare const isObservableMap: (thing: any) => thing is ObservableMap<any, any>;
1
+ import { Lambda, IInterceptable, IListenable, IEnhancer, IInterceptor } from "../internal";
2
+ export interface IKeyValueMap<V = any> {
3
+ [key: string]: V;
4
+ }
5
+ export declare type IMapEntry<K = any, V = any> = [K, V];
6
+ export declare type IMapEntries<K = any, V = any> = IMapEntry<K, V>[];
7
+ export declare type IMapDidChange<K = any, V = any> = {
8
+ object: ObservableMap<K, V>;
9
+ name: K;
10
+ type: "update";
11
+ newValue: V;
12
+ oldValue: V;
13
+ } | {
14
+ object: ObservableMap<K, V>;
15
+ name: K;
16
+ type: "add";
17
+ newValue: V;
18
+ } | {
19
+ object: ObservableMap<K, V>;
20
+ name: K;
21
+ type: "delete";
22
+ oldValue: V;
23
+ };
24
+ export interface IMapWillChange<K = any, V = any> {
25
+ object: ObservableMap<K, V>;
26
+ type: "update" | "add" | "delete";
27
+ name: K;
28
+ newValue?: V;
29
+ }
30
+ export declare type IObservableMapInitialValues<K = any, V = any> = IMapEntries<K, V> | IKeyValueMap<V> | Map<K, V>;
31
+ export declare class ObservableMap<K = any, V = any> implements Map<K, V>, IInterceptable<IMapWillChange<K, V>>, IListenable {
32
+ enhancer: IEnhancer<V>;
33
+ name: string;
34
+ $mobx: {};
35
+ private _data;
36
+ private _hasMap;
37
+ private _keysAtom;
38
+ interceptors: any;
39
+ changeListeners: any;
40
+ dehancer: any;
41
+ [Symbol.iterator]: () => IterableIterator<[K, V]>;
42
+ [Symbol.toStringTag]: "Map";
43
+ constructor(initialData?: IObservableMapInitialValues<K, V>, enhancer?: IEnhancer<V>, name?: string);
44
+ private _has;
45
+ has(key: K): boolean;
46
+ set(key: K, value: V): this;
47
+ delete(key: K): boolean;
48
+ private _updateHasMapEntry;
49
+ private _updateValue;
50
+ private _addValue;
51
+ get(key: K): V | undefined;
52
+ private dehanceValue;
53
+ keys(): IterableIterator<K>;
54
+ values(): IterableIterator<V>;
55
+ entries(): IterableIterator<IMapEntry<K, V>>;
56
+ forEach(callback: (value: V, key: K, object: Map<K, V>) => void, thisArg?: any): void;
57
+ /** Merge another object into this object, returns this. */
58
+ merge(other: ObservableMap<K, V> | IKeyValueMap<V> | any): ObservableMap<K, V>;
59
+ clear(): void;
60
+ replace(values: ObservableMap<K, V> | IKeyValueMap<V> | any): ObservableMap<K, V>;
61
+ get size(): number;
62
+ /**
63
+ * Returns a plain object that represents this map.
64
+ * Note that all the keys being stringified.
65
+ * If there are duplicating keys after converting them to strings, behaviour is undetermined.
66
+ */
67
+ toPOJO(): IKeyValueMap<V>;
68
+ /**
69
+ * Returns a shallow non observable object clone of this map.
70
+ * Note that the values migth still be observable. For a deep clone use mobx.toJS.
71
+ */
72
+ toJS(): Map<K, V>;
73
+ toJSON(): IKeyValueMap<V>;
74
+ toString(): string;
75
+ /**
76
+ * Observes this object. Triggers for the events 'add', 'update' and 'delete'.
77
+ * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe
78
+ * for callback details
79
+ */
80
+ observe(listener: (changes: IMapDidChange<K, V>) => void, fireImmediately?: boolean): Lambda;
81
+ intercept(handler: IInterceptor<IMapWillChange<K, V>>): Lambda;
82
+ }
83
+ export declare const isObservableMap: (thing: any) => thing is ObservableMap<any, any>;
@@ -1,65 +1,65 @@
1
- import { ObservableValue, IInterceptable, IListenable, ComputedValue, IObservableArray, IEnhancer, Lambda, IComputedValueOptions } from "../internal";
2
- export interface IObservableObject {
3
- "observable-object": IObservableObject;
4
- }
5
- export declare type IObjectDidChange = {
6
- name: string;
7
- object: any;
8
- type: "add";
9
- newValue: any;
10
- } | {
11
- name: string;
12
- object: any;
13
- type: "update";
14
- oldValue: any;
15
- newValue: any;
16
- } | {
17
- name: string;
18
- object: any;
19
- type: "remove";
20
- oldValue: any;
21
- };
22
- export declare type IObjectWillChange = {
23
- object: any;
24
- type: "update" | "add";
25
- name: string;
26
- newValue: any;
27
- } | {
28
- object: any;
29
- type: "remove";
30
- name: string;
31
- };
32
- export declare class ObservableObjectAdministration implements IInterceptable<IObjectWillChange>, IListenable {
33
- target: any;
34
- name: string;
35
- defaultEnhancer: IEnhancer<any>;
36
- values: {
37
- [key: string]: ObservableValue<any> | ComputedValue<any>;
38
- };
39
- keys: undefined | IObservableArray<string>;
40
- changeListeners: any;
41
- interceptors: any;
42
- constructor(target: any, name: string, defaultEnhancer: IEnhancer<any>);
43
- read(owner: any, key: string): any;
44
- write(owner: any, key: string, newValue: any): void;
45
- remove(key: string): void;
46
- illegalAccess(owner: any, propName: any): void;
47
- /**
48
- * Observes this object. Triggers for the events 'add', 'update' and 'delete'.
49
- * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe
50
- * for callback details
51
- */
52
- observe(callback: (changes: IObjectDidChange) => void, fireImmediately?: boolean): Lambda;
53
- intercept(handler: any): Lambda;
54
- getKeys(): string[];
55
- }
56
- export interface IIsObservableObject {
57
- $mobx: ObservableObjectAdministration;
58
- }
59
- export declare function asObservableObject(target: any, name?: string, defaultEnhancer?: IEnhancer<any>): ObservableObjectAdministration;
60
- export declare function defineObservableProperty(target: any, propName: string, newValue: any, enhancer: IEnhancer<any>): void;
61
- export declare function defineComputedProperty(target: any, // which objects holds the observable and provides `this` context?
62
- propName: string, options: IComputedValueOptions<any>): void;
63
- export declare function generateObservablePropConfig(propName: any): any;
64
- export declare function generateComputedPropConfig(propName: any): any;
65
- export declare function isObservableObject(thing: any): thing is IObservableObject;
1
+ import { ObservableValue, IInterceptable, IListenable, ComputedValue, IObservableArray, IEnhancer, Lambda, IComputedValueOptions } from "../internal";
2
+ export interface IObservableObject {
3
+ "observable-object": IObservableObject;
4
+ }
5
+ export declare type IObjectDidChange<T = any> = {
6
+ name: string;
7
+ object: T;
8
+ type: "add";
9
+ newValue: any;
10
+ } | {
11
+ name: string;
12
+ object: T;
13
+ type: "update";
14
+ oldValue: any;
15
+ newValue: any;
16
+ } | {
17
+ name: string;
18
+ object: T;
19
+ type: "remove";
20
+ oldValue: any;
21
+ };
22
+ export declare type IObjectWillChange<T = any> = {
23
+ object: T;
24
+ type: "update" | "add";
25
+ name: string;
26
+ newValue: any;
27
+ } | {
28
+ object: T;
29
+ type: "remove";
30
+ name: string;
31
+ };
32
+ export declare class ObservableObjectAdministration implements IInterceptable<IObjectWillChange>, IListenable {
33
+ target: any;
34
+ name: string;
35
+ defaultEnhancer: IEnhancer<any>;
36
+ values: {
37
+ [key: string]: ObservableValue<any> | ComputedValue<any>;
38
+ };
39
+ keys: undefined | IObservableArray<string>;
40
+ changeListeners: any;
41
+ interceptors: any;
42
+ constructor(target: any, name: string, defaultEnhancer: IEnhancer<any>);
43
+ read(owner: any, key: string): any;
44
+ write(owner: any, key: string, newValue: any): void;
45
+ remove(key: string): void;
46
+ illegalAccess(owner: any, propName: any): void;
47
+ /**
48
+ * Observes this object. Triggers for the events 'add', 'update' and 'delete'.
49
+ * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe
50
+ * for callback details
51
+ */
52
+ observe(callback: (changes: IObjectDidChange) => void, fireImmediately?: boolean): Lambda;
53
+ intercept(handler: any): Lambda;
54
+ getKeys(): string[];
55
+ }
56
+ export interface IIsObservableObject {
57
+ $mobx: ObservableObjectAdministration;
58
+ }
59
+ export declare function asObservableObject(target: any, name?: string, defaultEnhancer?: IEnhancer<any>): ObservableObjectAdministration;
60
+ export declare function defineObservableProperty(target: any, propName: string, newValue: any, enhancer: IEnhancer<any>): void;
61
+ export declare function defineComputedProperty(target: any, // which objects holds the observable and provides `this` context?
62
+ propName: string, options: IComputedValueOptions<any>): void;
63
+ export declare function generateObservablePropConfig(propName: any): any;
64
+ export declare function generateComputedPropConfig(propName: any): any;
65
+ export declare function isObservableObject(thing: any): thing is IObservableObject;
@@ -1,49 +1,49 @@
1
- import { IEnhancer, IListenable, Lambda, IInterceptable, IInterceptor } from "../internal";
2
- export declare type IObservableSetInitialValues<T> = Set<T> | readonly T[];
3
- export declare type ISetDidChange<T = any> = {
4
- object: ObservableSet<T>;
5
- type: "add";
6
- newValue: T;
7
- } | {
8
- object: ObservableSet<T>;
9
- type: "delete";
10
- oldValue: T;
11
- };
12
- export declare type ISetWillChange<T = any> = {
13
- type: "delete";
14
- object: ObservableSet<T>;
15
- oldValue: T;
16
- } | {
17
- type: "add";
18
- object: ObservableSet<T>;
19
- newValue: T;
20
- };
21
- export declare class ObservableSet<T = any> implements Set<T>, IInterceptable<ISetWillChange>, IListenable {
22
- name: string;
23
- $mobx: {};
24
- private _data;
25
- private _atom;
26
- changeListeners: any;
27
- interceptors: any;
28
- dehancer: any;
29
- enhancer: (newV: any, oldV: any | undefined) => any;
30
- [Symbol.iterator]: () => IterableIterator<T>;
31
- [Symbol.toStringTag]: "Set";
32
- constructor(initialData?: IObservableSetInitialValues<T>, enhancer?: IEnhancer<T>, name?: string);
33
- private dehanceValue;
34
- clear(): void;
35
- forEach(callbackFn: (value: T, value2: T, set: Set<T>) => void, thisArg?: any): void;
36
- readonly size: number;
37
- add(value: T): this;
38
- delete(value: any): boolean;
39
- has(value: any): boolean;
40
- entries(): IterableIterator<[T, T]>;
41
- keys(): IterableIterator<T>;
42
- values(): IterableIterator<T>;
43
- replace(other: ObservableSet<T> | IObservableSetInitialValues<T>): ObservableSet<T>;
44
- observe(listener: (changes: ISetDidChange<T>) => void, fireImmediately?: boolean): Lambda;
45
- intercept(handler: IInterceptor<ISetWillChange<T>>): Lambda;
46
- toJS(): Set<T>;
47
- toString(): string;
48
- }
49
- export declare const isObservableSet: (thing: any) => thing is ObservableSet<any>;
1
+ import { IEnhancer, IListenable, Lambda, IInterceptable, IInterceptor } from "../internal";
2
+ export declare type IObservableSetInitialValues<T> = Set<T> | readonly T[];
3
+ export declare type ISetDidChange<T = any> = {
4
+ object: ObservableSet<T>;
5
+ type: "add";
6
+ newValue: T;
7
+ } | {
8
+ object: ObservableSet<T>;
9
+ type: "delete";
10
+ oldValue: T;
11
+ };
12
+ export declare type ISetWillChange<T = any> = {
13
+ type: "delete";
14
+ object: ObservableSet<T>;
15
+ oldValue: T;
16
+ } | {
17
+ type: "add";
18
+ object: ObservableSet<T>;
19
+ newValue: T;
20
+ };
21
+ export declare class ObservableSet<T = any> implements Set<T>, IInterceptable<ISetWillChange>, IListenable {
22
+ name: string;
23
+ $mobx: {};
24
+ private _data;
25
+ private _atom;
26
+ changeListeners: any;
27
+ interceptors: any;
28
+ dehancer: any;
29
+ enhancer: (newV: any, oldV: any | undefined) => any;
30
+ [Symbol.iterator]: () => IterableIterator<T>;
31
+ [Symbol.toStringTag]: "Set";
32
+ constructor(initialData?: IObservableSetInitialValues<T>, enhancer?: IEnhancer<T>, name?: string);
33
+ private dehanceValue;
34
+ clear(): void;
35
+ forEach(callbackFn: (value: T, value2: T, set: Set<T>) => void, thisArg?: any): void;
36
+ get size(): number;
37
+ add(value: T): this;
38
+ delete(value: any): boolean;
39
+ has(value: any): boolean;
40
+ entries(): IterableIterator<[T, T]>;
41
+ keys(): IterableIterator<T>;
42
+ values(): IterableIterator<T>;
43
+ replace(other: ObservableSet<T> | IObservableSetInitialValues<T>): ObservableSet<T>;
44
+ observe(listener: (changes: ISetDidChange<T>) => void, fireImmediately?: boolean): Lambda;
45
+ intercept(handler: IInterceptor<ISetWillChange<T>>): Lambda;
46
+ toJS(): Set<T>;
47
+ toString(): string;
48
+ }
49
+ export declare const isObservableSet: (thing: any) => thing is ObservableSet<any>;
@@ -1,37 +1,37 @@
1
- import { Lambda, IInterceptor, Atom, IInterceptable, IListenable, IEnhancer, IEqualsComparer } from "../internal";
2
- export interface IValueWillChange<T> {
3
- object: any;
4
- type: "update";
5
- newValue: T;
6
- }
7
- export interface IValueDidChange<T> extends IValueWillChange<T> {
8
- oldValue: T | undefined;
9
- }
10
- export interface IObservableValue<T> {
11
- get(): T;
12
- set(value: T): void;
13
- intercept(handler: IInterceptor<IValueWillChange<T>>): Lambda;
14
- observe(listener: (change: IValueDidChange<T>) => void, fireImmediately?: boolean): Lambda;
15
- }
16
- export declare class ObservableValue<T> extends Atom implements IObservableValue<T>, IInterceptable<IValueWillChange<T>>, IListenable {
17
- enhancer: IEnhancer<T>;
18
- name: string;
19
- private equals;
20
- hasUnreportedChange: boolean;
21
- interceptors: any;
22
- changeListeners: any;
23
- value: any;
24
- dehancer: any;
25
- constructor(value: T, enhancer: IEnhancer<T>, name?: string, notifySpy?: boolean, equals?: IEqualsComparer<any>);
26
- private dehanceValue;
27
- set(newValue: T): void;
28
- private prepareNewValue;
29
- setNewValue(newValue: T): void;
30
- get(): T;
31
- intercept(handler: IInterceptor<IValueWillChange<T>>): Lambda;
32
- observe(listener: (change: IValueDidChange<T>) => void, fireImmediately?: boolean): Lambda;
33
- toJSON(): T;
34
- toString(): string;
35
- valueOf(): T;
36
- }
37
- export declare const isObservableValue: (x: any) => x is IObservableValue<any>;
1
+ import { Lambda, IInterceptor, Atom, IInterceptable, IListenable, IEnhancer, IEqualsComparer } from "../internal";
2
+ export interface IValueWillChange<T> {
3
+ object: any;
4
+ type: "update";
5
+ newValue: T;
6
+ }
7
+ export interface IValueDidChange<T> extends IValueWillChange<T> {
8
+ oldValue: T | undefined;
9
+ }
10
+ export interface IObservableValue<T> {
11
+ get(): T;
12
+ set(value: T): void;
13
+ intercept(handler: IInterceptor<IValueWillChange<T>>): Lambda;
14
+ observe(listener: (change: IValueDidChange<T>) => void, fireImmediately?: boolean): Lambda;
15
+ }
16
+ export declare class ObservableValue<T> extends Atom implements IObservableValue<T>, IInterceptable<IValueWillChange<T>>, IListenable {
17
+ enhancer: IEnhancer<T>;
18
+ name: string;
19
+ private equals;
20
+ hasUnreportedChange: boolean;
21
+ interceptors: any;
22
+ changeListeners: any;
23
+ value: any;
24
+ dehancer: any;
25
+ constructor(value: T, enhancer: IEnhancer<T>, name?: string, notifySpy?: boolean, equals?: IEqualsComparer<any>);
26
+ private dehanceValue;
27
+ set(newValue: T): void;
28
+ private prepareNewValue;
29
+ setNewValue(newValue: T): void;
30
+ get(): T;
31
+ intercept(handler: IInterceptor<IValueWillChange<T>>): Lambda;
32
+ observe(listener: (change: IValueDidChange<T>) => void, fireImmediately?: boolean): Lambda;
33
+ toJSON(): T;
34
+ toString(): string;
35
+ valueOf(): T;
36
+ }
37
+ export declare const isObservableValue: (x: any) => x is IObservableValue<any>;
@@ -1,4 +1,4 @@
1
- import { IDepTreeNode } from "../internal";
2
- export declare function getAtom(thing: any, property?: string): IDepTreeNode;
3
- export declare function getAdministration(thing: any, property?: string): any;
4
- export declare function getDebugName(thing: any, property?: string): string;
1
+ import { IDepTreeNode } from "../internal";
2
+ export declare function getAtom(thing: any, property?: string): IDepTreeNode;
3
+ export declare function getAdministration(thing: any, property?: string): any;
4
+ export declare function getDebugName(thing: any, property?: string): string;
@@ -1,14 +1,14 @@
1
- export interface IEqualsComparer<T> {
2
- (a: T, b: T): boolean;
3
- }
4
- declare function identityComparer(a: any, b: any): boolean;
5
- declare function structuralComparer(a: any, b: any): boolean;
6
- declare function shallowComparer(a: any, b: any): boolean;
7
- declare function defaultComparer(a: any, b: any): boolean;
8
- export declare const comparer: {
9
- identity: typeof identityComparer;
10
- structural: typeof structuralComparer;
11
- default: typeof defaultComparer;
12
- shallow: typeof shallowComparer;
13
- };
14
- export {};
1
+ export interface IEqualsComparer<T> {
2
+ (a: T, b: T): boolean;
3
+ }
4
+ declare function identityComparer(a: any, b: any): boolean;
5
+ declare function structuralComparer(a: any, b: any): boolean;
6
+ declare function shallowComparer(a: any, b: any): boolean;
7
+ declare function defaultComparer(a: any, b: any): boolean;
8
+ export declare const comparer: {
9
+ identity: typeof identityComparer;
10
+ structural: typeof structuralComparer;
11
+ default: typeof defaultComparer;
12
+ shallow: typeof shallowComparer;
13
+ };
14
+ export {};
@@ -1,7 +1,7 @@
1
- export declare type BabelDescriptor = PropertyDescriptor & {
2
- initializer?: () => any;
3
- };
4
- export declare type PropertyCreator = (instance: any, propertyName: string, descriptor: BabelDescriptor | undefined, decoratorTarget: any, decoratorArgs: any[]) => void;
5
- export declare function initializeInstance(target: any): any;
6
- export declare function createPropDecorator(propertyInitiallyEnumerable: boolean, propertyCreator: PropertyCreator): Function;
7
- export declare function quacksLikeADecorator(args: IArguments): boolean;
1
+ export declare type BabelDescriptor = PropertyDescriptor & {
2
+ initializer?: () => any;
3
+ };
4
+ export declare type PropertyCreator = (instance: any, propertyName: string, descriptor: BabelDescriptor | undefined, decoratorTarget: any, decoratorArgs: any[]) => void;
5
+ export declare function initializeInstance(target: any): any;
6
+ export declare function createPropDecorator(propertyInitiallyEnumerable: boolean, propertyCreator: PropertyCreator): Function;
7
+ export declare function quacksLikeADecorator(args: IArguments): boolean;
package/lib/utils/eq.d.ts CHANGED
@@ -1 +1 @@
1
- export declare function deepEqual(a: any, b: any, depth?: number): boolean;
1
+ export declare function deepEqual(a: any, b: any, depth?: number): boolean;
@@ -1,5 +1,5 @@
1
- export declare function iteratorSymbol(): any;
2
- export declare const IS_ITERATING_MARKER = "__$$iterating";
3
- export declare function declareIterator<T>(prototType: any, iteratorFactory: () => IterableIterator<T>): void;
4
- export declare function makeIterable<T>(iterator: Iterator<T>): IterableIterator<T>;
5
- export declare function toStringTagSymbol(): any;
1
+ export declare function iteratorSymbol(): any;
2
+ export declare const IS_ITERATING_MARKER = "__$$iterating";
3
+ export declare function declareIterator<T>(prototType: any, iteratorFactory: () => IterableIterator<T>): void;
4
+ export declare function makeIterable<T>(iterator: Iterator<T>): IterableIterator<T>;
5
+ export declare function toStringTagSymbol(): any;
@@ -1,43 +1,42 @@
1
- import { ObservableMap, IObservableArray, IKeyValueMap } from "../internal";
2
- export declare const OBFUSCATED_ERROR = "An invariant failed, however the error is obfuscated because this is an production build.";
3
- export declare const EMPTY_ARRAY: never[];
4
- export declare const EMPTY_OBJECT: {};
5
- export declare function getGlobal(): any;
6
- export interface Lambda {
7
- (): void;
8
- name?: string;
9
- }
10
- export declare function getNextId(): number;
11
- export declare function fail(message: string | boolean): never;
12
- export declare function invariant(check: false, message?: string | boolean): never;
13
- export declare function invariant(check: true, message?: string | boolean): void;
14
- export declare function invariant(check: any, message?: string | boolean): void;
15
- export declare function deprecated(msg: string): boolean;
16
- export declare function deprecated(thing: string, replacement: string): boolean;
17
- /**
18
- * Makes sure that the provided function is invoked at most once.
19
- */
20
- export declare function once(func: Lambda): Lambda;
21
- export declare const noop: () => void;
22
- export declare function unique<T>(list: T[]): T[];
23
- export declare function isObject(value: any): boolean;
24
- export declare function isPlainObject(value: any): boolean;
25
- export declare function convertToMap(dataStructure: any): any;
26
- export declare function makeNonEnumerable(object: any, propNames: string[]): void;
27
- export declare function addHiddenProp(object: any, propName: PropertyKey, value: any): void;
28
- export declare function addHiddenFinalProp(object: any, propName: string, value: any): void;
29
- export declare function isPropertyConfigurable(object: any, prop: string): boolean;
30
- export declare function assertPropertyConfigurable(object: any, prop: string): void;
31
- export declare function createInstanceofPredicate<T>(name: string, clazz: new (...args: any[]) => T): (x: any) => x is T;
32
- export declare function areBothNaN(a: any, b: any): boolean;
33
- /**
34
- * Returns whether the argument is an array, disregarding observability.
35
- */
36
- export declare function isArrayLike(x: any): x is Array<any> | IObservableArray<any>;
37
- export declare function isES6Map(thing: any): boolean;
38
- export declare function isES6Set(thing: any): thing is Set<any>;
39
- export declare function getMapLikeKeys<K, V>(map: ObservableMap<K, V>): ReadonlyArray<K>;
40
- export declare function getMapLikeKeys<V>(map: IKeyValueMap<V> | any): ReadonlyArray<string>;
41
- export declare function iteratorToArray<T>(it: Iterator<T>): Array<T>;
42
- export declare function primitiveSymbol(): any;
43
- export declare function toPrimitive(value: any): any;
1
+ import { IObservableArray } from "../internal";
2
+ export declare const OBFUSCATED_ERROR = "An invariant failed, however the error is obfuscated because this is an production build.";
3
+ export declare const EMPTY_ARRAY: never[];
4
+ export declare const EMPTY_OBJECT: {};
5
+ export declare function getGlobal(): any;
6
+ export interface Lambda {
7
+ (): void;
8
+ name?: string;
9
+ }
10
+ export declare function getNextId(): number;
11
+ export declare function fail(message: string | boolean): never;
12
+ export declare function invariant(check: false, message?: string | boolean): never;
13
+ export declare function invariant(check: true, message?: string | boolean): void;
14
+ export declare function invariant(check: any, message?: string | boolean): void;
15
+ export declare function deprecated(msg: string): boolean;
16
+ export declare function deprecated(thing: string, replacement: string): boolean;
17
+ /**
18
+ * Makes sure that the provided function is invoked at most once.
19
+ */
20
+ export declare function once(func: Lambda): Lambda;
21
+ export declare const noop: () => void;
22
+ export declare function unique<T>(list: T[]): T[];
23
+ export declare function isObject(value: any): boolean;
24
+ export declare function isPlainObject(value: any): boolean;
25
+ export declare function convertToMap(dataStructure: any): Map<any, any>;
26
+ export declare function makeNonEnumerable(object: any, propNames: string[]): void;
27
+ export declare function addHiddenProp(object: any, propName: PropertyKey, value: any): void;
28
+ export declare function addHiddenFinalProp(object: any, propName: string, value: any): void;
29
+ export declare function isPropertyConfigurable(object: any, prop: string): boolean;
30
+ export declare function assertPropertyConfigurable(object: any, prop: string): void;
31
+ export declare function createInstanceofPredicate<T>(name: string, clazz: new (...args: any[]) => T): (x: any) => x is T;
32
+ export declare function areBothNaN(a: any, b: any): boolean;
33
+ /**
34
+ * Returns whether the argument is an array, disregarding observability.
35
+ */
36
+ export declare function isArrayLike(x: any): x is Array<any> | IObservableArray<any>;
37
+ export declare function isES6Map(thing: any): boolean;
38
+ export declare function isES6Set(thing: any): thing is Set<any>;
39
+ export declare function iteratorToArray<T>(it: Iterator<T>): Array<T>;
40
+ export declare function primitiveSymbol(): any;
41
+ export declare function toPrimitive(value: any): any;
42
+ export declare function forOf<T>(iter: Iterator<T>, callback: (entry: T) => void): void;