Closed wangrongding closed 2 years ago
It may be related to your typescript version, check if it is the latest version by runnning npm list
.
I feel that it should not be a problem of version, see other people's version of typescript is much lower than my version did not appear this error
Documents with the error message: https://github.dev/wangrongding/vue-super-admin/blob/main/src/page/testing/test.vue#L6
My version of typescript: https://github.dev/wangrongding/vue-super-admin/blob/main/package.json#L69
I think you can try removing .ts
import type { Test } from './type'
Alternatively, you can do this if you want to preserve extensions:
// shims-vue.d.ts
declare module '*.ts' {
export { Test } from '@/page/testing/type'
}
Also, I've noticed that you declare it in multiple files. (@/env.d.ts
, @/types/shims-vue.d.ts
) I think you should remove the redundant declaration.
Thanks, good brother. Have a great life.🥰
Hi, I'm having this problem, it doesn't seem to be caused by your plugin, but I don't know how to fix it, can you take a look?
Thanks~
Cannot use namespace 'xxx' as a type.ts(2709)
https://github.dev/wangrongding/vue-super-admin/blob/main/src/page/testing/test.vue#L6