Skip to content

Commit a94aa78

Browse files
committed
Add jsdoc to angular FirebaseErrorHandler telemetry API
1 parent a92f2bc commit a94aa78

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

packages/telemetry/src/angular/index.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,30 @@ registerTelemetry();
2828

2929
export * from '../public-types';
3030

31+
/**
32+
* A custom ErrorHandler that captures uncaught errors and sends them to Firebase Telemetry.
33+
*
34+
* This should be provided in your application's root module.
35+
*
36+
* @example
37+
* ```typescript
38+
* import { ErrorHandler } from '@angular/core';
39+
* import { FirebaseErrorHandler } from '@firebase/telemetry-angular';
40+
*
41+
* @NgModule({
42+
* // ...
43+
* providers: [
44+
* { provide: ErrorHandler, useClass: FirebaseErrorHandler }
45+
* ],
46+
* // ...
47+
* })
48+
* export class AppModule { }
49+
* ```
50+
*
51+
* @param telemetryOptions - {@link TelemetryOptions} that configure the Telemetry instance.
52+
*
53+
* @public
54+
*/
3155
export class FirebaseErrorHandler implements ErrorHandler {
3256
private readonly router = inject(Router);
3357

0 commit comments

Comments
 (0)