Created
October 31, 2016 20:51
-
-
Save mohsen1/967ec8426e4539d371221222088c220e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare module 'mobx-remotedev' { | |
/** | |
* Connect MobX Remote Dev | |
* | |
* @param store observable or class to be monitored. In case you want to change its values | |
* (to time travel or cancel actions), you should export its result as in the example | |
* above (so we can extend the class). | |
* @param config Configuration | |
* | |
* @return store | |
*/ | |
function mobXRemoteDev(store: Function | Object, config?: mobXRemoteDevNS.IMobXRemoteDevConfig): Object; | |
namespace mobXRemoteDevNS { | |
interface IMobXRemoteDevConfig { | |
/** the instance name to be showed on the monitor page. Default value is document.title. */ | |
name?: string; | |
/** | |
* set it to true to have a clear log only with actions. If MobX is in strict mode, it is true by default. | |
* Don't forget about async actions. | |
*/ | |
onlyActions?: boolean; | |
/** | |
* set it to true in order to assign dispatching of all unhandled actions to this store. Useful for nested | |
* classes / observables or when having async actions without specifying the scope explicitly. | |
*/ | |
global?: boolean; | |
/** all other actions will be hidden in DevTools (the blacklist parameter will be ignored). */ | |
whitelist?: Array<RegExp | string>; | |
/** set it to true to have remote monitoring via the local or remotedev.io server. */ | |
remote?: boolean; | |
/** use to specify host for remotedev-server. If port is specified, default value is localhost. */ | |
hostname?: string; | |
/** use to specify host's port for remotedev-server. */ | |
port?: number; | |
} | |
} | |
export = mobXRemoteDev; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment