Skip to content

Commit bb46b6b

Browse files
and-olidevversion
authored andcommitted
refactor(devtools): Use chrome.devtools.performance types (angular#58015)
The chrome.devtools.performance types were added to the DefinitelyTyped module and as such we don't need to make use of any to circumvent the missing types. See: DefinitelyTyped/DefinitelyTyped#70231 PR Close angular#58015
1 parent f2bea3b commit bb46b6b

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

devtools/projects/shell-browser/src/app/app.component.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,14 @@ export class AppComponent implements OnInit {
2727
chrome.devtools.network.onNavigated.addListener(() => {
2828
window.location.reload();
2929
});
30-
// At the moment the chrome.devtools.performance namespace does not
31-
// have an entry in DefinitelyTyped, so this is a temporary
32-
// workaround to prevent TypeScript failures while the corresponding
33-
// type is added upstream.
34-
const chromeDevToolsPerformance = (chrome.devtools as any).performance;
30+
const chromeDevToolsPerformance = chrome.devtools.performance;
3531
chromeDevToolsPerformance?.onProfilingStarted?.addListener?.(this.onProfilingStartedListener);
3632
chromeDevToolsPerformance?.onProfilingStopped?.addListener?.(this.onProfilingStoppedListener);
3733

3834
this._cd.detectChanges();
3935
}
4036
ngOnDestroy(): void {
41-
const chromeDevToolsPerformance = (chrome.devtools as any).performance;
37+
const chromeDevToolsPerformance = chrome.devtools.performance;
4238
chromeDevToolsPerformance?.onProfilingStarted?.removeListener?.(
4339
this.onProfilingStartedListener,
4440
);

0 commit comments

Comments
 (0)