Skip to content

Commit f5be518

Browse files
authored
chore: fix API extractor warnings (#36094)
1 parent 30a4280 commit f5be518

7 files changed

Lines changed: 68 additions & 21 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "none",
3+
"comment": "chore: fix API extractor warnings in tsdocs and comments",
4+
"packageName": "@fluentui/web-components",
5+
"email": "13071055+chrisdholt@users.noreply.github.com",
6+
"dependentChangeType": "none"
7+
}

packages/web-components/src/accordion/accordion.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ export class Accordion extends FASTElement {
9292

9393
/**
9494
* Find the first expanded item in the accordion
95-
* @returns {void}
9695
*/
9796
private findExpandedItem(): BaseAccordionItem | Element | null {
9897
if (!this.accordionItems || this.accordionItems?.length === 0) {
@@ -108,7 +107,6 @@ export class Accordion extends FASTElement {
108107
/**
109108
* Resets event listeners and sets the `accordionItems` property
110109
* then rebinds event listeners to each non-disabled item
111-
* @returns {void}
112110
*/
113111
private setItems = (): void => {
114112
waitForConnectedDescendants(this, () => {
@@ -140,16 +138,15 @@ export class Accordion extends FASTElement {
140138

141139
/**
142140
* Checks if the accordion is in single expand mode
143-
* @returns {boolean}
141+
* @returns true if the accordion is in single expand mode.
144142
*/
145143
private isSingleExpandMode(): boolean {
146144
return this.expandmode === AccordionExpandMode.single;
147145
}
148146

149147
/**
150148
* Controls the behavior of the accordion in single expand mode
151-
* @param expandedItem The item to expand in single expand mode
152-
* @returns {void}
149+
* @param expandedItem - The item to expand in single expand mode
153150
*/
154151
private setSingleExpandMode(expandedItem: Element): void {
155152
if (this.accordionItems.length === 0) {
@@ -176,7 +173,7 @@ export class Accordion extends FASTElement {
176173

177174
/**
178175
* Removes event listeners from the previous accordion items
179-
* @param oldValue An array of the previous accordion items
176+
* @param oldValue - An array of the previous accordion items
180177
*/
181178
private removeItemListeners = (oldValue: any): void => {
182179
oldValue.forEach((item: HTMLElement, index: number) => {
@@ -188,7 +185,7 @@ export class Accordion extends FASTElement {
188185

189186
/**
190187
* Changes the expanded state of the accordion item
191-
* @param evt Click event
188+
* @param evt - Click event
192189
* @returns
193190
*/
194191
private expandedChangedHandler: EventListener = (evt: Event): void => {

packages/web-components/src/drawer/drawer.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import { DrawerPosition, DrawerSize, DrawerType } from './drawer.options.js';
88
*
99
* @extends FASTElement
1010
*
11-
* @attr {DrawerType} type - Determines whether the drawer should be displayed as modal, non-modal, or alert.
12-
* @attr {DrawerPosition} position - Sets the position of the drawer (start/end).
13-
* @attr {DrawerSize} size - Sets the size of the drawer (small/medium/large).
14-
* @attr {string} ariaDescribedby - The ID of the element that describes the drawer.
15-
* @attr {string} ariaLabelledby - The ID of the element that labels the drawer.
11+
* @attr type - Determines whether the drawer should be displayed as modal, non-modal, or alert.
12+
* @attr position - Sets the position of the drawer (start/end).
13+
* @attr size - Sets the size of the drawer (small/medium/large).
14+
* @attr ariaDescribedby - The ID of the element that describes the drawer.
15+
* @attr ariaLabelledby - The ID of the element that labels the drawer.
1616
*
1717
* @csspart dialog - The dialog element of the drawer.
1818
*
@@ -73,10 +73,11 @@ export class Drawer extends FASTElement {
7373
@attr({ attribute: 'aria-describedby' })
7474
public ariaDescribedby?: string;
7575

76-
/**""
76+
/**
77+
* Sets the position of the drawer (start/end).
78+
*
7779
* @public
7880
* @defaultValue start
79-
* Sets the position of the drawer (start/end).
8081
*/
8182
@attr
8283
public position: DrawerPosition = DrawerPosition.start;

packages/web-components/src/message-bar/message-bar.template.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import type { MessageBar } from './message-bar.js';
44
/**
55
* Generates a template for the MessageBar component.
66
* @public
7-
* @param {MessageBar} T - The type of the MessageBar.
8-
* @returns {ElementViewTemplate<T>} - The template for the MessageBar component.
7+
* @param T - The type of the MessageBar.
8+
* @returns The template for the MessageBar component.
99
*/
1010
export function messageBarTemplate<T extends MessageBar>(): ElementViewTemplate<T> {
1111
return html<T>`
@@ -22,6 +22,6 @@ export function messageBarTemplate<T extends MessageBar>(): ElementViewTemplate<
2222

2323
/**
2424
* The template for the MessageBar component.
25-
* @type {ElementViewTemplate<MessageBar>}
25+
* @type ElementViewTemplate
2626
*/
2727
export const template: ElementViewTemplate<MessageBar> = messageBarTemplate();

packages/web-components/src/radio/radio.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export class Radio extends BaseCheckbox {
3737
* @internal
3838
* @override
3939
* @remarks
40-
* To make a group of radio controls required, see {@link RadioGroup.required}.
40+
* To make a group of radio controls required, see `RadioGroup.required`.
4141
*/
4242
protected requiredChanged(): void {
4343
return;

packages/web-components/src/tooltip/tooltip.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export class Tooltip extends FASTElement {
124124

125125
/**
126126
* Shows the tooltip
127-
* @param delay Number of milliseconds to delay showing the tooltip
127+
* @param delay - Number of milliseconds to delay showing the tooltip
128128
* @internal
129129
*/
130130
public showTooltip(delay: number = this.defaultDelay): void {
@@ -136,7 +136,7 @@ export class Tooltip extends FASTElement {
136136

137137
/**
138138
* Hide the tooltip
139-
* @param delay Number of milliseconds to delay hiding the tooltip
139+
* @param delay - Number of milliseconds to delay hiding the tooltip
140140
* @internal
141141
*/
142142
public hideTooltip(delay: number = this.defaultDelay): void {

packages/web-components/tsdoc.json

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,41 @@
3636
"tagName": "@tag",
3737
"syntaxKind": "block",
3838
"allowMultiple": false
39+
},
40+
{
41+
"tagName": "@attr",
42+
"syntaxKind": "block",
43+
"allowMultiple": true
44+
},
45+
{
46+
"tagName": "@class",
47+
"syntaxKind": "block",
48+
"allowMultiple": false
49+
},
50+
{
51+
"tagName": "@extends",
52+
"syntaxKind": "block",
53+
"allowMultiple": false
54+
},
55+
{
56+
"tagName": "@method",
57+
"syntaxKind": "block",
58+
"allowMultiple": true
59+
},
60+
{
61+
"tagName": "@summary",
62+
"syntaxKind": "block",
63+
"allowMultiple": false
64+
},
65+
{
66+
"tagName": "@type",
67+
"syntaxKind": "block",
68+
"allowMultiple": false
69+
},
70+
{
71+
"tagName": "@default",
72+
"syntaxKind": "block",
73+
"allowMultiple": false
3974
}
4075
],
4176
"supportForTags": {
@@ -45,6 +80,13 @@
4580
"@cssproperty": true,
4681
"@event": true,
4782
"@fires": true,
48-
"@tag": true
83+
"@tag": true,
84+
"@attr": true,
85+
"@class": true,
86+
"@extends": true,
87+
"@method": true,
88+
"@summary": true,
89+
"@type": true,
90+
"@default": true
4991
}
5092
}

0 commit comments

Comments
 (0)