mobx 5.15.3 → 5.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.
- package/CHANGELOG.md +28 -0
- package/README.md +19 -10
- package/lib/api/action.d.ts +13 -13
- package/lib/api/actiondecorator.d.ts +27 -27
- package/lib/api/autorun.d.ts +24 -24
- package/lib/api/become-observed.d.ts +5 -5
- package/lib/api/computed.d.ts +14 -14
- package/lib/api/configure.d.ts +18 -18
- package/lib/api/decorate.d.ts +6 -6
- package/lib/api/extendobservable.d.ts +7 -7
- package/lib/api/extras.d.ts +10 -10
- package/lib/api/flow.d.ts +9 -9
- package/lib/api/intercept-read.d.ts +8 -8
- package/lib/api/intercept.d.ts +8 -8
- package/lib/api/iscomputed.d.ts +3 -3
- package/lib/api/isobservable.d.ts +2 -2
- package/lib/api/object-api.d.ts +34 -34
- package/lib/api/observable.d.ts +44 -44
- package/lib/api/observabledecorator.d.ts +6 -6
- package/lib/api/observe.d.ts +8 -8
- package/lib/api/tojs.d.ts +11 -11
- package/lib/api/trace.d.ts +3 -3
- package/lib/api/transaction.d.ts +8 -8
- package/lib/api/when.d.ts +15 -15
- package/lib/core/action.d.ts +22 -22
- package/lib/core/atom.d.ts +37 -37
- package/lib/core/computedvalue.d.ts +95 -95
- package/lib/core/derivation.d.ts +74 -74
- package/lib/core/globalstate.d.ts +107 -107
- package/lib/core/observable.d.ts +45 -45
- package/lib/core/reaction.d.ts +63 -63
- package/lib/core/spy.d.ts +6 -6
- package/lib/index.js +7 -0
- package/lib/internal.d.ts +45 -45
- package/lib/mobx.d.ts +18 -18
- package/lib/mobx.es6.js +4317 -4157
- package/lib/mobx.js +4513 -4347
- package/lib/mobx.min.js +15 -1
- package/lib/mobx.module.js +4530 -4348
- package/lib/mobx.umd.js +4531 -4349
- package/lib/mobx.umd.min.js +15 -1
- package/lib/types/dynamicobject.d.ts +1 -1
- package/lib/types/intercept-utils.d.ts +9 -9
- package/lib/types/listen-utils.d.ts +8 -8
- package/lib/types/modifiers.d.ts +7 -7
- package/lib/types/observablearray.d.ts +42 -42
- package/lib/types/observablemap.d.ts +83 -83
- package/lib/types/observableobject.d.ts +67 -67
- package/lib/types/observableset.d.ts +49 -49
- package/lib/types/observablevalue.d.ts +38 -38
- package/lib/types/type-utils.d.ts +4 -4
- package/lib/utils/comparer.d.ts +14 -14
- package/lib/utils/decorators.d.ts +9 -9
- package/lib/utils/eq.d.ts +1 -1
- package/lib/utils/iterable.d.ts +1 -1
- package/lib/utils/utils.d.ts +43 -43
- package/package.json +3 -13
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
import { ComputedValue, IAtom, IComputedValueOptions, IEnhancer, IInterceptable, IListenable, Lambda, ObservableValue } from "../internal";
|
|
2
|
-
export interface IObservableObject {
|
|
3
|
-
"observable-object": IObservableObject;
|
|
4
|
-
}
|
|
5
|
-
export declare type IObjectDidChange = {
|
|
6
|
-
name: PropertyKey;
|
|
7
|
-
object:
|
|
8
|
-
type: "add";
|
|
9
|
-
newValue: any;
|
|
10
|
-
} | {
|
|
11
|
-
name: PropertyKey;
|
|
12
|
-
object:
|
|
13
|
-
type: "update";
|
|
14
|
-
oldValue: any;
|
|
15
|
-
newValue: any;
|
|
16
|
-
} | {
|
|
17
|
-
name: PropertyKey;
|
|
18
|
-
object:
|
|
19
|
-
type: "remove";
|
|
20
|
-
oldValue: any;
|
|
21
|
-
};
|
|
22
|
-
export declare type IObjectWillChange = {
|
|
23
|
-
object:
|
|
24
|
-
type: "update" | "add";
|
|
25
|
-
name: PropertyKey;
|
|
26
|
-
newValue: any;
|
|
27
|
-
} | {
|
|
28
|
-
object:
|
|
29
|
-
type: "remove";
|
|
30
|
-
name: PropertyKey;
|
|
31
|
-
};
|
|
32
|
-
export declare class ObservableObjectAdministration implements IInterceptable<IObjectWillChange>, IListenable {
|
|
33
|
-
target: any;
|
|
34
|
-
values: Map<string | number | symbol, ObservableValue<any> | ComputedValue<any>>;
|
|
35
|
-
name: string;
|
|
36
|
-
defaultEnhancer: IEnhancer<any>;
|
|
37
|
-
keysAtom: IAtom;
|
|
38
|
-
changeListeners: any;
|
|
39
|
-
interceptors: any;
|
|
40
|
-
private proxy;
|
|
41
|
-
private pendingKeys;
|
|
42
|
-
constructor(target: any, values: Map<string | number | symbol, ObservableValue<any> | ComputedValue<any>>, name: string, defaultEnhancer: IEnhancer<any>);
|
|
43
|
-
read(key: PropertyKey): any;
|
|
44
|
-
write(key: PropertyKey, newValue: any): void;
|
|
45
|
-
has(key: PropertyKey): any;
|
|
46
|
-
addObservableProp(propName: PropertyKey, newValue: any, enhancer?: IEnhancer<any>): void;
|
|
47
|
-
addComputedProp(propertyOwner: any, // where is the property declared?
|
|
48
|
-
propName: PropertyKey, options: IComputedValueOptions<any>): void;
|
|
49
|
-
remove(key: PropertyKey): void;
|
|
50
|
-
illegalAccess(owner: any, propName: any): void;
|
|
51
|
-
/**
|
|
52
|
-
* Observes this object. Triggers for the events 'add', 'update' and 'delete'.
|
|
53
|
-
* See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe
|
|
54
|
-
* for callback details
|
|
55
|
-
*/
|
|
56
|
-
observe(callback: (changes: IObjectDidChange) => void, fireImmediately?: boolean): Lambda;
|
|
57
|
-
intercept(handler: any): Lambda;
|
|
58
|
-
notifyPropertyAddition(key: PropertyKey, newValue: any): void;
|
|
59
|
-
getKeys(): PropertyKey[];
|
|
60
|
-
}
|
|
61
|
-
export interface IIsObservableObject {
|
|
62
|
-
$mobx: ObservableObjectAdministration;
|
|
63
|
-
}
|
|
64
|
-
export declare function asObservableObject(target: any, name?: PropertyKey, defaultEnhancer?: IEnhancer<any>): ObservableObjectAdministration;
|
|
65
|
-
export declare function generateObservablePropConfig(propName: any): any;
|
|
66
|
-
export declare function generateComputedPropConfig(propName: any): any;
|
|
67
|
-
export declare function isObservableObject(thing: any): thing is IObservableObject;
|
|
1
|
+
import { ComputedValue, IAtom, IComputedValueOptions, IEnhancer, IInterceptable, IListenable, Lambda, ObservableValue } from "../internal";
|
|
2
|
+
export interface IObservableObject {
|
|
3
|
+
"observable-object": IObservableObject;
|
|
4
|
+
}
|
|
5
|
+
export declare type IObjectDidChange<T = any> = {
|
|
6
|
+
name: PropertyKey;
|
|
7
|
+
object: T;
|
|
8
|
+
type: "add";
|
|
9
|
+
newValue: any;
|
|
10
|
+
} | {
|
|
11
|
+
name: PropertyKey;
|
|
12
|
+
object: T;
|
|
13
|
+
type: "update";
|
|
14
|
+
oldValue: any;
|
|
15
|
+
newValue: any;
|
|
16
|
+
} | {
|
|
17
|
+
name: PropertyKey;
|
|
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: PropertyKey;
|
|
26
|
+
newValue: any;
|
|
27
|
+
} | {
|
|
28
|
+
object: T;
|
|
29
|
+
type: "remove";
|
|
30
|
+
name: PropertyKey;
|
|
31
|
+
};
|
|
32
|
+
export declare class ObservableObjectAdministration implements IInterceptable<IObjectWillChange>, IListenable {
|
|
33
|
+
target: any;
|
|
34
|
+
values: Map<string | number | symbol, ObservableValue<any> | ComputedValue<any>>;
|
|
35
|
+
name: string;
|
|
36
|
+
defaultEnhancer: IEnhancer<any>;
|
|
37
|
+
keysAtom: IAtom;
|
|
38
|
+
changeListeners: any;
|
|
39
|
+
interceptors: any;
|
|
40
|
+
private proxy;
|
|
41
|
+
private pendingKeys;
|
|
42
|
+
constructor(target: any, values: Map<string | number | symbol, ObservableValue<any> | ComputedValue<any>>, name: string, defaultEnhancer: IEnhancer<any>);
|
|
43
|
+
read(key: PropertyKey): any;
|
|
44
|
+
write(key: PropertyKey, newValue: any): void;
|
|
45
|
+
has(key: PropertyKey): any;
|
|
46
|
+
addObservableProp(propName: PropertyKey, newValue: any, enhancer?: IEnhancer<any>): void;
|
|
47
|
+
addComputedProp(propertyOwner: any, // where is the property declared?
|
|
48
|
+
propName: PropertyKey, options: IComputedValueOptions<any>): void;
|
|
49
|
+
remove(key: PropertyKey): void;
|
|
50
|
+
illegalAccess(owner: any, propName: any): void;
|
|
51
|
+
/**
|
|
52
|
+
* Observes this object. Triggers for the events 'add', 'update' and 'delete'.
|
|
53
|
+
* See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe
|
|
54
|
+
* for callback details
|
|
55
|
+
*/
|
|
56
|
+
observe(callback: (changes: IObjectDidChange) => void, fireImmediately?: boolean): Lambda;
|
|
57
|
+
intercept(handler: any): Lambda;
|
|
58
|
+
notifyPropertyAddition(key: PropertyKey, newValue: any): void;
|
|
59
|
+
getKeys(): PropertyKey[];
|
|
60
|
+
}
|
|
61
|
+
export interface IIsObservableObject {
|
|
62
|
+
$mobx: ObservableObjectAdministration;
|
|
63
|
+
}
|
|
64
|
+
export declare function asObservableObject(target: any, name?: PropertyKey, defaultEnhancer?: IEnhancer<any>): ObservableObjectAdministration;
|
|
65
|
+
export declare function generateObservablePropConfig(propName: any): any;
|
|
66
|
+
export declare function generateComputedPropConfig(propName: any): any;
|
|
67
|
+
export declare function isObservableObject(thing: any): thing is IObservableObject;
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { $mobx, 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
|
-
constructor(initialData?: IObservableSetInitialValues<T>, enhancer?: IEnhancer<T>, name?: string);
|
|
31
|
-
private dehanceValue;
|
|
32
|
-
clear(): void;
|
|
33
|
-
forEach(callbackFn: (value: T, value2: T, set: Set<T>) => void, thisArg?: any): void;
|
|
34
|
-
|
|
35
|
-
add(value: T): this;
|
|
36
|
-
delete(value: any): boolean;
|
|
37
|
-
has(value: any): boolean;
|
|
38
|
-
entries(): IterableIterator<[T, T]>;
|
|
39
|
-
keys(): IterableIterator<T>;
|
|
40
|
-
values(): IterableIterator<T>;
|
|
41
|
-
replace(other: ObservableSet<T> | IObservableSetInitialValues<T>): ObservableSet<T>;
|
|
42
|
-
observe(listener: (changes: ISetDidChange<T>) => void, fireImmediately?: boolean): Lambda;
|
|
43
|
-
intercept(handler: IInterceptor<ISetWillChange<T>>): Lambda;
|
|
44
|
-
toJS(): Set<T>;
|
|
45
|
-
toString(): string;
|
|
46
|
-
[Symbol.iterator](): IterableIterator<T>;
|
|
47
|
-
[Symbol.toStringTag]: "Set";
|
|
48
|
-
}
|
|
49
|
-
export declare const isObservableSet: (thing: any) => thing is ObservableSet<any>;
|
|
1
|
+
import { $mobx, 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
|
+
constructor(initialData?: IObservableSetInitialValues<T>, enhancer?: IEnhancer<T>, name?: string);
|
|
31
|
+
private dehanceValue;
|
|
32
|
+
clear(): void;
|
|
33
|
+
forEach(callbackFn: (value: T, value2: T, set: Set<T>) => void, thisArg?: any): void;
|
|
34
|
+
get size(): number;
|
|
35
|
+
add(value: T): this;
|
|
36
|
+
delete(value: any): boolean;
|
|
37
|
+
has(value: any): boolean;
|
|
38
|
+
entries(): IterableIterator<[T, T]>;
|
|
39
|
+
keys(): IterableIterator<T>;
|
|
40
|
+
values(): IterableIterator<T>;
|
|
41
|
+
replace(other: ObservableSet<T> | IObservableSetInitialValues<T>): ObservableSet<T>;
|
|
42
|
+
observe(listener: (changes: ISetDidChange<T>) => void, fireImmediately?: boolean): Lambda;
|
|
43
|
+
intercept(handler: IInterceptor<ISetWillChange<T>>): Lambda;
|
|
44
|
+
toJS(): Set<T>;
|
|
45
|
+
toString(): string;
|
|
46
|
+
[Symbol.iterator](): IterableIterator<T>;
|
|
47
|
+
[Symbol.toStringTag]: "Set";
|
|
48
|
+
}
|
|
49
|
+
export declare const isObservableSet: (thing: any) => thing is ObservableSet<any>;
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { Atom, IEnhancer, IInterceptable, IEqualsComparer, IInterceptor, IListenable, Lambda } 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
|
-
[Symbol.toPrimitive](): T;
|
|
37
|
-
}
|
|
38
|
-
export declare const isObservableValue: (x: any) => x is IObservableValue<any>;
|
|
1
|
+
import { Atom, IEnhancer, IInterceptable, IEqualsComparer, IInterceptor, IListenable, Lambda } 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
|
+
[Symbol.toPrimitive](): T;
|
|
37
|
+
}
|
|
38
|
+
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;
|
package/lib/utils/comparer.d.ts
CHANGED
|
@@ -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,9 +1,9 @@
|
|
|
1
|
-
export declare const mobxDidRunLazyInitializersSymbol: unique symbol;
|
|
2
|
-
export declare const mobxPendingDecorators: unique symbol;
|
|
3
|
-
export declare type BabelDescriptor = PropertyDescriptor & {
|
|
4
|
-
initializer?: () => any;
|
|
5
|
-
};
|
|
6
|
-
export declare type PropertyCreator = (instance: any, propertyName: PropertyKey, descriptor: BabelDescriptor | undefined, decoratorTarget: any, decoratorArgs: any[]) => void;
|
|
7
|
-
export declare function initializeInstance(target: any): any;
|
|
8
|
-
export declare function createPropDecorator(propertyInitiallyEnumerable: boolean, propertyCreator: PropertyCreator): Function;
|
|
9
|
-
export declare function quacksLikeADecorator(args: IArguments): boolean;
|
|
1
|
+
export declare const mobxDidRunLazyInitializersSymbol: unique symbol;
|
|
2
|
+
export declare const mobxPendingDecorators: unique symbol;
|
|
3
|
+
export declare type BabelDescriptor = PropertyDescriptor & {
|
|
4
|
+
initializer?: () => any;
|
|
5
|
+
};
|
|
6
|
+
export declare type PropertyCreator = (instance: any, propertyName: PropertyKey, descriptor: BabelDescriptor | undefined, decoratorTarget: any, decoratorArgs: any[]) => void;
|
|
7
|
+
export declare function initializeInstance(target: any): any;
|
|
8
|
+
export declare function createPropDecorator(propertyInitiallyEnumerable: boolean, propertyCreator: PropertyCreator): Function;
|
|
9
|
+
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;
|
package/lib/utils/iterable.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function makeIterable<T>(iterator: Iterator<T>): IterableIterator<T>;
|
|
1
|
+
export declare function makeIterable<T>(iterator: Iterator<T>): IterableIterator<T>;
|
package/lib/utils/utils.d.ts
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const OBFUSCATED_ERROR = "An invariant failed, however the error is obfuscated because this is a production build.";
|
|
3
|
-
export declare const EMPTY_ARRAY: never[];
|
|
4
|
-
export declare const EMPTY_OBJECT: {};
|
|
5
|
-
export interface Lambda {
|
|
6
|
-
(): void;
|
|
7
|
-
name?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare function getNextId(): number;
|
|
10
|
-
export declare function fail(message: string | boolean): never;
|
|
11
|
-
export declare function invariant(check: false, message?: string | boolean): never;
|
|
12
|
-
export declare function invariant(check: true, message?: string | boolean): void;
|
|
13
|
-
export declare function invariant(check: any, message?: string | boolean): void;
|
|
14
|
-
export declare function deprecated(msg: string): boolean;
|
|
15
|
-
export declare function deprecated(thing: string, replacement: string): boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Makes sure that the provided function is invoked at most once.
|
|
18
|
-
*/
|
|
19
|
-
export declare function once(func: Lambda): Lambda;
|
|
20
|
-
export declare const noop: () => void;
|
|
21
|
-
export declare function unique<T>(list: T[]): T[];
|
|
22
|
-
export declare function isObject(value: any): boolean;
|
|
23
|
-
export declare function isPlainObject(value: any): boolean;
|
|
24
|
-
export declare function
|
|
25
|
-
export declare function
|
|
26
|
-
export declare function
|
|
27
|
-
export declare function
|
|
28
|
-
export declare function
|
|
29
|
-
export declare function
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
export declare function
|
|
35
|
-
export declare function
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
export declare function
|
|
41
|
-
export declare function
|
|
42
|
-
export declare function
|
|
43
|
-
export declare
|
|
1
|
+
import { IObservableArray } from "../internal";
|
|
2
|
+
export declare const OBFUSCATED_ERROR = "An invariant failed, however the error is obfuscated because this is a production build.";
|
|
3
|
+
export declare const EMPTY_ARRAY: never[];
|
|
4
|
+
export declare const EMPTY_OBJECT: {};
|
|
5
|
+
export interface Lambda {
|
|
6
|
+
(): void;
|
|
7
|
+
name?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function getNextId(): number;
|
|
10
|
+
export declare function fail(message: string | boolean): never;
|
|
11
|
+
export declare function invariant(check: false, message?: string | boolean): never;
|
|
12
|
+
export declare function invariant(check: true, message?: string | boolean): void;
|
|
13
|
+
export declare function invariant(check: any, message?: string | boolean): void;
|
|
14
|
+
export declare function deprecated(msg: string): boolean;
|
|
15
|
+
export declare function deprecated(thing: string, replacement: string): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Makes sure that the provided function is invoked at most once.
|
|
18
|
+
*/
|
|
19
|
+
export declare function once(func: Lambda): Lambda;
|
|
20
|
+
export declare const noop: () => void;
|
|
21
|
+
export declare function unique<T>(list: T[]): T[];
|
|
22
|
+
export declare function isObject(value: any): boolean;
|
|
23
|
+
export declare function isPlainObject(value: any): boolean;
|
|
24
|
+
export declare function convertToMap(dataStructure: any): Map<any, any>;
|
|
25
|
+
export declare function makeNonEnumerable(object: any, propNames: PropertyKey[]): void;
|
|
26
|
+
export declare function addHiddenProp(object: any, propName: PropertyKey, value: any): void;
|
|
27
|
+
export declare function addHiddenFinalProp(object: any, propName: PropertyKey, value: any): void;
|
|
28
|
+
export declare function isPropertyConfigurable(object: any, prop: PropertyKey): boolean;
|
|
29
|
+
export declare function assertPropertyConfigurable(object: any, prop: PropertyKey): void;
|
|
30
|
+
export declare function createInstanceofPredicate<T>(name: string, clazz: new (...args: any[]) => T): (x: any) => x is T;
|
|
31
|
+
/**
|
|
32
|
+
* Returns whether the argument is an array, disregarding observability.
|
|
33
|
+
*/
|
|
34
|
+
export declare function isArrayLike(x: any): x is Array<any> | IObservableArray<any>;
|
|
35
|
+
export declare function isES6Map(thing: any): boolean;
|
|
36
|
+
export declare function isES6Set(thing: any): thing is Set<any>;
|
|
37
|
+
/**
|
|
38
|
+
* Returns the following: own keys, prototype keys & own symbol keys, if they are enumerable.
|
|
39
|
+
*/
|
|
40
|
+
export declare function getPlainObjectKeys(object: any): (string | number | symbol)[];
|
|
41
|
+
export declare function stringifyKey(key: any): string;
|
|
42
|
+
export declare function toPrimitive(value: any): any;
|
|
43
|
+
export declare const ownKeys: (target: any) => PropertyKey[];
|
package/package.json
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mobx",
|
|
3
|
-
"version": "5.15.
|
|
3
|
+
"version": "5.15.7",
|
|
4
4
|
"description": "Simple, scalable state management.",
|
|
5
|
-
"main": "lib/
|
|
5
|
+
"main": "lib/index.js",
|
|
6
6
|
"umd:main": "lib/mobx.umd.js",
|
|
7
7
|
"module": "lib/mobx.module.js",
|
|
8
|
-
"browser": {
|
|
9
|
-
"./lib/mobx.js": "./lib/mobx.js",
|
|
10
|
-
"./lib/mobx.module.js": "./lib/mobx.module.js"
|
|
11
|
-
},
|
|
12
8
|
"unpkg": "lib/mobx.umd.min.js",
|
|
13
9
|
"jsnext:main": "lib/mobx.module.js",
|
|
14
10
|
"react-native": "lib/mobx.module.js",
|
|
@@ -47,11 +43,5 @@
|
|
|
47
43
|
"functional-reactive-programming",
|
|
48
44
|
"state management",
|
|
49
45
|
"data flow"
|
|
50
|
-
]
|
|
51
|
-
"lint-staged": {
|
|
52
|
-
"*.{ts,tsx,js,jsx,md}": [
|
|
53
|
-
"prettier --write",
|
|
54
|
-
"git add"
|
|
55
|
-
]
|
|
56
|
-
}
|
|
46
|
+
]
|
|
57
47
|
}
|