* Explicitly typed prototype assignments:ctx sensitive
Follow up to #25619: Add the necessary code to type `prototype`
correctly in prototype assignments so that code like
`F.prototype = { ... }` properly makes the object literal context
sensitive.
* Fix lint
* Explicitly typed js assignments: context sensitive
Explicitly typed special assignments should be context sensitive if they
have an explicit type tag. Previously no special assignments were
context sensitive because they are declarations, and in the common,
untyped, case we inspect the right side of the assignment to get the
type of the left side, and inspect the right side of the assignment to
get the type of the left side, etc etc.
Note that some special assignments still return `any` from
checkExpression, so still don't get the right type.
Fixes#25571
* Change prototype property handling+update bselines
* Fix indentation in test
* Update baselines
* mapTextChangesToCodeEditsUsingScriptInfo: Handle tsconfig.json text change
* Can't use `program.getSourceFile()` to determine file existence when multiple projects exist
* Use direct union instead of discriminated union
* Get return type from `@type` tag
This only happens in the checker, where the type is easily accessible.
The syntax-based check in getEffectiveReturnTypeNode as a fast path, and
for other uses that don't want to make a call to getTypeFromTypeNode.
Fixes#25525
* Implement PR suggestions
* Error when type tag isn't callable
* Fix lint
* Added reference test case and diagnostics message
* Adjusted arity checks to account for non-contiguous overloads
* Code cleanup, baseline not yet commited
* Accepted test baselines and minor implementation changes
* Cleaned up baseline tracking the now renamed arity check test
* Add range response when range contains only 2 values
* Added recent baseline
* Refined arity error messages when available overloads can be grouped
* Rolled back code formatting
* WIP cleanup needed in a few edge cases
* Finished adding new more descriptive error messages
* Code cleanup
* Added simplified version of bugfix for #19220
* Rebased onto master
* Removed whitespace after type assertion
* Code review simplifications
* Use correct diagnostic name
* Code review changes and simplification of diagnostic message
* Revert formatting changes
Previously it did not, causing misleading excess property errors. Note
that assignability errors with conditional types are still usually
confusing. This PR doesn't address that.
Also, make sure that exact matches in getSpellingSuggestion are skipped.