MCPcopy
hub / github.com/angular/angular / resetNgDevModeCounters

Function resetNgDevModeCounters

packages/platform-server/test/hydration_utils.ts:299–310  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

297
298// Clears all the counts in ngDevMode
299export function resetNgDevModeCounters() {
300 if (typeof ngDevMode === 'object') {
301 // Reset all ngDevMode counters.
302 for (const metric of Object.keys(ngDevMode!)) {
303 const currentValue = (ngDevMode as unknown as {[key: string]: number | boolean})[metric];
304 if (typeof currentValue === 'number') {
305 // Rest only numeric values, which represent counters.
306 (ngDevMode as unknown as {[key: string]: number | boolean})[metric] = 0;
307 }
308 }
309 }
310}

Calls 1

keysMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…