This completes the work that started in PR #33069, and fixes#32835.
There are probably two additional related changes that are needed to
make this more complete:
* Fix the code that composes the error message (see the first two
`FIXME`s in `callWithSpread3.ts`).
* Fix the code that checks the argument types (second two `FIXME`s).
* There is also an error in `genericRestParameters1.ts` which changed
but should not be an error in the first place. Added a `FIXME` there
too. (Probably will work if the previous iterm is done.)
In addition, `getEffectiveCallArguments` munges the arguments in case of
a spread in the last argument which might be better to avoid. (I think
that there are cases where it wouldn't work anyway, such as a spread of
an array followed by a spread of an empty array.)
* Emit buildinfo when there are errors with noEmitOnError?
TODO: --build mode
* Always emit tsbuild info even if there are non syntax errors in tsc --build mode
* Sort affectedFilesPendingEmit for consistent build info text
* add skeleton
* add getAvailableActions
* add working getEditsForAction
* add multi vardecl
* fix multi decl bug
* change refactor name
* add tests for ToAnon, ToArrow and available arrow
* add tests for ToNamed and available anon
* add tests for ReturnType and available Arrow as FnParam
* fix bug modifiers by toNamed
* add tests for modifiers
* fix for tslint error
* adapt one test case
* refactor getInfo getAvailableActions
* refactor small progress
* extract creation of block
* extract creation of funcDeclaration
* make guideline compliant
* apply feedback from pr
* add testcase and apply feedback from pr
* apply feedback from pr
* add newline
* rename testcases
* Make conditions more expressive
* fix for unnecessary duplication of comment
* apply feedback from pr
* update getAvailableActions
* check if functionExpression name is used
* add more testcases
* do not provide refactoring when it contains this
because this behaves differently in arrow than in function
* exclude nested functions and classes at containingThis check
* fix linting error
* fix line endings
Co-authored-by: BigAru <arooran@indikon.ch>
Co-authored-by: bigaru <bigaru@users.noreply.github.com>
Co-authored-by: Jesse Trinity <42591254+jessetrinity@users.noreply.github.com>
Co-authored-by: Jesse Trinity <jetrinit@microsoft.com>
* fix: range of ts2657 (jsx expr must have parent) and remove 2695 (LHS expr of comma has no side effects)
* feat: add code fix for 2657
* fix: resolve review
* chore: hoist a var
* chore: add test for skipTrivia
* fix: rebase error
* Update src/compiler/diagnosticMessages.json
Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
* Update src/services/codefixes/wrapJsxInFragment.ts
Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
Co-authored-by: Andrew Branch <andrew@wheream.io>
Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>