Last active
March 1, 2021 11:56
-
-
Save luchsamapparat/552d0cd29c159d055ca419d5c8d51692 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import { pull } from 'lodash-es'; | |
declare var Zone; | |
const updateTaskCount: Function = Zone.prototype._updateTaskCount; | |
window['debug__tasks'] = []; | |
Zone.prototype._updateTaskCount = function () { | |
// tslint:disable-next-line:no-console | |
console.log(arguments); | |
if (arguments[1] === -1) { | |
pull(window['debug__tasks'], arguments[0]); | |
} else { | |
window['debug__tasks'].push(arguments[0]); | |
// if (arguments[0].source === 'setInterval') { | |
// debugger; | |
// } | |
} | |
updateTaskCount.apply(this, arguments); | |
}; | |
window.debug__tasks.map(task => task.source); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment