mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 03:23:08 -06:00
Default contextual 'this' type is containing object literal
This commit is contained in:
parent
8cd6c5d8eb
commit
2ca6164fea
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user