* Added error for class properties used within their own declaration
Fixes#5987.
Usages of a class property in a preceding property already gave an error, but the following doesn't yet:
```ts
class Test {
x: number = this.x;
}
```
As with other use-before-declare checking, IIFEs are not treated as invalid uses.
* Accepted 'witness' baselines; removed unnecessary !==
* Addressed quick feedback items
* Accepted odd new baseline
* Fixed post-merge introduced lint errors
* Updated baselines again
* Change the default type parameter constraint and default to unknown from {}
* Relax unknown checking outside of strictNullChecks a bit
* Increase strictness on index signatures with type `unknown` so inference doesnt change surprisingly
* Remove redundant switch
* 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