Skip to content
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

fix #8721,#9873: wrong type when computed return about this #11235

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

yoyo930021
Copy link
Member

@yoyo930021 yoyo930021 commented Mar 23, 2020

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:
Fix vuejs/vetur#1707, vuejs/vetur#1509, #8721, #9873

When computed return about this property,
The this type is wrong.

@yoyo930021
Copy link
Member Author

@ktsn I don't know this PR.
Is it the right solution?
I added the test about the question.
Please take a look.

@yoyo930021 yoyo930021 changed the title fix(types): fix type when computed return about this fix #8721: fix type when computed return about this Mar 23, 2020
@yoyo930021 yoyo930021 changed the title fix #8721: fix type when computed return about this fix #8721: wrong type when computed return about this Mar 23, 2020
@yoyo930021 yoyo930021 changed the title fix #8721: wrong type when computed return about this fix #8721,#9873: wrong type when computed return about this Mar 23, 2020
Copy link
Member

@ktsn ktsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@Yahohoo
Copy link

Yahohoo commented Jun 2, 2020

@ktsn, aren't you going to merge this bugfix? You approved it in April but it's still not merged. This one affects Vetur and breaks intelisense so it seems quite important to me as VSCode + Vetur + Vue programmer.

@LHernZ
Copy link

LHernZ commented Sep 3, 2020

Good evening, I'm wondering if someone forgot to merge this pull request, agree with @Yahohoo the intelisense is important for us, hoping someone merge it @ktsn or @yoyo930021

@VottusCode
Copy link

bump, @ktsn can you merge it?

@octref
Copy link
Member

octref commented Sep 4, 2020

This does not seem to fix vuejs/vetur#1707
I'm testing with https://github.com/octref/veturpack. Manually writing the changes to node_modules/vue/types/options.d.ts doesn't fix the issue.

@yoyo930021
Copy link
Member Author

This does not seem to fix vuejs/vetur#1707
I'm testing with https://github.com/octref/veturpack. Manually writing the changes to node_modules/vue/types/options.d.ts doesn't fix the issue.

vuejs/vetur#2131 (comment)

@octref
Copy link
Member

octref commented Sep 4, 2020

@yoyo930021 Great, now we have TS 4.0.2 in Vetur by default as well. Are you planning to send a new PR to vue?

@yoyo930021
Copy link
Member Author

@yoyo930021 Great, now we have TS 4.0.2 in Vetur by default as well. Are you planning to send a new PR to vue?

The problem is only work when typescript 3.9 up.
I don't know if we can accept this kind of PR?

@octref
Copy link
Member

octref commented Sep 4, 2020

Updating devDependency should be fine...I guess? /cc @yyx990803

@yoyo930021
Copy link
Member Author

yoyo930021 commented Sep 12, 2020

I guess #11488 also can fix this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Intellisense not always working in computed properties
6 participants