@firebase/app 0.13.1 → 0.13.2-canary.25b60fdaa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/src/api.d.ts +30 -2
- package/dist/app/src/global_index.d.ts +42 -5
- package/dist/app/src/internal.d.ts +12 -3
- package/dist/app-public.d.ts +33 -2
- package/dist/app.d.ts +43 -4
- package/dist/esm/app/src/api.d.ts +30 -2
- package/dist/esm/app/src/internal.d.ts +12 -3
- package/dist/esm/{index.esm2017.js → index.esm.js} +72 -38
- package/dist/esm/index.esm.js.map +1 -0
- package/dist/index.cjs.js +71 -36
- package/dist/index.cjs.js.map +1 -1
- package/package.json +10 -8
- package/dist/esm/index.esm2017.js.map +0 -1
package/dist/app/src/api.d.ts
CHANGED
|
@@ -65,6 +65,10 @@ export declare const SDK_VERSION: string;
|
|
|
65
65
|
*
|
|
66
66
|
* @returns The initialized app.
|
|
67
67
|
*
|
|
68
|
+
* @throws If the optional `name` parameter is malformed or empty.
|
|
69
|
+
*
|
|
70
|
+
* @throws If a `FirebaseApp` already exists with the same name but with a different configuration.
|
|
71
|
+
*
|
|
68
72
|
* @public
|
|
69
73
|
*/
|
|
70
74
|
export declare function initializeApp(options: FirebaseOptions, name?: string): FirebaseApp;
|
|
@@ -74,6 +78,9 @@ export declare function initializeApp(options: FirebaseOptions, name?: string):
|
|
|
74
78
|
* @param options - Options to configure the app's services.
|
|
75
79
|
* @param config - FirebaseApp Configuration
|
|
76
80
|
*
|
|
81
|
+
* @throws If {@link FirebaseAppSettings.name} is defined but the value is malformed or empty.
|
|
82
|
+
*
|
|
83
|
+
* @throws If a `FirebaseApp` already exists with the same name but with a different configuration.
|
|
77
84
|
* @public
|
|
78
85
|
*/
|
|
79
86
|
export declare function initializeApp(options: FirebaseOptions, config?: FirebaseAppSettings): FirebaseApp;
|
|
@@ -118,13 +125,34 @@ export declare function initializeApp(): FirebaseApp;
|
|
|
118
125
|
*
|
|
119
126
|
* @param options - `Firebase.AppOptions` to configure the app's services, or a
|
|
120
127
|
* a `FirebaseApp` instance which contains the `AppOptions` within.
|
|
121
|
-
* @param config - `FirebaseServerApp`
|
|
128
|
+
* @param config - Optional `FirebaseServerApp` settings.
|
|
129
|
+
*
|
|
130
|
+
* @returns The initialized `FirebaseServerApp`.
|
|
131
|
+
*
|
|
132
|
+
* @throws If invoked in an unsupported non-server environment such as a browser.
|
|
133
|
+
*
|
|
134
|
+
* @throws If {@link FirebaseServerAppSettings.releaseOnDeref} is defined but the runtime doesn't
|
|
135
|
+
* provide Finalization Registry support.
|
|
136
|
+
*
|
|
137
|
+
* @public
|
|
138
|
+
*/
|
|
139
|
+
export declare function initializeServerApp(options: FirebaseOptions | FirebaseApp, config?: FirebaseServerAppSettings): FirebaseServerApp;
|
|
140
|
+
/**
|
|
141
|
+
* Creates and initializes a {@link @firebase/app#FirebaseServerApp} instance.
|
|
142
|
+
*
|
|
143
|
+
* @param config - Optional `FirebaseServerApp` settings.
|
|
122
144
|
*
|
|
123
145
|
* @returns The initialized `FirebaseServerApp`.
|
|
124
146
|
*
|
|
147
|
+
* @throws If invoked in an unsupported non-server environment such as a browser.
|
|
148
|
+
* @throws If {@link FirebaseServerAppSettings.releaseOnDeref} is defined but the runtime doesn't
|
|
149
|
+
* provide Finalization Registry support.
|
|
150
|
+
* @throws If the `FIREBASE_OPTIONS` enviornment variable does not contain a valid project
|
|
151
|
+
* configuration required for auto-initialization.
|
|
152
|
+
*
|
|
125
153
|
* @public
|
|
126
154
|
*/
|
|
127
|
-
export declare function initializeServerApp(
|
|
155
|
+
export declare function initializeServerApp(config?: FirebaseServerAppSettings): FirebaseServerApp;
|
|
128
156
|
/**
|
|
129
157
|
* Retrieves a {@link @firebase/app#FirebaseApp} instance.
|
|
130
158
|
*
|
|
@@ -641,6 +641,10 @@ declare const SDK_VERSION: string;
|
|
|
641
641
|
*
|
|
642
642
|
* @returns The initialized app.
|
|
643
643
|
*
|
|
644
|
+
* @throws If the optional `name` parameter is malformed or empty.
|
|
645
|
+
*
|
|
646
|
+
* @throws If a `FirebaseApp` already exists with the same name but with a different configuration.
|
|
647
|
+
*
|
|
644
648
|
* @public
|
|
645
649
|
*/
|
|
646
650
|
declare function initializeApp(options: FirebaseOptions, name?: string): FirebaseApp;
|
|
@@ -650,6 +654,9 @@ declare function initializeApp(options: FirebaseOptions, name?: string): Firebas
|
|
|
650
654
|
* @param options - Options to configure the app's services.
|
|
651
655
|
* @param config - FirebaseApp Configuration
|
|
652
656
|
*
|
|
657
|
+
* @throws If {@link FirebaseAppSettings.name} is defined but the value is malformed or empty.
|
|
658
|
+
*
|
|
659
|
+
* @throws If a `FirebaseApp` already exists with the same name but with a different configuration.
|
|
653
660
|
* @public
|
|
654
661
|
*/
|
|
655
662
|
declare function initializeApp(options: FirebaseOptions, config?: FirebaseAppSettings): FirebaseApp;
|
|
@@ -694,13 +701,34 @@ declare function initializeApp(): FirebaseApp;
|
|
|
694
701
|
*
|
|
695
702
|
* @param options - `Firebase.AppOptions` to configure the app's services, or a
|
|
696
703
|
* a `FirebaseApp` instance which contains the `AppOptions` within.
|
|
697
|
-
* @param config - `FirebaseServerApp`
|
|
704
|
+
* @param config - Optional `FirebaseServerApp` settings.
|
|
698
705
|
*
|
|
699
706
|
* @returns The initialized `FirebaseServerApp`.
|
|
700
707
|
*
|
|
708
|
+
* @throws If invoked in an unsupported non-server environment such as a browser.
|
|
709
|
+
*
|
|
710
|
+
* @throws If {@link FirebaseServerAppSettings.releaseOnDeref} is defined but the runtime doesn't
|
|
711
|
+
* provide Finalization Registry support.
|
|
712
|
+
*
|
|
701
713
|
* @public
|
|
702
714
|
*/
|
|
703
|
-
declare function initializeServerApp(options: FirebaseOptions | FirebaseApp, config
|
|
715
|
+
declare function initializeServerApp(options: FirebaseOptions | FirebaseApp, config?: FirebaseServerAppSettings): FirebaseServerApp;
|
|
716
|
+
/**
|
|
717
|
+
* Creates and initializes a {@link @firebase/app#FirebaseServerApp} instance.
|
|
718
|
+
*
|
|
719
|
+
* @param config - Optional `FirebaseServerApp` settings.
|
|
720
|
+
*
|
|
721
|
+
* @returns The initialized `FirebaseServerApp`.
|
|
722
|
+
*
|
|
723
|
+
* @throws If invoked in an unsupported non-server environment such as a browser.
|
|
724
|
+
* @throws If {@link FirebaseServerAppSettings.releaseOnDeref} is defined but the runtime doesn't
|
|
725
|
+
* provide Finalization Registry support.
|
|
726
|
+
* @throws If the `FIREBASE_OPTIONS` enviornment variable does not contain a valid project
|
|
727
|
+
* configuration required for auto-initialization.
|
|
728
|
+
*
|
|
729
|
+
* @public
|
|
730
|
+
*/
|
|
731
|
+
declare function initializeServerApp(config?: FirebaseServerAppSettings): FirebaseServerApp;
|
|
704
732
|
/**
|
|
705
733
|
* Retrieves a {@link @firebase/app#FirebaseApp} instance.
|
|
706
734
|
*
|
|
@@ -876,13 +904,22 @@ declare function _getProvider<T extends Name>(app: FirebaseApp, name: T): Provid
|
|
|
876
904
|
declare function _removeServiceInstance<T extends Name>(app: FirebaseApp, name: T, instanceIdentifier?: string): void;
|
|
877
905
|
/**
|
|
878
906
|
*
|
|
879
|
-
* @param obj - an object of type FirebaseApp or
|
|
907
|
+
* @param obj - an object of type FirebaseApp, FirebaseOptions or FirebaseAppSettings.
|
|
880
908
|
*
|
|
881
909
|
* @returns true if the provide object is of type FirebaseApp.
|
|
882
910
|
*
|
|
883
911
|
* @internal
|
|
884
912
|
*/
|
|
885
|
-
declare function _isFirebaseApp(obj: FirebaseApp | FirebaseOptions): obj is FirebaseApp;
|
|
913
|
+
declare function _isFirebaseApp(obj: FirebaseApp | FirebaseOptions | FirebaseAppSettings): obj is FirebaseApp;
|
|
914
|
+
/**
|
|
915
|
+
*
|
|
916
|
+
* @param obj - an object of type FirebaseApp, FirebaseOptions or FirebaseAppSettings.
|
|
917
|
+
*
|
|
918
|
+
* @returns true if the provided object is of type FirebaseServerAppImpl.
|
|
919
|
+
*
|
|
920
|
+
* @internal
|
|
921
|
+
*/
|
|
922
|
+
declare function _isFirebaseServerAppSettings(obj: FirebaseApp | FirebaseOptions | FirebaseAppSettings): obj is FirebaseServerAppSettings;
|
|
886
923
|
/**
|
|
887
924
|
*
|
|
888
925
|
* @param obj - an object of type FirebaseApp.
|
|
@@ -899,4 +936,4 @@ declare function _isFirebaseServerApp(obj: FirebaseApp | FirebaseServerApp | nul
|
|
|
899
936
|
*/
|
|
900
937
|
declare function _clearComponents(): void;
|
|
901
938
|
|
|
902
|
-
export { FirebaseApp, FirebaseAppSettings, FirebaseError, FirebaseOptions, FirebaseServerApp, FirebaseServerAppSettings, SDK_VERSION, DEFAULT_ENTRY_NAME as _DEFAULT_ENTRY_NAME, _FirebaseAppInternal, _FirebaseService, _addComponent, _addOrOverwriteComponent, _apps, _clearComponents, _components, _getProvider, _isFirebaseApp, _isFirebaseServerApp, _registerComponent, _removeServiceInstance, _serverApps, deleteApp, getApp, getApps, initializeApp, initializeServerApp, onLog, registerVersion, setLogLevel };
|
|
939
|
+
export { FirebaseApp, FirebaseAppSettings, FirebaseError, FirebaseOptions, FirebaseServerApp, FirebaseServerAppSettings, SDK_VERSION, DEFAULT_ENTRY_NAME as _DEFAULT_ENTRY_NAME, _FirebaseAppInternal, _FirebaseService, _addComponent, _addOrOverwriteComponent, _apps, _clearComponents, _components, _getProvider, _isFirebaseApp, _isFirebaseServerApp, _isFirebaseServerAppSettings, _registerComponent, _removeServiceInstance, _serverApps, deleteApp, getApp, getApps, initializeApp, initializeServerApp, onLog, registerVersion, setLogLevel };
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
import { FirebaseApp, FirebaseOptions, FirebaseServerApp } from './public-types';
|
|
17
|
+
import { FirebaseApp, FirebaseAppSettings, FirebaseServerAppSettings, FirebaseOptions, FirebaseServerApp } from './public-types';
|
|
18
18
|
import { Component, Provider, Name } from '@firebase/component';
|
|
19
19
|
import { DEFAULT_ENTRY_NAME } from './constants';
|
|
20
20
|
/**
|
|
@@ -71,13 +71,22 @@ export declare function _getProvider<T extends Name>(app: FirebaseApp, name: T):
|
|
|
71
71
|
export declare function _removeServiceInstance<T extends Name>(app: FirebaseApp, name: T, instanceIdentifier?: string): void;
|
|
72
72
|
/**
|
|
73
73
|
*
|
|
74
|
-
* @param obj - an object of type FirebaseApp or
|
|
74
|
+
* @param obj - an object of type FirebaseApp, FirebaseOptions or FirebaseAppSettings.
|
|
75
75
|
*
|
|
76
76
|
* @returns true if the provide object is of type FirebaseApp.
|
|
77
77
|
*
|
|
78
78
|
* @internal
|
|
79
79
|
*/
|
|
80
|
-
export declare function _isFirebaseApp(obj: FirebaseApp | FirebaseOptions): obj is FirebaseApp;
|
|
80
|
+
export declare function _isFirebaseApp(obj: FirebaseApp | FirebaseOptions | FirebaseAppSettings): obj is FirebaseApp;
|
|
81
|
+
/**
|
|
82
|
+
*
|
|
83
|
+
* @param obj - an object of type FirebaseApp, FirebaseOptions or FirebaseAppSettings.
|
|
84
|
+
*
|
|
85
|
+
* @returns true if the provided object is of type FirebaseServerAppImpl.
|
|
86
|
+
*
|
|
87
|
+
* @internal
|
|
88
|
+
*/
|
|
89
|
+
export declare function _isFirebaseServerAppSettings(obj: FirebaseApp | FirebaseOptions | FirebaseAppSettings): obj is FirebaseServerAppSettings;
|
|
81
90
|
/**
|
|
82
91
|
*
|
|
83
92
|
* @param obj - an object of type FirebaseApp.
|
package/dist/app-public.d.ts
CHANGED
|
@@ -332,6 +332,10 @@ export declare function getApps(): FirebaseApp[];
|
|
|
332
332
|
*
|
|
333
333
|
* @returns The initialized app.
|
|
334
334
|
*
|
|
335
|
+
* @throws If the optional `name` parameter is malformed or empty.
|
|
336
|
+
*
|
|
337
|
+
* @throws If a `FirebaseApp` already exists with the same name but with a different configuration.
|
|
338
|
+
*
|
|
335
339
|
* @public
|
|
336
340
|
*/
|
|
337
341
|
export declare function initializeApp(options: FirebaseOptions, name?: string): FirebaseApp;
|
|
@@ -342,6 +346,9 @@ export declare function initializeApp(options: FirebaseOptions, name?: string):
|
|
|
342
346
|
* @param options - Options to configure the app's services.
|
|
343
347
|
* @param config - FirebaseApp Configuration
|
|
344
348
|
*
|
|
349
|
+
* @throws If {@link FirebaseAppSettings.name} is defined but the value is malformed or empty.
|
|
350
|
+
*
|
|
351
|
+
* @throws If a `FirebaseApp` already exists with the same name but with a different configuration.
|
|
345
352
|
* @public
|
|
346
353
|
*/
|
|
347
354
|
export declare function initializeApp(options: FirebaseOptions, config?: FirebaseAppSettings): FirebaseApp;
|
|
@@ -388,18 +395,42 @@ export declare function initializeApp(): FirebaseApp;
|
|
|
388
395
|
*
|
|
389
396
|
* @param options - `Firebase.AppOptions` to configure the app's services, or a
|
|
390
397
|
* a `FirebaseApp` instance which contains the `AppOptions` within.
|
|
391
|
-
* @param config - `FirebaseServerApp`
|
|
398
|
+
* @param config - Optional `FirebaseServerApp` settings.
|
|
399
|
+
*
|
|
400
|
+
* @returns The initialized `FirebaseServerApp`.
|
|
401
|
+
*
|
|
402
|
+
* @throws If invoked in an unsupported non-server environment such as a browser.
|
|
403
|
+
*
|
|
404
|
+
* @throws If {@link FirebaseServerAppSettings.releaseOnDeref} is defined but the runtime doesn't
|
|
405
|
+
* provide Finalization Registry support.
|
|
406
|
+
*
|
|
407
|
+
* @public
|
|
408
|
+
*/
|
|
409
|
+
export declare function initializeServerApp(options: FirebaseOptions | FirebaseApp, config?: FirebaseServerAppSettings): FirebaseServerApp;
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Creates and initializes a {@link @firebase/app#FirebaseServerApp} instance.
|
|
413
|
+
*
|
|
414
|
+
* @param config - Optional `FirebaseServerApp` settings.
|
|
392
415
|
*
|
|
393
416
|
* @returns The initialized `FirebaseServerApp`.
|
|
394
417
|
*
|
|
418
|
+
* @throws If invoked in an unsupported non-server environment such as a browser.
|
|
419
|
+
* @throws If {@link FirebaseServerAppSettings.releaseOnDeref} is defined but the runtime doesn't
|
|
420
|
+
* provide Finalization Registry support.
|
|
421
|
+
* @throws If the `FIREBASE_OPTIONS` enviornment variable does not contain a valid project
|
|
422
|
+
* configuration required for auto-initialization.
|
|
423
|
+
*
|
|
395
424
|
* @public
|
|
396
425
|
*/
|
|
397
|
-
export declare function initializeServerApp(
|
|
426
|
+
export declare function initializeServerApp(config?: FirebaseServerAppSettings): FirebaseServerApp;
|
|
398
427
|
|
|
399
428
|
/* Excluded from this release type: _isFirebaseApp */
|
|
400
429
|
|
|
401
430
|
/* Excluded from this release type: _isFirebaseServerApp */
|
|
402
431
|
|
|
432
|
+
/* Excluded from this release type: _isFirebaseServerAppSettings */
|
|
433
|
+
|
|
403
434
|
/**
|
|
404
435
|
* Sets log handler for all Firebase SDKs.
|
|
405
436
|
* @param logCallback - An optional custom log handler that executes user code whenever
|
package/dist/app.d.ts
CHANGED
|
@@ -385,6 +385,10 @@ export declare function _getProvider<T extends Name>(app: FirebaseApp, name: T):
|
|
|
385
385
|
*
|
|
386
386
|
* @returns The initialized app.
|
|
387
387
|
*
|
|
388
|
+
* @throws If the optional `name` parameter is malformed or empty.
|
|
389
|
+
*
|
|
390
|
+
* @throws If a `FirebaseApp` already exists with the same name but with a different configuration.
|
|
391
|
+
*
|
|
388
392
|
* @public
|
|
389
393
|
*/
|
|
390
394
|
export declare function initializeApp(options: FirebaseOptions, name?: string): FirebaseApp;
|
|
@@ -395,6 +399,9 @@ export declare function initializeApp(options: FirebaseOptions, name?: string):
|
|
|
395
399
|
* @param options - Options to configure the app's services.
|
|
396
400
|
* @param config - FirebaseApp Configuration
|
|
397
401
|
*
|
|
402
|
+
* @throws If {@link FirebaseAppSettings.name} is defined but the value is malformed or empty.
|
|
403
|
+
*
|
|
404
|
+
* @throws If a `FirebaseApp` already exists with the same name but with a different configuration.
|
|
398
405
|
* @public
|
|
399
406
|
*/
|
|
400
407
|
export declare function initializeApp(options: FirebaseOptions, config?: FirebaseAppSettings): FirebaseApp;
|
|
@@ -441,23 +448,45 @@ export declare function initializeApp(): FirebaseApp;
|
|
|
441
448
|
*
|
|
442
449
|
* @param options - `Firebase.AppOptions` to configure the app's services, or a
|
|
443
450
|
* a `FirebaseApp` instance which contains the `AppOptions` within.
|
|
444
|
-
* @param config - `FirebaseServerApp`
|
|
451
|
+
* @param config - Optional `FirebaseServerApp` settings.
|
|
445
452
|
*
|
|
446
453
|
* @returns The initialized `FirebaseServerApp`.
|
|
447
454
|
*
|
|
455
|
+
* @throws If invoked in an unsupported non-server environment such as a browser.
|
|
456
|
+
*
|
|
457
|
+
* @throws If {@link FirebaseServerAppSettings.releaseOnDeref} is defined but the runtime doesn't
|
|
458
|
+
* provide Finalization Registry support.
|
|
459
|
+
*
|
|
448
460
|
* @public
|
|
449
461
|
*/
|
|
450
|
-
export declare function initializeServerApp(options: FirebaseOptions | FirebaseApp, config
|
|
462
|
+
export declare function initializeServerApp(options: FirebaseOptions | FirebaseApp, config?: FirebaseServerAppSettings): FirebaseServerApp;
|
|
451
463
|
|
|
452
464
|
/**
|
|
465
|
+
* Creates and initializes a {@link @firebase/app#FirebaseServerApp} instance.
|
|
453
466
|
*
|
|
454
|
-
* @param
|
|
467
|
+
* @param config - Optional `FirebaseServerApp` settings.
|
|
468
|
+
*
|
|
469
|
+
* @returns The initialized `FirebaseServerApp`.
|
|
470
|
+
*
|
|
471
|
+
* @throws If invoked in an unsupported non-server environment such as a browser.
|
|
472
|
+
* @throws If {@link FirebaseServerAppSettings.releaseOnDeref} is defined but the runtime doesn't
|
|
473
|
+
* provide Finalization Registry support.
|
|
474
|
+
* @throws If the `FIREBASE_OPTIONS` enviornment variable does not contain a valid project
|
|
475
|
+
* configuration required for auto-initialization.
|
|
476
|
+
*
|
|
477
|
+
* @public
|
|
478
|
+
*/
|
|
479
|
+
export declare function initializeServerApp(config?: FirebaseServerAppSettings): FirebaseServerApp;
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
*
|
|
483
|
+
* @param obj - an object of type FirebaseApp, FirebaseOptions or FirebaseAppSettings.
|
|
455
484
|
*
|
|
456
485
|
* @returns true if the provide object is of type FirebaseApp.
|
|
457
486
|
*
|
|
458
487
|
* @internal
|
|
459
488
|
*/
|
|
460
|
-
export declare function _isFirebaseApp(obj: FirebaseApp | FirebaseOptions): obj is FirebaseApp;
|
|
489
|
+
export declare function _isFirebaseApp(obj: FirebaseApp | FirebaseOptions | FirebaseAppSettings): obj is FirebaseApp;
|
|
461
490
|
|
|
462
491
|
/**
|
|
463
492
|
*
|
|
@@ -469,6 +498,16 @@ export declare function _isFirebaseApp(obj: FirebaseApp | FirebaseOptions): obj
|
|
|
469
498
|
*/
|
|
470
499
|
export declare function _isFirebaseServerApp(obj: FirebaseApp | FirebaseServerApp | null | undefined): obj is FirebaseServerApp;
|
|
471
500
|
|
|
501
|
+
/**
|
|
502
|
+
*
|
|
503
|
+
* @param obj - an object of type FirebaseApp, FirebaseOptions or FirebaseAppSettings.
|
|
504
|
+
*
|
|
505
|
+
* @returns true if the provided object is of type FirebaseServerAppImpl.
|
|
506
|
+
*
|
|
507
|
+
* @internal
|
|
508
|
+
*/
|
|
509
|
+
export declare function _isFirebaseServerAppSettings(obj: FirebaseApp | FirebaseOptions | FirebaseAppSettings): obj is FirebaseServerAppSettings;
|
|
510
|
+
|
|
472
511
|
/**
|
|
473
512
|
* Sets log handler for all Firebase SDKs.
|
|
474
513
|
* @param logCallback - An optional custom log handler that executes user code whenever
|
|
@@ -65,6 +65,10 @@ export declare const SDK_VERSION: string;
|
|
|
65
65
|
*
|
|
66
66
|
* @returns The initialized app.
|
|
67
67
|
*
|
|
68
|
+
* @throws If the optional `name` parameter is malformed or empty.
|
|
69
|
+
*
|
|
70
|
+
* @throws If a `FirebaseApp` already exists with the same name but with a different configuration.
|
|
71
|
+
*
|
|
68
72
|
* @public
|
|
69
73
|
*/
|
|
70
74
|
export declare function initializeApp(options: FirebaseOptions, name?: string): FirebaseApp;
|
|
@@ -74,6 +78,9 @@ export declare function initializeApp(options: FirebaseOptions, name?: string):
|
|
|
74
78
|
* @param options - Options to configure the app's services.
|
|
75
79
|
* @param config - FirebaseApp Configuration
|
|
76
80
|
*
|
|
81
|
+
* @throws If {@link FirebaseAppSettings.name} is defined but the value is malformed or empty.
|
|
82
|
+
*
|
|
83
|
+
* @throws If a `FirebaseApp` already exists with the same name but with a different configuration.
|
|
77
84
|
* @public
|
|
78
85
|
*/
|
|
79
86
|
export declare function initializeApp(options: FirebaseOptions, config?: FirebaseAppSettings): FirebaseApp;
|
|
@@ -118,13 +125,34 @@ export declare function initializeApp(): FirebaseApp;
|
|
|
118
125
|
*
|
|
119
126
|
* @param options - `Firebase.AppOptions` to configure the app's services, or a
|
|
120
127
|
* a `FirebaseApp` instance which contains the `AppOptions` within.
|
|
121
|
-
* @param config - `FirebaseServerApp`
|
|
128
|
+
* @param config - Optional `FirebaseServerApp` settings.
|
|
129
|
+
*
|
|
130
|
+
* @returns The initialized `FirebaseServerApp`.
|
|
131
|
+
*
|
|
132
|
+
* @throws If invoked in an unsupported non-server environment such as a browser.
|
|
133
|
+
*
|
|
134
|
+
* @throws If {@link FirebaseServerAppSettings.releaseOnDeref} is defined but the runtime doesn't
|
|
135
|
+
* provide Finalization Registry support.
|
|
136
|
+
*
|
|
137
|
+
* @public
|
|
138
|
+
*/
|
|
139
|
+
export declare function initializeServerApp(options: FirebaseOptions | FirebaseApp, config?: FirebaseServerAppSettings): FirebaseServerApp;
|
|
140
|
+
/**
|
|
141
|
+
* Creates and initializes a {@link @firebase/app#FirebaseServerApp} instance.
|
|
142
|
+
*
|
|
143
|
+
* @param config - Optional `FirebaseServerApp` settings.
|
|
122
144
|
*
|
|
123
145
|
* @returns The initialized `FirebaseServerApp`.
|
|
124
146
|
*
|
|
147
|
+
* @throws If invoked in an unsupported non-server environment such as a browser.
|
|
148
|
+
* @throws If {@link FirebaseServerAppSettings.releaseOnDeref} is defined but the runtime doesn't
|
|
149
|
+
* provide Finalization Registry support.
|
|
150
|
+
* @throws If the `FIREBASE_OPTIONS` enviornment variable does not contain a valid project
|
|
151
|
+
* configuration required for auto-initialization.
|
|
152
|
+
*
|
|
125
153
|
* @public
|
|
126
154
|
*/
|
|
127
|
-
export declare function initializeServerApp(
|
|
155
|
+
export declare function initializeServerApp(config?: FirebaseServerAppSettings): FirebaseServerApp;
|
|
128
156
|
/**
|
|
129
157
|
* Retrieves a {@link @firebase/app#FirebaseApp} instance.
|
|
130
158
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
import { FirebaseApp, FirebaseOptions, FirebaseServerApp } from './public-types';
|
|
17
|
+
import { FirebaseApp, FirebaseAppSettings, FirebaseServerAppSettings, FirebaseOptions, FirebaseServerApp } from './public-types';
|
|
18
18
|
import { Component, Provider, Name } from '@firebase/component';
|
|
19
19
|
import { DEFAULT_ENTRY_NAME } from './constants';
|
|
20
20
|
/**
|
|
@@ -71,13 +71,22 @@ export declare function _getProvider<T extends Name>(app: FirebaseApp, name: T):
|
|
|
71
71
|
export declare function _removeServiceInstance<T extends Name>(app: FirebaseApp, name: T, instanceIdentifier?: string): void;
|
|
72
72
|
/**
|
|
73
73
|
*
|
|
74
|
-
* @param obj - an object of type FirebaseApp or
|
|
74
|
+
* @param obj - an object of type FirebaseApp, FirebaseOptions or FirebaseAppSettings.
|
|
75
75
|
*
|
|
76
76
|
* @returns true if the provide object is of type FirebaseApp.
|
|
77
77
|
*
|
|
78
78
|
* @internal
|
|
79
79
|
*/
|
|
80
|
-
export declare function _isFirebaseApp(obj: FirebaseApp | FirebaseOptions): obj is FirebaseApp;
|
|
80
|
+
export declare function _isFirebaseApp(obj: FirebaseApp | FirebaseOptions | FirebaseAppSettings): obj is FirebaseApp;
|
|
81
|
+
/**
|
|
82
|
+
*
|
|
83
|
+
* @param obj - an object of type FirebaseApp, FirebaseOptions or FirebaseAppSettings.
|
|
84
|
+
*
|
|
85
|
+
* @returns true if the provided object is of type FirebaseServerAppImpl.
|
|
86
|
+
*
|
|
87
|
+
* @internal
|
|
88
|
+
*/
|
|
89
|
+
export declare function _isFirebaseServerAppSettings(obj: FirebaseApp | FirebaseOptions | FirebaseAppSettings): obj is FirebaseServerAppSettings;
|
|
81
90
|
/**
|
|
82
91
|
*
|
|
83
92
|
* @param obj - an object of type FirebaseApp.
|