mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-27 22:39:59 -05:00
JavaScript: handle lack of modifiers on extracted method
The emitter expects undefined, rather than empty. This only affects JS,
because TS applies `private` to all extracted methods.
(cherry picked from commit 9630c46ea7)
This commit is contained in:
@@ -664,7 +664,7 @@ namespace ts.refactor.extractMethod {
|
||||
}
|
||||
newFunction = createMethod(
|
||||
/*decorators*/ undefined,
|
||||
modifiers,
|
||||
modifiers.length ? modifiers : undefined,
|
||||
range.facts & RangeFacts.IsGenerator ? createToken(SyntaxKind.AsteriskToken) : undefined,
|
||||
functionName,
|
||||
/*questionToken*/ undefined,
|
||||
|
||||
Reference in New Issue
Block a user