-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Extract method #16960
Closed
Closed
Extract method #16960
Changes from all commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
be27a1a
Rebased EM WIP
RyanCavanaugh e798257
Change refactor api in fourslash
RyanCavanaugh bf176a6
Add comments
RyanCavanaugh 0130ebb
Better baselines
RyanCavanaugh bbf5cd7
Rename test we we can run it independent of unit tests
RyanCavanaugh 9dd6bef
Change fourslash refactor API
RyanCavanaugh f21b7ae
Remove invalid assert
RyanCavanaugh 674b1bf
Fix undefined computation of length
RyanCavanaugh 9367473
Improved type baselines for EM .js
RyanCavanaugh 1ea9972
Add validation to fourslash test
RyanCavanaugh 1787fa8
Move text to diagnostic messages
RyanCavanaugh fb89c00
Merge branch 'master' into extract-method
RyanCavanaugh 4aef5e7
Properly widen literal param types + emit correct return statements f…
RyanCavanaugh b5c5c40
Don't offer to extract lone identifiers
RyanCavanaugh b1fa49f
Don't fail if span is zero-length
RyanCavanaugh 825237b
Don't crash when span is empty
RyanCavanaugh aa6f3aa
Restore assert and fix synthetic type node creation
RyanCavanaugh b7e4451
Re-use noop
RyanCavanaugh 419a4c2
Address portion of CR feedback
RyanCavanaugh 4218738
Only compute changes for requested refactors
RyanCavanaugh 6d2bc90
Address more PR comments
RyanCavanaugh 9a24549
Merge master
RyanCavanaugh 271ecb1
Remove WS
RyanCavanaugh bdefcc3
Emit return types in ctxly-typed functions and don't emit annotations…
RyanCavanaugh 6428b1e
Fix broken test
RyanCavanaugh 8af8ac2
Handle fn params and duplicated scope names properly
RyanCavanaugh ede6671
Re-use isJS result
RyanCavanaugh 55b28ad
You may not extract-method on exported declarations
RyanCavanaugh 2d9eaa9
Correctly apply overlapped edits in fourslash
RyanCavanaugh 2f2c780
Fix some parenting issues & start detecting stranded references
RyanCavanaugh 63193da
Add return type annotation and regression test for a prior assert
RyanCavanaugh 889292a
Detect would-be stranded references to extracted declarations
RyanCavanaugh e229d42
Tests
RyanCavanaugh 7b2dd8a
Fix line ending
RyanCavanaugh bf6c0a9
Function blocks aren't statements!
RyanCavanaugh 3424312
Disallow certain classes of refactors
RyanCavanaugh ff18df3
Add test
RyanCavanaugh 7f29fcd
Handle static methods and static method name conflicts
RyanCavanaugh d39d95b
Merge
RyanCavanaugh dda5496
No extracting other non-statement blocks
RyanCavanaugh e88ff21
More disallowed extraction position
RyanCavanaugh bd80005
Block more nonworking extraction locations
RyanCavanaugh ff716d0
Properly enumerate class blocks
RyanCavanaugh 1291cfd
Add tests task
RyanCavanaugh a26790f
Don't re-use nodes
RyanCavanaugh 56e1d6d
Correctly detect JavaScriptness
RyanCavanaugh 7f3a0a8
Create multi-line bodies
RyanCavanaugh 003cd0a
Add support for validating specific refactor actions' availability
RyanCavanaugh a76664c
More testcases
RyanCavanaugh 42e0652
Accept baselines
RyanCavanaugh 46a84c3
Innumerable bugfixes
RyanCavanaugh a97ab93
Merge branch 'master' into extract-method
RyanCavanaugh 37ae957
Add additional test
RyanCavanaugh 2adb2b3
Fix some class scenarios (static methods, readonly inits in ctor)
RyanCavanaugh ba37830
Prevent extraction of exported variables
RyanCavanaugh 4dafb40
No extraction of ambient declarations
RyanCavanaugh c1c7e83
Put __return first
RyanCavanaugh a4c41b8
Don't wrongly exclude accessor in indexed access exprs
RyanCavanaugh b5a88c1
Share selection logic; fix typos
RyanCavanaugh 568d5f6
Merge branch 'master' into extract-method
RyanCavanaugh 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
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.
Could you eliminate the need to do this by walking the list backwards?