-
- Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Description
Version
2.7.5
Reproduction link
https://codesandbox.io/s/vue-typescript-example-forked-hvzpki?file=/src/main.ts
Steps to reproduce
import Vue from "vue" import App from "./components/App.vue" export const main = new Vue({ el: "#app", render: (createElement) => createElement(App), }) export function getContainerComponent() { return main.$root.$children[0].$children[0] }
What is expected?
no typescript error
What is actually happening?
After upgrading from 2.7.4 to 2.7.5 the code above fails to compile:
ERROR in ./src/main.ts:12:21 TS2339: Property '$children' does not exist on type 'never'. 10 | 11 | export function getContainerComponent(): Vue { > 12 | return main.$root.$children[0].$children[0] | ^^^^^^^^^ 13 | }
Metadata
Metadata
Assignees
Labels
No labels