Created
April 3, 2021 00:41
-
-
Save c10r/2bf24a7befdb2546ed47c8a2b835ebb5 to your computer and use it in GitHub Desktop.
An example firebase wrapper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@JsModule("firebase") | |
@JsNonModule | |
external interface FirebaseConfig { | |
var apiKey: String | |
var authDomain: String | |
var databaseURL: String | |
var projectId: String | |
var storageBucket: String | |
var messagingSenderId: String | |
var appId: String | |
} | |
external interface Firebase { | |
fun initializeApp(jsObject: FirebaseConfig): FirebaseApp | |
} | |
external interface FirebaseApp { | |
fun firestore(): Firestore | |
} | |
external interface Firestore { | |
fun batch(): Any | |
fun collection(path: String): Any | |
fun doc(path: String): Any | |
} | |
@JsName("firebase") | |
external val firebase : Firebase |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment