()
| 36 | } |
| 37 | |
| 38 | function ngDevModeResetPerfCounters(): NgDevModePerfCounters { |
| 39 | const locationString = typeof location !== 'undefined' ? location.toString() : ''; |
| 40 | const newCounters: NgDevModePerfCounters = { |
| 41 | hydratedNodes: 0, |
| 42 | hydratedComponents: 0, |
| 43 | dehydratedViewsRemoved: 0, |
| 44 | dehydratedViewsCleanupRuns: 0, |
| 45 | componentsSkippedHydration: 0, |
| 46 | deferBlocksWithIncrementalHydration: 0, |
| 47 | }; |
| 48 | |
| 49 | // Make sure to refer to ngDevMode as ['ngDevMode'] for closure. |
| 50 | const allowNgDevModeTrue = locationString.indexOf('ngDevMode=false') === -1; |
| 51 | if (!allowNgDevModeTrue) { |
| 52 | global['ngDevMode'] = false; |
| 53 | } else { |
| 54 | if (typeof global['ngDevMode'] !== 'object') { |
| 55 | global['ngDevMode'] = {}; |
| 56 | } |
| 57 | Object.assign(global['ngDevMode'], newCounters); |
| 58 | } |
| 59 | return newCounters; |
| 60 | } |
| 61 | |
| 62 | /** |
| 63 | * This function checks to see if the `ngDevMode` has been set. If yes, |
no test coverage detected
searching dependent graphs…