-
Notifications
You must be signed in to change notification settings - Fork 12
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
feat: implemented Typescript definitions #28
base: master
Are you sure you want to change the base?
Conversation
aligns with the readme file, but left out deprecated property `imports`
@gekkedev Have a look at how the i18n module adds a config key to the nuxt options: https://github.com/nuxt-community/i18n-module/blob/master/types/vue.d.ts#L44 And thanks for working on this btw! |
@pimlie I've tried to this to the type definitions: declare module '@nuxt/types' {
interface NuxtOptions {
fontawesome?: NuxtFontawesomeOptions
}
} Unfortunately it doesn't get recognized. What did I forget? |
Forgot the entry in |
@gekkedev I think the issue might be a missing types entry in pkg.json in the stable package? Maybe your editor doesnt pick that up correctly for your local dev. I assume you yarn linked nuxt-fontawesome into your nuxt project?. |
(via declaration merging, still not working on my machine)
I adjusted the module declaration because previously I had no idea about declaration merging (and am still unsure if this is entirely correct). The |
I added an enclosing config key that I forgot and it works for me - however the type definitions only get applied when the file is open in VSCode, not when the file is closed. I restarted TSServer & Vetur - maybe you know what has to be done @pimlie ? |
aligns with the readme file, but left out deprecated property
imports
fixes #27
not sure how to map the
fontawesome
key directly - could we somehow create an interface that automatically extends the nuxt configuration by this property?