I'm trying to make named export in one component like this:
export interface ITest { t: String }
to call it from another:
import { ITest } from '@/components/Test.vue'
And have the error:
TS2614: Module '"*.vue"' has no exported member 'ITest '. Did you mean to use 'import ITest from "*.vue"' instead?
And if I change to:
import ITest from '@/components/Test.vue'
The error now says:
Module '"(path)/Test.vue"' has no default export. Did you mean to use 'import { ITest } from "(path)/Test.vue"' instead?
How to make named export in Vue using TypeScript?
Vue 3, TypeScript, Webpack 5.
export interface ITest {
t: string;
}
Test.vue to Test.ts, and where import it as well.String to typescript type string