Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private createProxyStateTree(
configuration: IConfiguration,
eventHub: EventEmitter | MockedEventEmitter,
devmode: boolean
) {
const proxyStateTree = new ProxyStateTree(
this.getState(configuration) as any,
{
devmode,
dynamicWrapper: (tree, path, func) =>
func(eventHub, tree, proxyStateTree, path),
onGetter: devmode
? (path, value) => {
this.eventHub.emitAsync(EventType.GETTER, {
path,
value: safeValue(value),
})
}
: undefined,
}
)