No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.esm5.js 3.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. import firebase from '@firebase/app-compat';
  2. import { Component } from '@firebase/component';
  3. import { trace } from '@firebase/performance';
  4. /**
  5. * @license
  6. * Copyright 2020 Google LLC
  7. *
  8. * Licensed under the Apache License, Version 2.0 (the "License");
  9. * you may not use this file except in compliance with the License.
  10. * You may obtain a copy of the License at
  11. *
  12. * http://www.apache.org/licenses/LICENSE-2.0
  13. *
  14. * Unless required by applicable law or agreed to in writing, software
  15. * distributed under the License is distributed on an "AS IS" BASIS,
  16. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17. * See the License for the specific language governing permissions and
  18. * limitations under the License.
  19. */
  20. var PerformanceCompatImpl = /** @class */ (function () {
  21. function PerformanceCompatImpl(app, _delegate) {
  22. this.app = app;
  23. this._delegate = _delegate;
  24. }
  25. Object.defineProperty(PerformanceCompatImpl.prototype, "instrumentationEnabled", {
  26. get: function () {
  27. return this._delegate.instrumentationEnabled;
  28. },
  29. set: function (val) {
  30. this._delegate.instrumentationEnabled = val;
  31. },
  32. enumerable: false,
  33. configurable: true
  34. });
  35. Object.defineProperty(PerformanceCompatImpl.prototype, "dataCollectionEnabled", {
  36. get: function () {
  37. return this._delegate.dataCollectionEnabled;
  38. },
  39. set: function (val) {
  40. this._delegate.dataCollectionEnabled = val;
  41. },
  42. enumerable: false,
  43. configurable: true
  44. });
  45. PerformanceCompatImpl.prototype.trace = function (traceName) {
  46. return trace(this._delegate, traceName);
  47. };
  48. return PerformanceCompatImpl;
  49. }());
  50. var name = "@firebase/performance-compat";
  51. var version = "0.2.1";
  52. /**
  53. * @license
  54. * Copyright 2020 Google LLC
  55. *
  56. * Licensed under the Apache License, Version 2.0 (the "License");
  57. * you may not use this file except in compliance with the License.
  58. * You may obtain a copy of the License at
  59. *
  60. * http://www.apache.org/licenses/LICENSE-2.0
  61. *
  62. * Unless required by applicable law or agreed to in writing, software
  63. * distributed under the License is distributed on an "AS IS" BASIS,
  64. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  65. * See the License for the specific language governing permissions and
  66. * limitations under the License.
  67. */
  68. function registerPerformanceCompat(firebaseInstance) {
  69. firebaseInstance.INTERNAL.registerComponent(new Component('performance-compat', performanceFactory, "PUBLIC" /* ComponentType.PUBLIC */));
  70. firebaseInstance.registerVersion(name, version);
  71. }
  72. function performanceFactory(container) {
  73. var app = container.getProvider('app-compat').getImmediate();
  74. // The following call will always succeed.
  75. var performance = container.getProvider('performance').getImmediate();
  76. return new PerformanceCompatImpl(app, performance);
  77. }
  78. registerPerformanceCompat(firebase);
  79. //# sourceMappingURL=index.esm5.js.map