MCPcopy Create free account
hub / github.com/NativeScript/firebase / constructor

Method constructor

packages/firebase-firestore/index.android.ts:1512–1522  ·  view source on GitHub ↗
(app?: FirebaseApp)

Source from the content-addressed store, hash-verified

1510 _app: FirebaseApp;
1511
1512 constructor(app?: FirebaseApp) {
1513 if (app) {
1514 this._native = com.google.firebase.firestore.FirebaseFirestore.getInstance(app.native);
1515 } else {
1516 if (defaultFirestore) {
1517 return defaultFirestore;
1518 }
1519 defaultFirestore = this;
1520 this._native = com.google.firebase.firestore.FirebaseFirestore.getInstance();
1521 }
1522 }
1523
1524 useEmulator(host: string, port: number) {
1525 this.native.useEmulator(host === 'localhost' || host === '127.0.0.1' ? '10.0.2.2' : host, port);

Callers

nothing calls this directly

Calls 1

getInstanceMethod · 0.45

Tested by

no test coverage detected