update getAvailableActions

This commit is contained in:
BigAru
2018-11-07 13:57:50 +01:00
parent 5dfc71c14a
commit 9a466f4e9c
@@ -25,11 +25,11 @@ namespace ts.refactor.convertArrowFunctionOrFunctionExpression {
readonly name: Identifier;
}
function getAvailableActions(context: RefactorContext): ApplicableRefactorInfo[] | undefined {
function getAvailableActions(context: RefactorContext): ReadonlyArray<ApplicableRefactorInfo> {
const { file, startPosition } = context;
const info = getFunctionInfo(file, startPosition);
if (!info) return undefined;
if (!info) return emptyArray;
const { selectedVariableDeclaration, func } = info;
const possibleActions: RefactorActionInfo[] = [];