-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Closed
Description
What problem does this feature solve?
import firebase from 'firebase'
import Vue from 'vue'
/* This file simply imports the needed types from firebase and forwards them */
declare module 'vue/types/vue' {
interface Vue {
$fireStore: firebase.firestore.Firestore
$fireDb: firebase.database.Database
$fireFunc: firebase.functions.Functions
$fireStorage: firebase.storage.Storage
$fireAuth: firebase.auth.Auth
$fireMess: firebase.messaging.Messaging
}
}
In a normal typescript project with Vue 2, we can do like above to access this.$fireStore
. But when use Composition API, how I can inject the properties like this in the root on function setup(_, { root})? So I cant use with root.$fireStore...
Now, I must use it with any type like (root as any).$fireStore. So hope anyone can help my team. We are working on a project with Nuxt Composition now.
What does the proposed API look like?
setup(_, { root}) {
root.$xyz
}
Metadata
Metadata
Assignees
Labels
No labels