Files
TypeScript/tests/cases
Jack Williams 0d79831ead Add typeof-for-switch
Initial draft that works for union types

First draft of PR ready code with tests

Revert changed line for testing

Add exhaustiveness checking and move narrowByTypeOfWitnesses

Try caching mechanism

Comment out exhaustiveness checking to find perf regression

Re-enable exhaustiveness checking for typeof switches

Check if changes to narrowByTypeOfWitnesses fix perf alone.

Improve switch narrowing:

+ Take into account repeated clauses in the switch.
+ Handle unions of constrained type parameters.

Add more tests

Comments

Revert back to if-like behaviour

Remove redundant checks and simplify exhaustiveness checks

Change comment for narrowBySwitchOnTypeOf

Reduce implied type with getAssignmentReducedType

Remove any annotations
2018-04-18 23:17:36 +01:00
..
2018-04-18 23:17:36 +01:00