Skip to content

Typescript "reactive" nested "computed" will lose all types and become "any" type #134

Closed
@wcldyx

Description

@wcldyx
import {reactive, computed} from '@vue/composition-api';

// "reactive" nested "computed", the type of "state" attribute used in "computed" is all wrong with "any"
const state = reactive({
    name: 'name',
    age: 18,
    getName: computed(() => state.name)
});
// "state" becomes "any" type
console.log(state === 1);

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions