Skip to content

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

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

Closed
wcldyx opened this issue Sep 17, 2019 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@wcldyx
Copy link

wcldyx commented Sep 17, 2019

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);
@liximomo
Copy link
Member

Duplicated of #131

@liximomo liximomo added the duplicate This issue or pull request already exists label Sep 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants