buefy / nuxt-buefy

Nuxt Buefy
MIT License
223 stars 32 forks source link

Typescript type definition for buefy properties #42

Closed arnaudgibert closed 4 years ago

arnaudgibert commented 5 years ago

Hi!

nuxt-buefy version: 0.3.7 nuxt version: 2.6.3 OS/Browser: Windows Description

As described here: https://github.com/buefy/buefy/issues/701 type where added on buefy v0.6.4 but not yet in nuxt-buefy

Wich mean that I cannot do my tsc without a dirty workaround and that I don't I have the auto-completion wich exist since it has been added on 0.6.4

It would be nice to have them ;) Thanks!

jtommy commented 5 years ago

What workaround are you using?

arnaudgibert commented 5 years ago

I create a class wich extends Vue from 'vue-property-decorator' wich include the different properties of buefy like "$toast" Then I use this class in my script in .vue files... Very dirty, very unsafe, and very problematic for the futur but I hope this is only temporary. ^^

jtommy commented 5 years ago

Should you not able to use the types of Buefy package?

arnaudgibert commented 5 years ago

Nop beacause the types from package adds to 'vue' and I use vue from vue-property-decorator when I use typescript which I stoped doing because of the complexity of using it in my express / node server + nuxt.


From: Walter Tommasi notifications@github.com Sent: Tuesday, June 11, 2019 6:56:17 PM To: buefy/nuxt-buefy Cc: Arnaud GIBERT; Author Subject: Re: [buefy/nuxt-buefy] Typescript type definition for buefy properties (#42)

Should you not able to use the types of Buefy package?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/buefy/nuxt-buefy/issues/42?email_source=notifications&email_token=ABLZHOL2X3U4IHPDOSE6CMTPZ7KLDA5CNFSM4HVYLCI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXNZ2GI#issuecomment-500931865, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABLZHONO6P7RRNZERUKAFGDPZ7KLDANCNFSM4HVYLCIQ.

jtommy commented 5 years ago

@arnaudgibert Could you check last version ?

gluons commented 4 years ago

Try adding buefy/types to compilerOptions.types in your tsconfig.json.
It will solve your problem.

{
    "compilerOptions": {
+       "types": ["buefy/types"]
    }
}