Skip to content

Commit d58b3c0

Browse files
authored
fix: use the optional tag when property on class is optional (#738)
1 parent 415437e commit d58b3c0

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/html/symbols/class.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ fn render_class_property(
429429
tags.insert(Tag::Readonly);
430430
}
431431
if property.optional {
432-
tags.insert(Tag::Abstract);
432+
tags.insert(Tag::Optional);
433433
}
434434

435435
let ts_type = property

tests/snapshots/html_test__html_doc_files_multiple-23.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ Properties</h2></div><div class="space-y-8"><div class="anchorable docEntry" id=
410410
<div class="anchorable docEntry" id="property_foo">
411411

412412
<div class="docEntryHeader">
413-
<div><div class="space-x-1 mb-1"><div class="text-abstract border border-abstract/50 bg-abstract/5 inline-flex items-center gap-0.5 *:flex-none rounded-md leading-none text-sm py-1 px-2">abstract</div>
413+
<div><div class="space-x-1 mb-1"><div class="text-optional border border-optional/50 bg-optional/5 inline-flex items-center gap-0.5 *:flex-none rounded-md leading-none text-sm py-1 px-2">optional</div>
414414
</div><code><a href="#property_foo" class="anchor" aria-label="Anchor" tabIndex="-1"><svg
415415
width="16"
416416
height="16"

tests/snapshots/html_test__symbol_group.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1508,7 +1508,7 @@ expression: files
15081508
},
15091509
"tags": [
15101510
{
1511-
"kind": "abstract"
1511+
"kind": "optional"
15121512
}
15131513
],
15141514
"js_doc": null,

0 commit comments

Comments
 (0)