index.d.ts 1.8 KB

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