-
Notifications
You must be signed in to change notification settings - Fork 12.2k
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
Improve insertion position of extracted methods #18343
Conversation
Old: End of target scope New: Before the first non-constructor function following the extracted range in the target scope
@amcasey, |
FYI @bterlson. |
src/compiler/utilities.ts
Outdated
@@ -505,7 +505,7 @@ namespace ts { | |||
} | |||
} | |||
|
|||
function staticAssertNever(_: never): void {} | |||
export function staticAssertNever(_: never): void {} |
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.
There's a duplicate function assertTypeIsNever
in core.ts
, or you may prefer Debug.assertNever
which throws (from #18287 so you'd have to rebase this).
Improve insertion position of extracted methods (cherry picked from commit 40e4591)
Improve insertion position of extracted methods (cherry picked from commit 40e4591)
Improve insertion position of extracted methods (cherry picked from commit 40e4591)
Old: End of target scope
New: Before the first non-constructor function following the extracted range in the target scope
TODO: I'm going to add more tests, but I know people are anxious for local builds of this change.