mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
Address CR feedback
This commit is contained in:
parent
0d47c73ba6
commit
88cddc234d
@ -9070,7 +9070,7 @@ namespace ts {
|
||||
const propDeclaration = prop.valueDeclaration as ObjectLiteralElementLike;
|
||||
Debug.assertNode(propDeclaration, isObjectLiteralElementLike);
|
||||
|
||||
if (getContainingStatement(errorNode) === getContainingStatement(propDeclaration)) {
|
||||
if (findAncestor(errorNode, isStatement) === findAncestor(propDeclaration, isStatement)) {
|
||||
errorNode = propDeclaration;
|
||||
}
|
||||
|
||||
@ -12815,13 +12815,6 @@ namespace ts {
|
||||
undefined;
|
||||
}
|
||||
|
||||
function getContainingStatement(node: Node): Node {
|
||||
while (node && !isStatement(node)) {
|
||||
node = node.parent;
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
||||
function getThisTypeArgument(type: Type): Type {
|
||||
return getObjectFlags(type) & ObjectFlags.Reference && (<TypeReference>type).target === globalThisType ? (<TypeReference>type).typeArguments[0] : undefined;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user