mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-08 22:29:37 -05:00
Avoid duplicate code when checking for tagged templates.
This commit is contained in:
@@ -17749,15 +17749,11 @@ namespace ts {
|
||||
|
||||
let typeArguments: NodeArray<TypeNode>;
|
||||
|
||||
if (isTaggedTemplate) {
|
||||
typeArguments = (node as TaggedTemplateExpression).typeArguments;
|
||||
forEach(typeArguments, checkSourceElement);
|
||||
}
|
||||
else if (!isDecorator && !isJsxOpeningOrSelfClosingElement) {
|
||||
if (!isDecorator && !isJsxOpeningOrSelfClosingElement) {
|
||||
typeArguments = (<CallExpression>node).typeArguments;
|
||||
|
||||
// We already perform checking on the type arguments on the class declaration itself.
|
||||
if ((<CallExpression>node).expression.kind !== SyntaxKind.SuperKeyword) {
|
||||
if (isTaggedTemplate || (<CallExpression>node).expression.kind !== SyntaxKind.SuperKeyword) {
|
||||
forEach(typeArguments, checkSourceElement);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user