Skip to content

Commit 95940e6

Browse files
committed
fix: ensure deprecated annotations always include message for TSDoc compliance
1 parent e12c83d commit 95940e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/TypeScriptWriter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,8 @@ boolean writeShapeDocs(Shape shape, UnaryOperator<String> preprocessor) {
227227
String deprecationMessage = deprecatedTrait.getMessage()
228228
.map(msg -> " " + msg)
229229
.orElse(" see description");
230-
String deprecationString = deprecatedTrait.getMessage().isPresent() ? "@deprecated" + deprecationMessage : "@deprecated";
231-
docs = docs + "\n\n" + deprecationString;
230+
String deprecationAnnotation = "@deprecated " + deprecationMessage;
231+
docs = docs + "\n\n" + deprecationAnnotation;
232232
}
233233
docs = preprocessor.apply(docs);
234234
docs = addReleaseTag(shape, docs);

0 commit comments

Comments
 (0)