1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 | export { IObservable, IDepTreeNode } from "./core/observable";
|
19 | export { Reaction, IReactionPublic, IReactionDisposer } from "./core/reaction";
|
20 | export { IDerivation, untracked, IDerivationState } from "./core/derivation";
|
21 | export { IAtom, Atom, BaseAtom } from "./core/atom";
|
22 | export { useStrict, isStrictModeEnabled, IAction } from "./core/action";
|
23 | export { spy } from "./core/spy";
|
24 | export { IComputedValue } from "./core/computedvalue";
|
25 | export { IEqualsComparer, comparer } from "./types/comparer";
|
26 | export { asReference, asFlat, asStructure, asMap } from "./types/modifiers-old";
|
27 | export { IModifierDescriptor, IEnhancer, isModifierDescriptor } from "./types/modifiers";
|
28 | export { IInterceptable, IInterceptor } from "./types/intercept-utils";
|
29 | export { IListenable } from "./types/listen-utils";
|
30 | export { IObjectWillChange, IObjectChange, IObservableObject, isObservableObject } from "./types/observableobject";
|
31 | export { IValueDidChange, IValueWillChange, IObservableValue, isObservableValue as isBoxedObservable } from "./types/observablevalue";
|
32 | export { IObservableArray, IArrayWillChange, IArrayWillSplice, IArrayChange, IArraySplice, isObservableArray } from "./types/observablearray";
|
33 | export { IKeyValueMap, ObservableMap, IMapEntries, IMapEntry, IMapWillChange, IMapChange, IMapChangeUpdate, IMapChangeAdd, IMapChangeBase, IMapChangeDelete, isObservableMap, map, IObservableMapInitialValues, IMap } from "./types/observablemap";
|
34 | export { transaction } from "./api/transaction";
|
35 | export { observable, IObservableFactory, IObservableFactories } from "./api/observable";
|
36 | export { computed, IComputed, IComputedValueOptions } from "./api/computed";
|
37 | export { isObservable } from "./api/isobservable";
|
38 | export { isComputed } from "./api/iscomputed";
|
39 | export { extendObservable, extendShallowObservable } from "./api/extendobservable";
|
40 | export { observe } from "./api/observe";
|
41 | export { intercept } from "./api/intercept";
|
42 | export { autorun, autorunAsync, when, reaction, IReactionOptions } from "./api/autorun";
|
43 | export { action, isAction, runInAction, IActionFactory } from "./api/action";
|
44 | export { expr } from "./api/expr";
|
45 | export { toJS } from "./api/tojs";
|
46 | export { ITransformer, createTransformer } from "./api/createtransformer";
|
47 | export { whyRun } from "./api/whyrun";
|
48 | export { Lambda, isArrayLike } from "./utils/utils";
|
49 | export { Iterator } from "./utils/iterable";
|
50 | export { IObserverTree, IDependencyTree } from "./api/extras";
|
51 | import { IDerivation } from "./core/derivation";
|
52 | import { IDepTreeNode } from "./core/observable";
|
53 | import { IObserverTree, IDependencyTree } from "./api/extras";
|
54 | import { Lambda } from "./utils/utils";
|
55 | import { IObservableArray } from "./types/observablearray";
|
56 | import { ObservableMap } from "./types/observablemap";
|
57 | import { IObservableValue } from "./types/observablevalue";
|
58 | export declare const extras: {
|
59 | allowStateChanges: <T>(allowStateChanges: boolean, func: () => T) => T;
|
60 | deepEqual: (a: any, b: any) => any;
|
61 | getAtom: (thing: any, property?: string | undefined) => IDepTreeNode;
|
62 | getDebugName: (thing: any, property?: string | undefined) => string;
|
63 | getDependencyTree: (thing: any, property?: string | undefined) => IDependencyTree;
|
64 | getAdministration: (thing: any, property?: string | undefined) => any;
|
65 | getGlobalState: () => any;
|
66 | getObserverTree: (thing: any, property?: string | undefined) => IObserverTree;
|
67 | interceptReads: {
|
68 | <T>(value: IObservableValue<T>, handler: (value: any) => T): Lambda;
|
69 | <T>(observableArray: IObservableArray<T>, handler: (value: any) => T): Lambda;
|
70 | <T>(observableMap: ObservableMap<T>, handler: (value: any) => T): Lambda;
|
71 | (object: Object, property: string, handler: (value: any) => any): Lambda;
|
72 | };
|
73 | isComputingDerivation: () => boolean;
|
74 | isSpyEnabled: () => boolean;
|
75 | onReactionError: (handler: (error: any, derivation: IDerivation) => void) => () => void;
|
76 | reserveArrayBuffer: (max: number) => void;
|
77 | resetGlobalState: () => void;
|
78 | isolateGlobalState: () => void;
|
79 | shareGlobalState: () => void;
|
80 | spyReport: (event: any) => void;
|
81 | spyReportEnd: (change?: any) => void;
|
82 | spyReportStart: (event: any) => void;
|
83 | setReactionScheduler: (fn: (f: () => void) => void) => void;
|
84 | };
|
85 | import { Reaction, IReactionPublic, IReactionDisposer } from "./core/reaction";
|
86 | import { Atom, BaseAtom } from "./core/atom";
|
87 | import { IComputedValue } from "./core/computedvalue";
|
88 | import { IModifierDescriptor } from "./types/modifiers";
|
89 | import { IInterceptor } from "./types/intercept-utils";
|
90 | import { IObjectWillChange, IObjectChange, IObservableObject } from "./types/observableobject";
|
91 | import { IValueDidChange, IValueWillChange } from "./types/observablevalue";
|
92 | import { IArrayWillChange, IArrayWillSplice, IArrayChange, IArraySplice } from "./types/observablearray";
|
93 | import { IKeyValueMap, IMapWillChange, IMapChange, IMap } from "./types/observablemap";
|
94 | import { IObservableFactory, IObservableFactories } from "./api/observable";
|
95 | import { IComputed } from "./api/computed";
|
96 | import { IReactionOptions } from "./api/autorun";
|
97 | import { IActionFactory } from "./api/action";
|
98 | import { ITransformer } from "./api/createtransformer";
|
99 | declare const everything: {
|
100 | Reaction: typeof Reaction;
|
101 | untracked: <T>(action: () => T) => T;
|
102 | Atom: typeof Atom;
|
103 | BaseAtom: typeof BaseAtom;
|
104 | useStrict: (strict: boolean) => void;
|
105 | isStrictModeEnabled: () => boolean;
|
106 | spy: (listener: (change: any) => void) => Lambda;
|
107 | comparer: {
|
108 | identity: (a: any, b: any) => boolean;
|
109 | structural: (a: any, b: any) => boolean;
|
110 | default: (a: any, b: any) => boolean;
|
111 | };
|
112 | asReference: <T>(value: T) => T;
|
113 | asFlat: <T>(value: T) => T;
|
114 | asStructure: <T>(value: T) => T;
|
115 | asMap: {
|
116 | (): ObservableMap<any>;
|
117 | <T>(): ObservableMap<T>;
|
118 | <T>(entries: [string, T][]): ObservableMap<T>;
|
119 | <T>(data: IKeyValueMap<T>): ObservableMap<T>;
|
120 | };
|
121 | isModifierDescriptor: (thing: any) => thing is IModifierDescriptor<any>;
|
122 | isObservableObject: (thing: any) => thing is IObservableObject;
|
123 | isBoxedObservable: (x: any) => x is IObservableValue<any>;
|
124 | isObservableArray: (thing: any) => thing is IObservableArray<any>;
|
125 | ObservableMap: typeof ObservableMap;
|
126 | isObservableMap: (thing: any) => thing is ObservableMap<any>;
|
127 | map: <V>(initialValues?: [string, V][] | IKeyValueMap<V> | IMap<string, V> | undefined) => ObservableMap<V>;
|
128 | transaction: <T>(action: () => T, thisArg?: undefined) => T;
|
129 | observable: IObservableFactory & IObservableFactories & {
|
130 | deep: {
|
131 | struct<T>(initialValue?: T | undefined): T;
|
132 | };
|
133 | ref: {
|
134 | struct<T>(initialValue?: T | undefined): T;
|
135 | };
|
136 | };
|
137 | computed: IComputed;
|
138 | isObservable: (value: any, property?: string | undefined) => boolean;
|
139 | isComputed: (value: any, property?: string | undefined) => boolean;
|
140 | extendObservable: <A extends Object, B extends Object>(target: A, ...properties: B[]) => A & B;
|
141 | extendShallowObservable: <A extends Object, B extends Object>(target: A, ...properties: B[]) => A & B;
|
142 | observe: {
|
143 | <T>(value: IObservableValue<T> | IComputedValue<T>, listener: (change: IValueDidChange<T>) => void, fireImmediately?: boolean | undefined): Lambda;
|
144 | <T>(observableArray: IObservableArray<T>, listener: (change: IArrayChange<T> | IArraySplice<T>) => void, fireImmediately?: boolean | undefined): Lambda;
|
145 | <T>(observableMap: ObservableMap<T>, listener: (change: IMapChange<T>) => void, fireImmediately?: boolean | undefined): Lambda;
|
146 | <T>(observableMap: ObservableMap<T>, property: string, listener: (change: IValueDidChange<T>) => void, fireImmediately?: boolean | undefined): Lambda;
|
147 | (object: Object, listener: (change: IObjectChange) => void, fireImmediately?: boolean | undefined): Lambda;
|
148 | (object: Object, property: string, listener: (change: IValueDidChange<any>) => void, fireImmediately?: boolean | undefined): Lambda;
|
149 | };
|
150 | intercept: {
|
151 | <T>(value: IObservableValue<T>, handler: IInterceptor<IValueWillChange<T>>): Lambda;
|
152 | <T>(observableArray: IObservableArray<T>, handler: IInterceptor<IArrayWillChange<T> | IArrayWillSplice<T>>): Lambda;
|
153 | <T>(observableMap: ObservableMap<T>, handler: IInterceptor<IMapWillChange<T>>): Lambda;
|
154 | <T>(observableMap: ObservableMap<T>, property: string, handler: IInterceptor<IValueWillChange<T>>): Lambda;
|
155 | (object: Object, handler: IInterceptor<IObjectWillChange>): Lambda;
|
156 | <T extends Object, K extends keyof T>(object: T, property: K, handler: IInterceptor<IValueWillChange<any>>): Lambda;
|
157 | };
|
158 | autorun: {
|
159 | (view: (r: IReactionPublic) => any, scope?: any): IReactionDisposer;
|
160 | (name: string, view: (r: IReactionPublic) => any, scope?: any): IReactionDisposer;
|
161 | };
|
162 | autorunAsync: {
|
163 | (name: string, func: (r: IReactionPublic) => any, delay?: number | undefined, scope?: any): IReactionDisposer;
|
164 | (func: (r: IReactionPublic) => any, delay?: number | undefined, scope?: any): IReactionDisposer;
|
165 | };
|
166 | when: {
|
167 | (name: string, predicate: () => boolean, effect: Lambda, scope?: any): IReactionDisposer;
|
168 | (predicate: () => boolean, effect: Lambda, scope?: any): Lambda;
|
169 | };
|
170 | reaction: {
|
171 | <T>(expression: (r: IReactionPublic) => T, effect: (arg: T, r: IReactionPublic) => void, opts?: IReactionOptions | undefined): IReactionDisposer;
|
172 | <T>(expression: (r: IReactionPublic) => T, effect: (arg: T, r: IReactionPublic) => void, fireImmediately?: boolean | undefined): IReactionDisposer;
|
173 | };
|
174 | action: IActionFactory;
|
175 | isAction: (thing: any) => boolean;
|
176 | runInAction: {
|
177 | <T>(block: () => T, scope?: any): T;
|
178 | <T>(name: string, block: () => T, scope?: any): T;
|
179 | };
|
180 | expr: <T>(expr: () => T, scope?: any) => T;
|
181 | toJS: {
|
182 | <T>(source: T, detectCycles?: boolean | undefined): T;
|
183 | (source: any, detectCycles?: boolean | undefined): any;
|
184 | (source: any, detectCycles: boolean, __alreadySeen: [any, any][]): any;
|
185 | };
|
186 | createTransformer: <A, B>(transformer: ITransformer<A, B>, onCleanup?: ((resultObject: B | undefined, sourceObject?: A | undefined) => void) | undefined) => ITransformer<A, B>;
|
187 | whyRun: (thing?: any, prop?: string | undefined) => string;
|
188 | isArrayLike: (x: any) => x is any[] | IObservableArray<any>;
|
189 | extras: {
|
190 | allowStateChanges: <T>(allowStateChanges: boolean, func: () => T) => T;
|
191 | deepEqual: (a: any, b: any) => any;
|
192 | getAtom: (thing: any, property?: string | undefined) => IDepTreeNode;
|
193 | getDebugName: (thing: any, property?: string | undefined) => string;
|
194 | getDependencyTree: (thing: any, property?: string | undefined) => IDependencyTree;
|
195 | getAdministration: (thing: any, property?: string | undefined) => any;
|
196 | getGlobalState: () => any;
|
197 | getObserverTree: (thing: any, property?: string | undefined) => IObserverTree;
|
198 | interceptReads: {
|
199 | <T>(value: IObservableValue<T>, handler: (value: any) => T): Lambda;
|
200 | <T>(observableArray: IObservableArray<T>, handler: (value: any) => T): Lambda;
|
201 | <T>(observableMap: ObservableMap<T>, handler: (value: any) => T): Lambda;
|
202 | (object: Object, property: string, handler: (value: any) => any): Lambda;
|
203 | };
|
204 | isComputingDerivation: () => boolean;
|
205 | isSpyEnabled: () => boolean;
|
206 | onReactionError: (handler: (error: any, derivation: IDerivation) => void) => () => void;
|
207 | reserveArrayBuffer: (max: number) => void;
|
208 | resetGlobalState: () => void;
|
209 | isolateGlobalState: () => void;
|
210 | shareGlobalState: () => void;
|
211 | spyReport: (event: any) => void;
|
212 | spyReportEnd: (change?: any) => void;
|
213 | spyReportStart: (event: any) => void;
|
214 | setReactionScheduler: (fn: (f: () => void) => void) => void;
|
215 | };
|
216 | };
|
217 | export default everything;
|