...correctly in a containing scope. It's not an issue because we'll
just declare a corresponding type parameter on the extracted function
and pass the original as a type argument.
Fixes#18142
getSignatureInstantation takes a parameter that tells whether the
signature comes from Javascript and therefore is allowed to pass fewer
than the required number of type arguments. (Defaults are chosen if this
is the case.)
Previously, getInstantiatedConstructorsForTypeArguments forgot to
provide this argument, and constructors with insufficient type arguments
would cause a crash because getSignatureInstantiation would not know to
fill in the missing type arguments.
* Don't count a write-only reference as a use
* Split isWriteAccess to isWriteOnlyAccess and isReadOnlyAccess
* Update "unusedParameterUsedInTypeOf" to use "b"
* Update diagnostic messages: "is never used" -> "its value is never read"
* Use a WriteKind enum
* Rename enum and move documentation to enum members
* extractMethod: Support renameLocation
* Add tslint disable
* Properly analyze list of changes to always get a correct rename location
* Update test
* Ensure name is really unique
* Improvements to test code
* Respond to PR comments
Makes another test case pass that was taking exponential time to parse,
because now it notices that the = is not present and doesn't even try to
parse the initialiser expression.
Fail speculative parsing of arrow function expressions whenever it has a
parameter with an initialiser that is missing '='. Ordinarily this is
allowed for better error recovery in the language service, but for
speculative parsing, the errors can compound. When the initialiser is an
error, and when the '=>' is missing (which is also allowed), what is
putatively an arrow function may actually be something else.
For example, `(a / 8) + function ()
{ }` is currently parsed as if someone had intended to write
`(a = /8)+function()/) => { }` but they forgot the `=` of the
initialiser, the `=>` of the lambda, forgot to close the regular
expression, and mistakenly inserted a newline right after the regular
expression.
Previously, it would crash — the arguments object is a transient
symbol with no declaration, and `getEffectiveTypeAnnotationNode`
does not accept `undefined`.