We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
<template> <div></div> </template> <script lang="ts"> import { defineComponent } from 'vue'; export default defineComponent({ data() { return { a: { b: '', }, }; }, computed: { length() { return this.a.b; /** * 类型“CreateComponentPublicInstance<{} | {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, EmitsOptions, {} | {}, {}, false, ... 6 more ..., {}>”上不存在属性“a”。 类型“{ $: ComponentInternalInstance; $data: {}; $props: {} | {}; $attrs: Data; $refs: Data; $slots: Readonly<InternalSlots>; ... 7 more ...; $watch(source: string | Function, cb: Function, options?: WatchOptions<...> | undefined): WatchStopHandle; } & ... 4 more ... & ComponentCustomProperties”上不存在属性“a”。ts(2339) */ }, }, }); </script>
src/test.vue:18:19 - error TS2339: Property 'a' does not exist on type 'CreateComponentPublicInstance<{} | {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, EmitsOptions, {} | {}, {}, false, ... 6 more ..., {}>'. Property 'a' does not exist on type '{ $: ComponentInternalInstance; $data: {}; $props: {} | {}; $attrs: Data; $refs: Data; $slots: Readonly<InternalSlots>; ... 7 more ...; $watch(source: string | Function, cb: Function, options?: WatchOptions<...> | undefined): WatchStopHandle; } & ... 4 more ... & ComponentCustomProperties'. 18 return this.a.b; ~
The text was updated successfully, but these errors were encountered:
This is correct report, you can reproduce this error in *.ts file with same code.
*.ts
Vue Land TS discord server may help.
Sorry, something went wrong.
Thanks.
Solution: vuejs/vue#8721 (comment)
No branches or pull requests
The text was updated successfully, but these errors were encountered: