Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vti: PropType with interfaces throws "Cannot find name" #2457

Open
4 tasks done
cexbrayat opened this issue Nov 11, 2020 · 1 comment
Open
4 tasks done

vti: PropType with interfaces throws "Cannot find name" #2457

cexbrayat opened this issue Nov 11, 2020 · 1 comment
Labels

Comments

@cexbrayat
Copy link
Member

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ
  • I have tried restarting VS Code or running Vetur: Restart VLS

Info

  • Platform: macOS
  • VTI version: 0.0.15
  • VS Code version:

Problem

If we define a component used by App.vue with a prop typed as:

props: {
  user: Object as PropType<UserModel>,
},

then VTI (0.0.15) throws:

File : /Users/ced-pro/Code/test/vue-cli-tests/template-typechecking/src/App.vue
Error: Cannot find name 'UserModel'.

Reproducible Case

This is reproducible in a bare CLI project with TS enabled:

npx @vue/cli@ create vue-integration -m yarn --inlinePreset '{"useConfigFiles": true,"plugins": {"@vue/cli-plugin-typescript": {"classComponent": false},"vue-cli-plugin-vue-next": {}}}'

In the generated project, update HelloWorld.vue to have a user prop as above, then run vti in the project.

You can check out cexbrayat/template-typechecking#1 and run yarn vti for a quicker repro.

@yoyo930021
Copy link
Member

Fixed when #2344 solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants