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

Show type info of yield #32283

Open
falsandtru opened this issue Jul 7, 2019 · 9 comments
Open

Show type info of yield #32283

falsandtru opened this issue Jul 7, 2019 · 9 comments
Labels
Domain: Quick Info e.g. hover text, tool-tips, and tooltips. Effort: Moderate Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual". Experience Enhancement Noncontroversial enhancements Help Wanted You can do this Needs Proposal This issue needs a plan that clarifies the finer details of how it could be implemented. PursuitFellowship Help wanted from Pursuit fellowship; others please avoid until Dec 19
Milestone

Comments

@falsandtru
Copy link
Contributor

@rbuckton yield keyword should show its argument type and return type when a cursor is put on there.

@sandersn sandersn added Add a Flag Any problem can be solved by flags, except for the problem of having too many flags Experience Enhancement Noncontroversial enhancements labels Jul 9, 2019
@sandersn
Copy link
Member

sandersn commented Jul 9, 2019

Good idea, although I don't think we produce yield's type when checking, although this might have recently changed.

@falsandtru
Copy link
Contributor Author

In fact, finding a break of type checking such as #32248 (yield wrongly returns any type.) is impossible when we can't directly check a type of yield. When yield argument type is any, we can't know it. When yield return type is any, we can't know it without seeing an inferred type via a variable.

@falsandtru
Copy link
Contributor Author

@sandersn @rbuckton I recommend you to release this feature with the next release to make complete user experience of enhanced generators.

@DanielRosenwasser DanielRosenwasser added Effort: Moderate Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual". Help Wanted You can do this Needs Proposal This issue needs a plan that clarifies the finer details of how it could be implemented. Domain: Quick Info e.g. hover text, tool-tips, and tooltips. and removed Add a Flag Any problem can be solved by flags, except for the problem of having too many flags labels Jul 23, 2019
@Kingwl
Copy link
Contributor

Kingwl commented Jul 30, 2019

What is the expected display?
Similar to NewKeyword? or something like (TNext) yield (T)

@falsandtru
Copy link
Contributor Author

I expect it.

@Kingwl
Copy link
Contributor

Kingwl commented Aug 12, 2019

Expect which one🤦🏻‍♂️

@falsandtru
Copy link
Contributor Author

Ah, I meant (TNext) yield (T).

@Kingwl
Copy link
Contributor

Kingwl commented Aug 12, 2019

@DanielRosenwasser Any suggestions?🙋🏻‍♂️

@RyanCavanaugh RyanCavanaugh added this to the Backlog milestone Aug 16, 2019
@sandersn sandersn added the PursuitFellowship Help wanted from Pursuit fellowship; others please avoid until Dec 19 label Sep 18, 2020
@DanielRosenwasser
Copy link
Member

Similar to #11261 which is about quick info on return.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Domain: Quick Info e.g. hover text, tool-tips, and tooltips. Effort: Moderate Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual". Experience Enhancement Noncontroversial enhancements Help Wanted You can do this Needs Proposal This issue needs a plan that clarifies the finer details of how it could be implemented. PursuitFellowship Help wanted from Pursuit fellowship; others please avoid until Dec 19
Projects
None yet
Development

No branches or pull requests

5 participants