(callback: () => T)
| 21 | * processes such as server-side rendering or client-side hydration. |
| 22 | */ |
| 23 | export 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 | } |
no test coverage detected