mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 07:13:45 -05:00
Sort extract constant above extract function (#35580)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user