-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert to named parameters #30089
Merged
Merged
Convert to named parameters #30089
Changes from all commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
9aeeae5
create refactoring for converting to named parameters
705ac60
WIP
23fc65a
implement new parameter creation
919ed79
implement new parameter creation
bd290e6
add test for convert to named parameters refactoring
f3e60be
Move function getTypeNodeIfAccessible from inferFromUsage to utilities
3243b4b
Refactor direct function calls
b668e34
Add tests for convert to named parameters refactor
9e62eb9
Merge branch 'master' into convert-to-named-parameters
1d94322
preserve this parameter when refactoring
050c70a
update tests formatting
40987ec
add tests
bf25ba4
Don't refactor if variable declaration has type annotation
bde97d1
fix refactor to find super references
abb1155
add more tests
674800f
implement refactor for functions with a rest parameter
1d1c820
add tests for rest parameters
18b2b55
add option to suppressLeadingAndTrailingTrivia non recursively
b87392c
fix duplication of leading and trailing comments on refactored function
9270e58
Merge branch 'master' into convert-to-named-parameters
7d86fda
fix hasThisParameter to check for parameters length
26f8ddd
create functions for copying trailing comments and rename previous co…
dba631d
copy comments when refactoring
4e135f1
add tests for comments
dbd8499
don't apply refactor when parameter has decorators
ef4db31
don't apply changes when unexpected reference is found
ec0e734
return function expression name in getFunctionDeclarationNames
05e9d6c
fix reference checking
b93afff
rename refactor tests
eef3da5
create new ConfigurableStart and ConfigurableEnd options and rename them
b6c8382
replace argument list instead of whole call when refactoring
a773046
copy argument comments to property
78968b1
don't provide refactor in js file
17b8965
include trailing trivia after expression in getAdjustedEndPosition if…
edf0cec
add tests for inherited constructor and method
754f4a4
refactor expected test output
e40442d
minor refactors
6b53489
Merge branch 'master' into convert-to-named-parameters
ce42aa4
check usages of class if refactoring a constructor
640424e
fix comment
bc3611d
update failing tests
f571866
add new tests for bad class references
365967d
Merge branch 'master' into convert-to-named-parameters
a5153a9
add tests
e3a465f
change startPosition and endPosition to leadingTriviaOption and trail…
bf5123d
don't export useNonAjustedPositions
970ec62
remove unused LeadingTriviaOption and TrailingTriviaOption options
006fe14
refactor utilities
54c7996
refactor getGroupReferences
7fd6868
minor refactors to convertToNamedParameters
51616a4
use sortAndDeduplicate instead of deduplicate
617d5af
add diagnostics message for refactor description
1f91aa1
remove inlineable
cd060e7
use interface for ValidVariableDeclaration
98a146d
use getTouchingToken
8c4ab69
add test for non-transient symbol
60b2d6a
remove unnecessary closures
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we agreed on "Convert to parameters object" ?