@@ -6178,19 +6178,11 @@ namespace ts {
6178
6178
return undefined;
6179
6179
}
6180
6180
6181
- function getTypeParametersFromJSDocTemplate(declaration: DeclarationWithTypeParameters): TypeParameterDeclaration[] {
6182
- if (declaration.flags & NodeFlags.JavaScriptFile) {
6183
- const templateTag = getJSDocTemplateTag(declaration);
6184
- return templateTag && templateTag.typeParameters;
6185
- }
6186
- return undefined;
6187
- }
6188
-
6189
6181
// Return list of type parameters with duplicates removed (duplicate identifier errors are generated in the actual
6190
6182
// type checking functions).
6191
6183
function getTypeParametersFromDeclaration(declaration: DeclarationWithTypeParameters): TypeParameter[] {
6192
6184
let result: TypeParameter[];
6193
- forEach(declaration.typeParameters || getTypeParametersFromJSDocTemplate (declaration), node => {
6185
+ forEach(getEffectiveTypeParameterDeclarations (declaration), node => {
6194
6186
const tp = getDeclaredTypeOfTypeParameter(node.symbol);
6195
6187
if (!contains(result, tp)) {
6196
6188
if (!result) {
@@ -8165,8 +8157,7 @@ namespace ts {
8165
8157
case SyntaxKind.ClassExpression:
8166
8158
case SyntaxKind.InterfaceDeclaration:
8167
8159
case SyntaxKind.TypeAliasDeclaration:
8168
- const declaration = node as DeclarationWithTypeParameters;
8169
- const typeParameters = declaration.typeParameters || getTypeParametersFromJSDocTemplate(declaration);
8160
+ const typeParameters = getEffectiveTypeParameterDeclarations(node as DeclarationWithTypeParameters);
8170
8161
if (typeParameters) {
8171
8162
for (const d of typeParameters) {
8172
8163
if (contains(mappedTypes, getDeclaredTypeOfTypeParameter(getSymbolOfNode(d)))) {
0 commit comments