-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typescript Typings #23
Comments
+1 is it possible to use the declarations defined on https://github.com/OneSignal/OneSignal-Website-SDK ? as a temporary fix in my project, I've installed the above package as a devDependency and created a declarations file for this module:
import '@nuxt/types'
import OneSignal from 'onesignal-web-sdk/src/OneSignal'
declare module '@nuxt/types' {
interface NuxtAppOptions {
$OneSignal: typeof OneSignal
}
}
declare module 'vue/types/vue' {
interface Vue {
$OneSignal: typeof OneSignal
}
}
declare module 'vuex/types/index' {
interface Store<S> {
$OneSignal: typeof OneSignal
}
} Edit: actually this doesn't seem to fix it because the onesignal package has a lot of typescript errors and the console gets flooded with them 😨 |
Add this to your file types/modules/@nuxtjs/onesignal.d.ts
|
I used it in a typescript project and found that there were no Typings file available to me
I've found similar problems elsewhere: OneSignal/react-native-onesignal#453
The text was updated successfully, but these errors were encountered: