mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-27 22:39:59 -05:00
Extend the MetaProperty check to work for new.target too
This commit is contained in:
@@ -21322,10 +21322,8 @@ namespace ts {
|
||||
switch (source.kind) {
|
||||
case SyntaxKind.MetaProperty:
|
||||
return target.kind === SyntaxKind.MetaProperty
|
||||
&& (source as MetaProperty).keywordToken === SyntaxKind.ImportKeyword
|
||||
&& (target as MetaProperty).keywordToken === SyntaxKind.ImportKeyword
|
||||
&& (source as MetaProperty).name.escapedText === "meta"
|
||||
&& (target as MetaProperty).name.escapedText === "meta";
|
||||
&& (source as MetaProperty).keywordToken === (target as MetaProperty).keywordToken
|
||||
&& (source as MetaProperty).name.escapedText === (target as MetaProperty).name.escapedText;
|
||||
case SyntaxKind.Identifier:
|
||||
case SyntaxKind.PrivateIdentifier:
|
||||
return target.kind === SyntaxKind.Identifier && getResolvedSymbol(<Identifier>source) === getResolvedSymbol(<Identifier>target) ||
|
||||
|
||||
Reference in New Issue
Block a user