The assert is over-optimistic and should be removed until we can parse
every possible thing that people might put in a JSDoc type position.
Fixes#26693
* Use context free expression types in evolving array checking and cache context free type (#26585)
* Use context free expression types in evolving array checking and cache context free type
* Simplify second test
* Low max depth a tad just so node 8 wont stack out
* By request make flow control a round number
* Add missing declaration
* Fix#25954 - Always retain export modifier if default modifier is present
* Also fix an issue with scope markers in ambient modules not affecting the modifiers required
* 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
* 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.
Block scoped variables, classes and enums would issue a bogus
use-before-def error in jsdoc because name resolution always adds Value,
even when resolving a type.
Fixes#25097
* Handle intersection types when looking up base types for visibility
* Extract protected constructor check to function and recur on intersections
* Remove unneeded cast