@@ -10,72 +10,30 @@ import {
10
10
setLogLevel as _setLogLevel ,
11
11
} from 'firebase/app' ;
12
12
13
- export function deleteApp ( ...args : Parameters < typeof _deleteApp > ) : ReturnType < typeof _deleteApp > {
14
- if ( typeof FastBoot === 'undefined' ) {
15
- return _deleteApp ( ...args ) ;
16
- }
17
-
18
- const { deleteApp : __deleteApp } = FastBoot . require ( 'firebase/app' ) ;
19
-
20
- return __deleteApp ( ...args ) ;
13
+ let __deleteApp : typeof _deleteApp = _deleteApp ;
14
+ let __getApp : typeof _getApp = _getApp ;
15
+ let __getApps : typeof _getApps = _getApps ;
16
+ let __initializeApp : typeof _initializeApp = _initializeApp ;
17
+ let __onLog : typeof _onLog = _onLog ;
18
+ let __registerVersion : typeof _registerVersion = _registerVersion ;
19
+ let __setLogLevel : typeof _setLogLevel = _setLogLevel ;
20
+
21
+ if ( typeof FastBoot !== 'undefined' ) {
22
+ ( {
23
+ deleteApp : __deleteApp ,
24
+ getApp : __getApp ,
25
+ getApps : __getApps ,
26
+ initializeApp : __initializeApp ,
27
+ onLog : __onLog ,
28
+ registerVersion : __registerVersion ,
29
+ setLogLevel : __setLogLevel ,
30
+ } = FastBoot . require ( 'firebase/app' ) ) ;
21
31
}
22
32
23
- export function getApp ( ...args : Parameters < typeof _getApp > ) : ReturnType < typeof _getApp > {
24
- if ( typeof FastBoot === 'undefined' ) {
25
- return _getApp ( ...args ) ;
26
- }
27
-
28
- const { getApp : __getApp } = FastBoot . require ( 'firebase/app' ) ;
29
-
30
- return __getApp ( ...args ) ;
31
- }
32
-
33
- export function getApps ( ...args : Parameters < typeof _getApps > ) : ReturnType < typeof _getApps > {
34
- if ( typeof FastBoot === 'undefined' ) {
35
- return _getApps ( ...args ) ;
36
- }
37
-
38
- const { getApps : __getApps } = FastBoot . require ( 'firebase/app' ) ;
39
-
40
- return __getApps ( ...args ) ;
41
- }
42
-
43
- export function initializeApp ( ...args : Parameters < typeof _initializeApp > ) : ReturnType < typeof _initializeApp > {
44
- if ( typeof FastBoot === 'undefined' ) {
45
- return _initializeApp ( ...args ) ;
46
- }
47
-
48
- const { initializeApp : __initializeApp } = FastBoot . require ( 'firebase/app' ) ;
49
-
50
- return __initializeApp ( ...args ) ;
51
- }
52
-
53
- export function onLog ( ...args : Parameters < typeof _onLog > ) : ReturnType < typeof _onLog > {
54
- if ( typeof FastBoot === 'undefined' ) {
55
- return _onLog ( ...args ) ;
56
- }
57
-
58
- const { onLog : __onLog } = FastBoot . require ( 'firebase/app' ) ;
59
-
60
- return __onLog ( ...args ) ;
61
- }
62
-
63
- export function registerVersion ( ...args : Parameters < typeof _registerVersion > ) : ReturnType < typeof _registerVersion > {
64
- if ( typeof FastBoot === 'undefined' ) {
65
- return _registerVersion ( ...args ) ;
66
- }
67
-
68
- const { registerVersion : __registerVersion } = FastBoot . require ( 'firebase/app' ) ;
69
-
70
- return __registerVersion ( ...args ) ;
71
- }
72
-
73
- export function setLogLevel ( ...args : Parameters < typeof _setLogLevel > ) : ReturnType < typeof _setLogLevel > {
74
- if ( typeof FastBoot === 'undefined' ) {
75
- return _setLogLevel ( ...args ) ;
76
- }
77
-
78
- const { setLogLevel : __setLogLevel } = FastBoot . require ( 'firebase/app' ) ;
79
-
80
- return __setLogLevel ( ...args ) ;
81
- }
33
+ export const deleteApp = __deleteApp ;
34
+ export const getApp = __getApp ;
35
+ export const getApps = __getApps ;
36
+ export const initializeApp = __initializeApp ;
37
+ export const onLog = __onLog ;
38
+ export const registerVersion = __registerVersion ;
39
+ export const setLogLevel = __setLogLevel ;
0 commit comments