Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Commit 6fdd328

Browse files
authored
chore: add JSDoc to MediaChange (#920)
1 parent 676ddf7 commit 6fdd328

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

src/lib/core/media-change.ts

+13-6
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,20 @@ export class MediaChange {
1414
property: string = '';
1515
value: any;
1616

17-
constructor(public matches = false, // Is the mq currently activated
18-
public mediaQuery = 'all', // e.g. (min-width: 600px) and (max-width: 959px)
19-
public mqAlias = '', // e.g. gt-sm, md, gt-lg
20-
public suffix = '' // e.g. GtSM, Md, GtLg
21-
) { }
17+
/**
18+
* @param matches whether the mediaQuery is currently activated
19+
* @param mediaQuery e.g. (min-width: 600px) and (max-width: 959px)
20+
* @param mqAlias e.g. gt-sm, md, gt-lg
21+
* @param suffix e.g. GtSM, Md, GtLg
22+
*/
23+
constructor(public matches = false,
24+
public mediaQuery = 'all',
25+
public mqAlias = '',
26+
public suffix = '') {
27+
}
2228

23-
clone() {
29+
/** Create an exact copy of the MediaChange */
30+
clone(): MediaChange {
2431
return new MediaChange(this.matches, this.mediaQuery, this.mqAlias, this.suffix);
2532
}
2633
}

0 commit comments

Comments
 (0)