Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Suggestion: Control flow analysis #2854

Closed
2 tasks
danquirk opened this issue Apr 21, 2015 · 2 comments
Closed
2 tasks

Suggestion: Control flow analysis #2854

danquirk opened this issue Apr 21, 2015 · 2 comments
Labels
In Discussion Not yet reached consensus Revisit An issue worth coming back to Suggestion An idea for TypeScript

Comments

@danquirk
Copy link
Member

This is a work item to track some of the ideas and work associated with implementing simple control flow analysis for error reporting purposes. @vladima has already implemented a version of this concept in #1287. It already covers some of the separate issues people have asked for but I'm adding a list of tasks here that can be checked off/added to by whoever ends up officially taking on this work.

@danquirk danquirk added Suggestion An idea for TypeScript In Discussion Not yet reached consensus labels Apr 21, 2015
@jbondc
Copy link
Contributor

jbondc commented Apr 24, 2015

Can likely be used to improve type guards too, some pseudo-code here:
#1892 (comment)

Keep track of widened type assignments & when exiting a block, check if all the same & narrow to the same type.

@mhegazy
Copy link
Contributor

mhegazy commented Feb 22, 2016

Switch fall through is fixed by #4788

use before definition is tracked by #5207

@mhegazy mhegazy closed this as completed Feb 22, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
In Discussion Not yet reached consensus Revisit An issue worth coming back to Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

4 participants