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.
* Handle generic mapped types in getTypeOfPropertyOfContextualType.
The changes to existing baselines look acceptable to me.
Fixes#24694.
* Minor reorganization, add test case from @yortus
- For a sub-module, the `declare module` statement needs to refer to the
sub-module.
- For an import of "./node_modules/foo", don't show advice to install
"@types/foo" or `declare module "foo"` because it won't help.
Fixes#26581.
skipping narrowing if the old algorithm produces a type to which the
assigned type is not assignable.
This also means we'll no longer narrow for erroneous assignments where
the assigned type is not assignable to the declared type. This is the
reason for the numericLiteralTypes3 baseline change.
Fixes#26405.
typeMaybeAssignableTo.
typeMaybeAssignableTo decomposed unions at the top level of the assigned
type but didn't properly handle other unions that arose during
assignability checking, e.g., in the constraint of a generic lookup
type.
Fixes#26130.
unmangled package name where appropriate.
Add a test case for an untyped sub-module of a scoped package with
typings. The other diagnostic message is covered by existing tests; I
guess no one looked at the baselines closely enough.
Fixes#23999.
comparable to the original.
Also improve the error message for implicit conversion of a symbol to a
string in a template literal, which previously shared the error message
with type assertions.
Fixes#25539. Addresses #25870.