N
Nuxt3mo ago
Seduxtion

auto import types

Hey im trying to figure out, if its possible to make a typescript folder, and have my types safed on place and auto import them for all my components? and if so how would that work and how would i use the type for each file?
2 Replies
Flo
Flo3mo ago
in nuxt.config.ts:
imports: {
dirs: ['types/*.ts', 'store/*.ts', 'types/**/*.ts'],
},
imports: {
dirs: ['types/*.ts', 'store/*.ts', 'types/**/*.ts'],
},
Seduxtion
Seduxtion3mo ago
thanks, i did actully look on that, i just figured out i had some errors elsewhere so it did not work