Update src/services/refactors/extractSymbol.ts

Fixed typo in comment

Co-Authored-By: Orta <orta.therox+github@gmail.com>
This commit is contained in:
Titian Cernicova-Dragomir 2019-09-11 21:20:55 +03:00 committed by GitHub
parent 232ee608d5
commit 1d97ae62b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1107,7 +1107,7 @@ namespace ts.refactor.extractSymbol {
return { renameFilename, renameLocation, edits };
function transformFunctionInitializerAndType(variableType: TypeNode | undefined, initializer: Expression): { variableType: TypeNode | undefined, initializer: Expression } {
// If no contextual type exists there is noting to transfer to the function signature
// If no contextual type exists there is nothing to transfer to the function signature
if (variableType === undefined) return { variableType, initializer };
// Only do this for function expressions and arrow functions that are not generic
if (!isFunctionExpression(initializer) && !isArrowFunction(initializer) || !!initializer.typeParameters) return { variableType, initializer };