* Unify substitution type `any` handling into costruction and instantiation
* Strengthen supertype reduction check to reduce breakage
* Rename conditional type fields per convention
* Explicitly handle anyish signatures in compareSignaturesRelated so strict variance doesnt kill subtyping
* Allow tuple expansions to an `any` rest to be considered an `any` signature as well
This kind of merged symbol causes crashes in two places because it's
marked BlockScoped, which makes us assume that it must be something that
is inside a SourceFile. However, block-scoped checks don't make sense
for this kind of symbol, so I exclude them by looking at the kind of
the valueDeclaration, as @mprobst suggested in the original bug.
* Handle generic mapped types in getTypeOfPropertyOfContextualType.
The changes to existing baselines look acceptable to me.
Fixes#24694.
* Minor reorganization, add test case from @yortus
* 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
* Use identity with the restrictive instantation to detect nongenric instances and disable variance probing on nongeneric instances
* Generalize to also include interfaces, add test case, still perform argument comparisons for postive comparisons if possible
* Actually accept baselines, lol
* Reduce deep nesting limit just a bit so yargs still builds
* Handle circular identities in isNonGeneric
* Use a simple traversal of the types rather than the restrictive instantiation
* Cache the bits using an existing field to further reduce any time nongeneric check takes
* Revert to using an existing mapper, use permissive > restrictive
* Revert constant change
* And revert the comment, too
* Unify variance probing error exceptions between interfaces/aliases
* Consistiently return false on variance probe failure
* Remove strictFunctionTypes early bail from getVariances so independent type parameters are correctly measured
* Fix lint, remove now-redundant change from covariant void check function