mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 07:13:45 -05:00
Default contextual 'this' type is containing object literal
This commit is contained in:
@@ -11230,6 +11230,9 @@ namespace ts {
|
||||
}
|
||||
objectLiteral = <ObjectLiteralExpression>objectLiteral.parent.parent;
|
||||
}
|
||||
// There was no contextual ThisType<T> for the containing object literal, so the contextual type
|
||||
// for 'this' is the type of the object literal itself.
|
||||
return checkExpressionCached(containingLiteral);
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
|
||||
Reference in New Issue
Block a user