Skip to content

Commit 4cb34ed

Browse files
committed
update perf types
1 parent 0442436 commit 4cb34ed

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

common/api-review/performance-exp.api.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@
77
import { FirebaseApp } from '@firebase/app-exp';
88

99
// @public
10-
export interface FirebasePerformance {
11-
dataCollectionEnabled: boolean;
12-
instrumentationEnabled: boolean;
13-
}
10+
export function getPerformance(app?: FirebaseApp): PerformanceMonitoring;
1411

1512
// @public
16-
export function getPerformance(app?: FirebaseApp): FirebasePerformance;
13+
export function initializePerformance(app: FirebaseApp, settings?: PerformanceSettings): PerformanceMonitoring;
1714

1815
// @public
19-
export function initializePerformance(app: FirebaseApp, settings?: PerformanceSettings): FirebasePerformance;
16+
export interface PerformanceMonitoring {
17+
dataCollectionEnabled: boolean;
18+
instrumentationEnabled: boolean;
19+
}
2020

2121
// @public
2222
export interface PerformanceSettings {
@@ -48,7 +48,7 @@ export interface PerformanceTrace {
4848
}
4949

5050
// @public
51-
export function trace(performance: FirebasePerformance, name: string): PerformanceTrace;
51+
export function trace(performance: PerformanceMonitoring, name: string): PerformanceTrace;
5252

5353

5454
```

packages-exp/performance-exp/src/controllers/perf.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ import { getInitializationPromise } from '../services/initialization_service';
2121
import { Api } from '../services/api_service';
2222
import { FirebaseApp } from '@firebase/app-exp';
2323
import { _FirebaseInstallationsInternal } from '@firebase/installations-exp';
24-
import { PerformanceSettings, FirebasePerformance } from '../public_types';
24+
import { PerformanceSettings, PerformanceMonitoring } from '../public_types';
2525
import { validateIndexedDBOpenable } from '@firebase/util';
2626
import { setupTransportService } from '../services/transport_service';
2727
import { consoleLogger } from '../utils/console_logger';
2828

29-
export class PerformanceController implements FirebasePerformance {
29+
export class PerformanceController implements PerformanceMonitoring {
3030
private initialized: boolean = false;
3131

3232
constructor(

packages-exp/performance-exp/src/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*/
2323

2424
import {
25-
FirebasePerformance,
25+
PerformanceMonitoring,
2626
PerformanceSettings,
2727
PerformanceTrace
2828
} from './public_types';
@@ -56,7 +56,7 @@ const DEFAULT_ENTRY_NAME = '[DEFAULT]';
5656
*/
5757
export function getPerformance(
5858
app: FirebaseApp = getApp()
59-
): FirebasePerformance {
59+
): PerformanceMonitoring {
6060
app = getModularInstance(app);
6161
const provider = _getProvider(app, 'performance-exp');
6262
const perfInstance = provider.getImmediate() as PerformanceController;
@@ -72,7 +72,7 @@ export function getPerformance(
7272
export function initializePerformance(
7373
app: FirebaseApp,
7474
settings?: PerformanceSettings
75-
): FirebasePerformance {
75+
): PerformanceMonitoring {
7676
app = getModularInstance(app);
7777
const provider = _getProvider(app, 'performance-exp');
7878

@@ -95,7 +95,7 @@ export function initializePerformance(
9595
* @public
9696
*/
9797
export function trace(
98-
performance: FirebasePerformance,
98+
performance: PerformanceMonitoring,
9999
name: string
100100
): PerformanceTrace {
101101
performance = getModularInstance(performance);
@@ -134,4 +134,4 @@ function registerPerformance(): void {
134134
registerPerformance();
135135
registerVersion(name, version);
136136

137-
export { FirebasePerformance, PerformanceSettings, PerformanceTrace };
137+
export { PerformanceMonitoring, PerformanceSettings, PerformanceTrace };

packages-exp/performance-exp/src/public_types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export interface PerformanceSettings {
3333
*
3434
* @public
3535
*/
36-
export interface FirebasePerformance {
36+
export interface PerformanceMonitoring {
3737
/**
3838
* Controls the logging of automatic traces and HTTP/S network monitoring.
3939
*/
@@ -130,6 +130,6 @@ export interface PerformanceTrace {
130130

131131
declare module '@firebase/component' {
132132
interface NameServiceMapping {
133-
'performance-exp': FirebasePerformance;
133+
'performance-exp': PerformanceMonitoring;
134134
}
135135
}

0 commit comments

Comments
 (0)