* Add user preference to control renaming through exports
* Only impact renaming
* Update baselines
* Use flag to control all prefix and suffix text and imports
* [WIP] add tests
* Only skip export import specifier with flag
* [WIP] Update tests
* Update test
* Pick up preference from host and update test
* Shorten flag name
* Add missing utility function
* Update comment
* [WIP] rename flag and respond to cr
* [WIP] Add flag for forRelatedSymbol
* Use larger search symbol set for old-style rename
* Respond to CR
* Fix small error
* Fix type mismatch
* Update comment and remove unnecessary exprot
* Respond to CR
Starts on #29035 by creating a codefix to enable the `experimentalDecorators` setting in a user's config file, if one exists. The issue's discussion also mentions giving a more precise error message if the user has a jsconfig or tsconfig or creating one if not; I'd rather tackle those in separate PRs to keep this one small.
Doesn't create the code action if no config file is present. Otherwise keeps to the precedent of returning without action when the config file contents aren't the expected JSON structure (looking at `fixCannotFindModule.ts`). Moves a couple JSON helpers from that file into the sibling `helpers.ts` so both codefixes can use them.
* Add core of new union signature logic and test - needs intersection signature logic to fully work
* Add inversion of variance for class props lookup from union sig returns
* Fix lints
* Combine parameter names for nicer quick info
* PR feedback 1
* Fix miscopy
* PR feedback round 2
* Remove argument name combining because loc :(
* Nit cleanup round 3
* Reinline getTupleTypeForArgumentAtPos
* Remove a tad more
* No step on sneky off-by-one error
The only unsupported one is binding patterns, which aren't supported by the codefix.
The code was a lot faster to write without supporting them, but there's
no real barrier besides that.
* Infer from arrows from usage.
Previously only function expressions were, and only those with an easily
accessible name. Now any arrow function or function expression will
infer from usage.
* remove isApplicableFunctionForInference
*all* functions are applicable for inference now.
* Clamp calculated sourcemap positions rather than throwing, to allow the underlying file to drift out of date with the sourcemap without a crash
* Clamp line as well
* constructor functions infer from call+construct
Also fix an incorrect combining of inferences for rest parameters: the
inferred types will be arrays in the body of the function and the
arguments from outside the function will be the element type.
* All functions infer from call+construct contexts
* Initial version, doesn't work for primitives yet.
Need to find out why.
* Primitives now work, plus improve error message
null and void don't even parse without parameter names so they are not
tested.
* Codefix: Add names to nameless parameters
* Improve error wording
* Add detail to error message
* string|number inferences are low priority
Also, refactor unifyFromContext to explicitly handle priorities
* string/number/strnum are not mutually exclusive
* Assert that high/low can't apply to same element