constructor(state: ?Object) { this._toggleEvents = new Subject(); this._shouldRenderDiagnostics = this._toggleEvents.scan(prev => !prev, false); this._disposables = new CompositeDisposable(); this._activeEditorRegistry = new ActiveEditorRegistry( resultFunction, {updateOnEdit: false}, ); this._disposables.add( atom.commands.add( 'atom-workspace', 'nuclide-type-coverage:toggle-inline-display', () => this._toggleEvents.next(), ), ); this._disposables.add(new DisposableSubscription( this._toggleEvents.subscribe(() => track('nuclide-type-coverage:toggle')), ), ); }