Ready to get started?
Join Adocasts Plus for $8/mo, or sign into an existing Adocasts Plus account, to get access to all of our lessons.
Building with AdonisJS & Inertia #8.1
Creating A New Course
We'll add the ability to create a new course within the active organization.
- Created by
- @tomgobich
- Published
Join the Discussion 4 comments
-
Hello,
With
useTemplateRef, I’m encountering type errors with TypeScript because the component is of typeunknown. I also believe this issue is caused byunplugin-vue-components. All auto-imported components are of typeunknown, and VSCode doesn’t provide IntelliSense for these components (e.g., their attributes). However, if I manually import the components, everything works fine. Is there a solution to fix this?1-
Responding to gribbl
Hi gribbl!!
So, I looked into this a little bit, and it seems like everything TypeScript related for these components that are auto-imported via unplugin-vue-components begins working if you add the generated
components.d.tsfile into the/intertia/tsconfig.jsonincludearray, like below.{ "extends": "@adonisjs/tsconfig/tsconfig.client.json", "compilerOptions": { "baseUrl": ".", "jsx": "preserve", "module": "ESNext", "jsxImportSource": "vue", "paths": { "~/*": ["./*"], } }, "include": ["./**/*.ts", "./**/*.vue", "../components.d.ts"] }Copied!Here's the result:

I'm going to go tack a note about this into lesson 1.4, where we setup unplugin-vue-components!
1-
Responding to tomgobich
-
Responding to gribbl
-
-
-