Domitnator / kentico-kontent-nuxt-module

Add kentico kontent super power to your nuxt app
13 stars 5 forks source link

Make typescript types available #46

Closed dreitzner closed 2 years ago

dreitzner commented 3 years ago

Currently there are no types available for this nuxt wrapper. It would be awesome to have the wrapped kontent.ai sdk types available inside of nuxt as well :)

Domitnator commented 3 years ago

Thanks for opening this issue! I figure this would need quite a overhaul for this project. At the moment i am busy with my day job but i will see what i can do!

One question though: Are you using the nuxt typescript project (https://typescript.nuxtjs.org/) for your nuxt development?

dreitzner commented 3 years ago

I created it with npx create-nuxt-app <app-name> and selected typescript in the process.

inisde fetch:

Property '$deliveryClient' does not exist on type 'CombinedVueInstance<Vue, unknown, unknown, unknown, Readonly<Record<never, any>>>'.Vetur(2339)

inside asyncData:

Property '$deliveryClient' does not exist on type 'Context'.Vetur(2339)
dreitzner commented 3 years ago

Docs just for reference

Domitnator commented 3 years ago

Just a quick update.: I rewrote the module in typescript and now 'intellisense' is available. I still have to wraps things up and change the build/release pipeline but i have good hope to fix this next week!

Domitnator commented 2 years ago

@dreitzner Yesterday i released version 7 which now has typescript support!

Don't forget to update your tsconfig.json file: https://github.com/Domitnator/kentico-kontent-nuxt-module#typescript

Please close this ticket if you've confirmed that everything is working correctly.

dreitzner commented 2 years ago

@Domitnator works great. Thank you so much

Domitnator commented 2 years ago

@dreitzner I've just released version 8.0.0 (https://github.com/Domitnator/kentico-kontent-nuxt-module/releases/tag/v8.0.0) which has support for the new kentico-delivery-js-sdk version 11 (released 3 days ago)! 🔥