Sort extract constant above extract function (#35580)

This commit is contained in:
Andrew Branch 2019-12-09 10:33:28 -08:00 committed by GitHub
parent a78342a160
commit 9a9baebdd6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}