import { getDefaultBrowser } from '../utils/defaults';
export var ERROR_SUBJECT_NAME = 'err_0';
export var observeError = function (next, tearDown) {
    var window = getDefaultBrowser();
    if (!window)
        return;
    window.addEventListener('error', next, true);
    tearDown(function () {
        window.removeEventListener('error', next, true);
    });
};
export var errorSubject = [ERROR_SUBJECT_NAME, observeError];
//# sourceMappingURL=error.js.map