Skip to content

Commit 06e30ca

Browse files
committed
docs: add descriptions to properties initialized through the constructor
Adds the missing docs to some of the properties that are declared through the constructor params.
1 parent 5210b3e commit 06e30ca

File tree

7 files changed

+41
-7
lines changed

7 files changed

+41
-7
lines changed

src/lib/autocomplete/autocomplete.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ let _uniqueAutocompleteIdCounter = 0;
3333

3434
/** Event object that is emitted when an autocomplete option is selected */
3535
export class MatAutocompleteSelectedEvent {
36-
constructor(public source: MatAutocomplete, public option: MatOption) { }
36+
constructor(
37+
/** Reference to the autocomplete panel that emitted the event. */
38+
public source: MatAutocomplete,
39+
40+
/** Option that was selected. */
41+
public option: MatOption) { }
3742
}
3843

3944

src/lib/chips/chip-list.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,12 @@ let nextUniqueId = 0;
6060

6161
/** Change event object that is emitted when the chip list value has changed. */
6262
export class MatChipListChange {
63-
constructor(public source: MatChipList, public value: any) { }
63+
constructor(
64+
/** Chip list that emitted the event. */
65+
public source: MatChipList,
66+
67+
/** Value of the chip list when the event was emitted. */
68+
public value: any) { }
6469
}
6570

6671

src/lib/chips/chip.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,15 @@ export interface MatChipEvent {
2929

3030
/** Event object emitted by MatChip when selected or deselected. */
3131
export class MatChipSelectionChange {
32-
constructor(public source: MatChip, public selected: boolean, public isUserInput = false) { }
32+
constructor(
33+
/** Reference to the chip that emitted the event. */
34+
public source: MatChip,
35+
36+
/** Whether the chip that emitted the event is selected. */
37+
public selected: boolean,
38+
39+
/** Whether the selection change was a result of a user interaction. */
40+
public isUserInput = false) { }
3341
}
3442

3543

src/lib/core/option/option.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ let _uniqueIdCounter = 0;
3232

3333
/** Event object emitted by MatOption when selected or deselected. */
3434
export class MatOptionSelectionChange {
35-
constructor(public source: MatOption, public isUserInput = false) { }
35+
constructor(
36+
/** Reference to the option that emitted the event. */
37+
public source: MatOption,
38+
/** Whether the change in the option's value was a result of a user action. */
39+
public isUserInput = false) { }
3640
}
3741

3842
/**

src/lib/datepicker/datepicker-input.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,11 @@ export class MatDatepickerInputEvent<D> {
6161
/** The new value for the target datepicker input. */
6262
value: D | null;
6363

64-
constructor(public target: MatDatepickerInput<D>, public targetElement: HTMLElement) {
64+
constructor(
65+
/** Reference to the datepicker input component that emitted the event. */
66+
public target: MatDatepickerInput<D>,
67+
/** Reference to the native input element associated with the datepicker input. */
68+
public targetElement: HTMLElement) {
6569
this.value = this.target.value;
6670
}
6771
}

src/lib/select/select.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,11 @@ export const MAT_SELECT_SCROLL_STRATEGY_PROVIDER = {
137137

138138
/** Change event object that is emitted when the select value has changed. */
139139
export class MatSelectChange {
140-
constructor(public source: MatSelect, public value: any) { }
140+
constructor(
141+
/** Reference to the select that emitted the change event. */
142+
public source: MatSelect,
143+
/** Current value of the select that emitted the event. */
144+
public value: any) { }
141145
}
142146

143147
// Boilerplate for applying mixins to MatSelect.

src/lib/sidenav/drawer.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ export function throwMatDuplicatedDrawerError(position: string) {
5151
* @deprecated
5252
*/
5353
export class MatDrawerToggleResult {
54-
constructor(public type: 'open' | 'close', public animationFinished: boolean) {}
54+
constructor(
55+
/** Whether the drawer is opened or closed. */
56+
public type: 'open' | 'close',
57+
/** Whether the drawer animation is finished. */
58+
public animationFinished: boolean) {}
5559
}
5660

5761

0 commit comments

Comments
 (0)