* give suggestions when index signature given
* add tests for noImplicitAny indexing on Object
* remove comments regarding error messages
* recommend set if el is on RHS of assignment else get
* add new baseline tests
fix#31012
Since the purpose of isolatedModules: true is to
do extra validation to ensure that separate
compilation is safe
Allowing emit in the presence of errors is
compatible with that intention.
Signed-off-by: Max Heiber <max.heiber@gmail.com>
type when comparing equality to a type that isn't a union of literal
types.
The rule is redundant because a primitive type is already directed-
comparable to a value of that primitive type, and it causes errors to be
missed when comparing a type parameter _constrained_ by a union of
literal types to another union of literal types.
The baseline changes look like improvements to me.
Fixes#26758.
* Perform excess property checking on intersection and union members
* Allow partial union props to contain the undefined type
* Add test case from #30771
* Un-terse getPossiblePropertiesOfUnionType side-effecting code
* Fix bug exposed in RWC
* Cache results of getPossiblePropertiesOfUnionType
* Fix whitespace
* 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