mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-10 06:41:59 -06:00
Sort extract constant above extract function (#35580)
This commit is contained in:
parent
a78342a160
commit
9a9baebdd6
@ -66,14 +66,6 @@ namespace ts.refactor.extractSymbol {
|
||||
|
||||
const infos: ApplicableRefactorInfo[] = [];
|
||||
|
||||
if (functionActions.length) {
|
||||
infos.push({
|
||||
name: refactorName,
|
||||
description: getLocaleSpecificMessage(Diagnostics.Extract_function),
|
||||
actions: functionActions
|
||||
});
|
||||
}
|
||||
|
||||
if (constantActions.length) {
|
||||
infos.push({
|
||||
name: refactorName,
|
||||
@ -82,6 +74,14 @@ namespace ts.refactor.extractSymbol {
|
||||
});
|
||||
}
|
||||
|
||||
if (functionActions.length) {
|
||||
infos.push({
|
||||
name: refactorName,
|
||||
description: getLocaleSpecificMessage(Diagnostics.Extract_function),
|
||||
actions: functionActions
|
||||
});
|
||||
}
|
||||
|
||||
return infos.length ? infos : emptyArray;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user