Anoesj @anoesj.dev · Nov 15

2️⃣ In /typings-high-prio (rename to taste), add a .d.ts file with the following contents. Nuxt keeps an object of all globally registered components, which we can use to make the typings of resolveComponent stronger. 2/n

0 likes 1 replies

?

Replies

Anoesj · Nov 15

3️⃣ From now on, `resolveComponent` requires you to provide an actually existing component name. It will also return the typings of that particular component, instead of `ConcreteComponent | string`! 🌟 Bonus: when using this combined with `<component :is>`, it's now typed way more strictly.