diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 31c9acd8fb1..aa5d10c475c 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -20018,7 +20018,7 @@ namespace ts { const augmentsTags = getAllJSDocTagsOfKind(classLike, SyntaxKind.JSDocAugmentsTag); Debug.assert(augmentsTags.length > 0); if (augmentsTags.length > 1) { - error(augmentsTags[1], Diagnostics.The_total_number_of_augments_and_extends_tags_allowed_for_a_single_class_declaration_is_at_most_1); + error(augmentsTags[1], Diagnostics.Class_declarations_cannot_have_more_than_one_augments_or_extends_tag); } const name = getIdentifierFromEntityNameExpression(node.class.expression); diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 64c4d99d349..e0de43a97db 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -3527,7 +3527,7 @@ "category": "Error", "code": 8024 }, - "The total number of `@augments` and `@extends` tags allowed for a single class declaration is at most 1.": { + "Class declarations cannot have more than one `@augments` or `@extends` tag.": { "category": "Error", "code": 8025 }, diff --git a/tests/cases/fourslash/jsDocAugmentsAndExtends.ts b/tests/cases/fourslash/jsDocAugmentsAndExtends.ts index e76a617a3cf..10f33260268 100644 --- a/tests/cases/fourslash/jsDocAugmentsAndExtends.ts +++ b/tests/cases/fourslash/jsDocAugmentsAndExtends.ts @@ -10,6 +10,7 @@ //// */ //// class MyStringThing extends Thing { //// constructor() { +//// super(); //// var x = this.mine; //// x/**/; //// } @@ -27,24 +28,10 @@ verify.quickInfoIs("(local var) x: number"); verify.getSemanticDiagnostics( `[ { - "message": "The total number of \`@augments\` and \`@extends\` tags allowed for a single class declaration is at most 1.", + "message": "Class declarations cannot have more than one \`@augments\` or \`@extends\` tag.", "start": 36, "length": 24, "category": "error", "code": 8025 - }, - { - "message": "Constructors for derived classes must contain a \'super\' call.", - "start": 105, - "length": 59, - "category": "error", - "code": 2377 - }, - { - "message": "\'super\' must be called before accessing \'this\' in the constructor of a derived class.", - "start": 137, - "length": 4, - "category": "error", - "code": 17009 } ]`); \ No newline at end of file