MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / runOutsideAngular

Function runOutsideAngular

packages/angular/src/zone.ts:23–30  ·  view source on GitHub ↗
(callback: () => T)

Source from the content-addressed store, hash-verified

21 * processes such as server-side rendering or client-side hydration.
22 */
23export function runOutsideAngular<T>(callback: () => T): T {
24 // Running the `callback` within the root execution context enables Angular
25 // processes (such as SSR and hydration) to continue functioning normally without
26 // timeouts and delays that could affect the user experience. This approach is
27 // necessary because some of the Sentry functionality continues to run in the background.
28 // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
29 return isNgZoneEnabled ? Zone.root.run(callback) : callback();
30}

Callers 6

handleErrorMethod · 0.90
TraceServiceClass · 0.90
ngOnInitMethod · 0.90
ngAfterViewInitMethod · 0.90
TraceClassFunction · 0.90
TraceMethodFunction · 0.90

Calls 2

runMethod · 0.65
callbackFunction · 0.50

Tested by

no test coverage detected