Skip to content

Commit 8f3a025

Browse files
mmalerbajelbourn
authored andcommitted
docs: add jsdoc to public interfaces (#8568)
1 parent 40d6bcb commit 8f3a025

File tree

16 files changed

+65
-6
lines changed

16 files changed

+65
-6
lines changed

src/cdk/a11y/activedescendant-key-manager.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ import {ListKeyManager, ListKeyManagerOption} from './list-key-manager';
1414
* currently disabled.
1515
*/
1616
export interface Highlightable extends ListKeyManagerOption {
17+
/** Applies the styles for an active item to this item. */
1718
setActiveStyles(): void;
19+
20+
/** Applies the styles for an inactive item to this item. */
1821
setInactiveStyles(): void;
1922
}
2023

src/cdk/a11y/aria-describer.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@ import {addAriaReferencedId, getAriaReferenceIds, removeAriaReferencedId} from '
1212

1313
/**
1414
* Interface used to register message elements and keep a count of how many registrations have
15-
* the same message and the reference to the message element used for the aria-describedby.
15+
* the same message and the reference to the message element used for the `aria-describedby`.
1616
*/
1717
export interface RegisteredMessage {
18+
/** The element containing the message. */
1819
messageElement: Element;
20+
21+
/** The number of elements that reference this message element via `aria-describedby`. */
1922
referenceCount: number;
2023
}
2124

src/cdk/a11y/focus-key-manager.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {ListKeyManager, ListKeyManagerOption} from './list-key-manager';
1414
* and be able to supply it's label.
1515
*/
1616
export interface FocusableOption extends ListKeyManagerOption {
17+
/** Focuses the `FocusableOption`. */
1718
focus(): void;
1819
}
1920

src/cdk/a11y/list-key-manager.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ import {tap} from 'rxjs/operators/tap';
1717

1818
/** This interface is for items that can be passed to a ListKeyManager. */
1919
export interface ListKeyManagerOption {
20+
/** Whether the option is disabled. */
2021
disabled?: boolean;
22+
23+
/** Gets the label for this option. */
2124
getLabel?(): string;
2225
}
2326

src/cdk/collections/collection-viewer.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,9 @@ import {Observable} from 'rxjs/Observable';
1313
* information regarding the view and any changes made.
1414
*/
1515
export interface CollectionViewer {
16+
/**
17+
* A stream that emits whenever the `CollectionViewer` starts looking at a new portion of the
18+
* data. The `start` index is inclusive, while the `end` is exclusive.
19+
*/
1620
viewChange: Observable<{start: number, end: number}>;
1721
}

src/cdk/layout/breakpoints-observer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import {fromEventPattern} from 'rxjs/observable/fromEventPattern';
1818

1919
/** The current state of a layout breakpoint. */
2020
export interface BreakpointState {
21+
/** Whether the breakpoint is currently matching. */
2122
matches: boolean;
2223
}
2324

src/cdk/overlay/scroll/scroll-strategy.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,16 @@
99
import {OverlayRef} from '../overlay-ref';
1010

1111
/**
12-
* Describes a strategy that will be used by an overlay
13-
* to handle scroll events while it is open.
12+
* Describes a strategy that will be used by an overlay to handle scroll events while it is open.
1413
*/
1514
export interface ScrollStrategy {
15+
/** Enable this scroll strategy (called when the attached overlay is attached to a portal). */
1616
enable: () => void;
17+
18+
/** Disable this scroll strategy (called when the attached overlay is detached from a portal). */
1719
disable: () => void;
20+
21+
/** Attaches this `ScrollStrategy` to an overlay. */
1822
attach: (overlayRef: OverlayRef) => void;
1923
}
2024

src/cdk/portal/portal.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,16 +146,18 @@ export class TemplatePortal<C> extends Portal<C> {
146146
}
147147

148148

149-
/**
150-
* A `PortalOutlet` is an space that can contain a single `Portal`.
151-
*/
149+
/** A `PortalOutlet` is an space that can contain a single `Portal`. */
152150
export interface PortalOutlet {
151+
/** Attaches a portal to this outlet. */
153152
attach(portal: Portal<any>): any;
154153

154+
/** Detaches the currently attached portal from this outlet. */
155155
detach(): any;
156156

157+
/** Performs cleanup before the outlet is destroyed. */
157158
dispose(): void;
158159

160+
/** Whether there is currently a portal attached to this outlet. */
159161
hasAttached(): boolean;
160162
}
161163

src/lib/chips/chip-input.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@ import {Directive, ElementRef, EventEmitter, Input, Output} from '@angular/core'
1212
import {MatChipList} from './chip-list';
1313

1414

15+
/** Represents an input event on a `matChipInput`. */
1516
export interface MatChipInputEvent {
17+
/** The native `<input>` element that the event is being fired for. */
1618
input: HTMLInputElement;
19+
20+
/** The value of the input. */
1721
value: string;
1822
}
1923

src/lib/chips/chip.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ import {CanColor, CanDisable, mixinColor, mixinDisabled} from '@angular/material
2222
import {Subject} from 'rxjs/Subject';
2323

2424

25+
/** Represents an event fired on an individual `mat-chip`. */
2526
export interface MatChipEvent {
27+
/** The chip the event was fired on. */
2628
chip: MatChip;
2729
}
2830

0 commit comments

Comments
 (0)