mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Add method signature handler to getTypeOfVariableOrParameterOrProperty (#20825)
This commit is contained in:
@@ -4683,7 +4683,8 @@ namespace ts {
|
||||
else if (isJSDocPropertyTag(declaration)
|
||||
|| isPropertyAccessExpression(declaration)
|
||||
|| isIdentifier(declaration)
|
||||
|| isMethodDeclaration(declaration) && !isObjectLiteralMethod(declaration)) {
|
||||
|| (isMethodDeclaration(declaration) && !isObjectLiteralMethod(declaration))
|
||||
|| isMethodSignature(declaration)) {
|
||||
// TODO: Mimics old behavior from incorrect usage of getWidenedTypeForVariableLikeDeclaration, but seems incorrect
|
||||
type = tryGetTypeFromEffectiveTypeNode(declaration) || anyType;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user