UNPKG

1.91 kBTypeScriptView Raw
1/**
2 * The Firebase Performance Monitoring Web SDK.
3 * This SDK does not work in a Node.js environment.
4 *
5 * @packageDocumentation
6 */
7/**
8 * @license
9 * Copyright 2020 Google LLC
10 *
11 * Licensed under the Apache License, Version 2.0 (the "License");
12 * you may not use this file except in compliance with the License.
13 * You may obtain a copy of the License at
14 *
15 * http://www.apache.org/licenses/LICENSE-2.0
16 *
17 * Unless required by applicable law or agreed to in writing, software
18 * distributed under the License is distributed on an "AS IS" BASIS,
19 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 * See the License for the specific language governing permissions and
21 * limitations under the License.
22 */
23import { FirebasePerformance, PerformanceSettings, PerformanceTrace } from './public_types';
24import { FirebaseApp } from '@firebase/app';
25import '@firebase/installations';
26/**
27 * Returns a {@link FirebasePerformance} instance for the given app.
28 * @param app - The {@link @firebase/app#FirebaseApp} to use.
29 * @public
30 */
31export declare function getPerformance(app?: FirebaseApp): FirebasePerformance;
32/**
33 * Returns a {@link FirebasePerformance} instance for the given app. Can only be called once.
34 * @param app - The {@link @firebase/app#FirebaseApp} to use.
35 * @param settings - Optional settings for the {@link FirebasePerformance} instance.
36 * @public
37 */
38export declare function initializePerformance(app: FirebaseApp, settings?: PerformanceSettings): FirebasePerformance;
39/**
40 * Returns a new `PerformanceTrace` instance.
41 * @param performance - The {@link FirebasePerformance} instance to use.
42 * @param name - The name of the trace.
43 * @public
44 */
45export declare function trace(performance: FirebasePerformance, name: string): PerformanceTrace;
46export { FirebasePerformance, PerformanceSettings, PerformanceTrace };