mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-07 23:08:20 -06:00
Update src/services/refactors/extractSymbol.ts
Fixed typo in comment Co-Authored-By: Orta <orta.therox+github@gmail.com>
This commit is contained in:
parent
232ee608d5
commit
1d97ae62b6
@ -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 };
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user