We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Vetur: Restart VLS
When I use an interface to annotate props Vetur gives give the error 'Cannot find name 'Foo'. Vetur(2304)'.
This setup works perfectly fine: Test.vue
<script lang="ts"> import { defineComponent, PropType } from "vue"; export interface Foo { name: string; } export default defineComponent({ props: { foo: { type: Object as PropType<{ name: string }> }, }, }); </script>
App.vue
<template> <p>hi</p> </template> <script lang="ts"> import { defineComponent } from "vue"; import Test from "@/test.vue"; export default defineComponent({ components: { Test }, }); </script>
However, when I change props in Test.vue to
props: { foo: { type: Object as PropType<Foo> }, },
Vetur give the error 'Cannot find name 'Foo'. Vetur(2304)' at the top of App.vue. The code runs just fine in Vue.
The text was updated successfully, but these errors were encountered:
same issue when pass props as PropType
in child component
in parent component, pass object to child component
first line of parent component
Sorry, something went wrong.
Duplicate of #2668
No branches or pull requests
Vetur: Restart VLS
Info
Problem
When I use an interface to annotate props Vetur gives give the error 'Cannot find name 'Foo'. Vetur(2304)'.
Reproducible Case
This setup works perfectly fine:
Test.vue
App.vue
However, when I change props in Test.vue to
props: { foo: { type: Object as PropType<Foo> }, },
Vetur give the error 'Cannot find name 'Foo'. Vetur(2304)' at the top of App.vue. The code runs just fine in Vue.
The text was updated successfully, but these errors were encountered: