refactor(platform-browser): remove type assertion on console.profileEnd (#26303)
Since typescript v3.1 type definition for console.profileEnd is fixed and type assertion 'any' is not needed any more PR Close #26303
This commit is contained in:
		
							parent
							
								
									6a64ac4151
								
							
						
					
					
						commit
						0a3f8173f0
					
				| @ -56,11 +56,7 @@ export class AngularProfiler { | ||||
|     } | ||||
|     const end = getDOM().performanceNow(); | ||||
|     if (record && isProfilerAvailable) { | ||||
|       // need to cast to <any> because type checker thinks there's no argument
 | ||||
|       // while in fact there is:
 | ||||
|       //
 | ||||
|       // https://developer.mozilla.org/en-US/docs/Web/API/Console/profileEnd
 | ||||
|       (<any>window.console.profileEnd)(profileName); | ||||
|       window.console.profileEnd(profileName); | ||||
|     } | ||||
|     const msPerTick = (end - start) / numTicks; | ||||
|     window.console.log(`ran ${numTicks} change detection cycles`); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user