You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<scriptsetuplang="ts">import {typeMyType} from'./Child.vue';// Unsafe assignment of an `any` valueconst obj:MyType= { test: '123' };// Unsafe member access .test on an `any` valueconst test =obj.test;</script>
What did you expect to happen?
The imported types to work. Typescript recognizes the type and does not complain, but eslint throws and error.
What actually happened?
14:7 error Unsafe assignment of an `any` value @typescript-eslint/no-unsafe-assignment
14:16 error Unsafe member access .test on an `any` value @typescript-eslint/no-unsafe-member-access
✖ 2 problems (2 errors, 0 warnings)
The text was updated successfully, but these errors were encountered:
jordan-erisman
changed the title
Typescript: Eslint can't detect types exported from from
Typescript: Eslint can't detect types exported from Vue SFC
Jan 23, 2024
Hi! Are there any news regarding this? We've a new project with Vue3 and latest TS. Despite all our efforts (and experience with these tools, including older eslint), eslint returns the same errors, basically any "unsafe-" rule will raise errors on imported SFCs usage.
Is it a missing feature, as flagged 8 months ago? A misconfiguration? or a bug?
Checklist
Tell us about your environment
Please show your full configuration:
What did you do?
Reproduction link (StackBlitz). Run
npm run lint
Child
Parent
What did you expect to happen?
The imported types to work. Typescript recognizes the type and does not complain, but eslint throws and error.
What actually happened?
Repository to reproduce this issue
Reproduction link (StackBlitz). Run
npm run lint
The text was updated successfully, but these errors were encountered: