Commit graph

1 commit

Author SHA1 Message Date
Wesley Wigham a9ad94ab3c
Conditional type simplifications & Globally cached conditional type instances (#29437)
* Introduce simpliciations for extract/exclude-like conditional types and fix restrictive instantiations

* Add test for the common simplifications

* unify true branch constraint generation logic and true branch simplification

* Use identical check on instantiated types

* Add late-instantiate conditionals to test

* Globally cache conditional type instantiations ala indexed access types

* Handle `any` simplifications

* Factor empty intersection check into function

* Modifify conditional type constraints to better handle single-branch `any` and restrictive type parameters

* Add test case motivating prior commit

* Fix lint

* Factor logic into worker vs cacheing function

* Remove now unneeded casts
2019-03-08 15:33:12 -08:00