Skip to content

Commit efd1be2

Browse files
jelbournhansl
authored andcommittedMay 27, 2016
fix: remove @internal where it would make tsc fail (#538)
1 parent fd02b10 commit efd1be2

File tree

13 files changed

+61
-50
lines changed

13 files changed

+61
-50
lines changed
 

‎src/components/checkbox/checkbox.ts

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
import {
2-
ChangeDetectionStrategy,
3-
Component,
4-
ElementRef,
5-
EventEmitter,
6-
Input,
7-
Output,
8-
Provider,
9-
Renderer,
10-
ViewEncapsulation,
11-
forwardRef,
2+
ChangeDetectionStrategy,
3+
Component,
4+
ElementRef,
5+
EventEmitter,
6+
Input,
7+
Output,
8+
Provider,
9+
Renderer,
10+
ViewEncapsulation,
11+
forwardRef,
12+
AfterContentInit
1213
} from '@angular/core';
13-
import {
14-
NG_VALUE_ACCESSOR,
15-
ControlValueAccessor,
16-
} from '@angular/common';
14+
import {NG_VALUE_ACCESSOR, ControlValueAccessor} from '@angular/common';
1715

1816
/**
1917
* Monotonically increasing integer used to auto-generate unique ids for checkbox components.
@@ -68,7 +66,7 @@ enum TransitionCheckState {
6866
encapsulation: ViewEncapsulation.None,
6967
changeDetection: ChangeDetectionStrategy.OnPush
7068
})
71-
export class MdCheckbox implements ControlValueAccessor {
69+
export class MdCheckbox implements AfterContentInit, ControlValueAccessor {
7270
/**
7371
* Attached to the aria-label attribute of the host element. In most cases, arial-labelledby will
7472
* take precedence so this may be omitted.
@@ -151,6 +149,7 @@ export class MdCheckbox implements ControlValueAccessor {
151149
}
152150
}
153151

152+
/** TODO: internal */
154153
ngAfterContentInit() {
155154
this._isInitialized = true;
156155
}
@@ -178,20 +177,29 @@ export class MdCheckbox implements ControlValueAccessor {
178177
}
179178
}
180179

181-
/** Implemented as part of ControlValueAccessor. */
180+
/**
181+
* Implemented as part of ControlValueAccessor.
182+
* TODO: internal
183+
*/
182184
writeValue(value: any) {
183185
this.checked = !!value;
184186
}
185187

186-
/** Implemented as part of ControlValueAccessor. */
188+
/**
189+
* Implemented as part of ControlValueAccessor.
190+
* TODO: internal
191+
*/
187192
registerOnChange(fn: any) {
188193
if (this._changeSubscription) {
189194
this._changeSubscription.unsubscribe();
190195
}
191196
this._changeSubscription = <{unsubscribe: () => any}>this.change.subscribe(fn);
192197
}
193198

194-
/** Implemented as part of ControlValueAccessor. */
199+
/**
200+
* Implemented as part of ControlValueAccessor.
201+
* TODO: internal
202+
*/
195203
registerOnTouched(fn: any) {
196204
this.onTouched = fn;
197205
}

‎src/components/grid-list/grid-list.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export class MdGridList implements OnInit, AfterContentChecked {
8585
this._setTileStyler();
8686
}
8787

88-
/** @internal */
88+
/** TODO: internal */
8989
ngOnInit() {
9090
this._checkCols();
9191
this._checkRowHeight();
@@ -94,7 +94,7 @@ export class MdGridList implements OnInit, AfterContentChecked {
9494
/**
9595
* The layout calculation is fairly cheap if nothing changes, so there's little cost
9696
* to run it frequently.
97-
* @internal
97+
* TODO: internal
9898
*/
9999
ngAfterContentChecked() {
100100
this._layoutTiles();

‎src/components/icon/icon.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export class MdIcon implements OnChanges, OnInit, AfterViewChecked {
112112
}
113113
}
114114

115-
/** @internal */
115+
/** TODO: internal */
116116
ngOnChanges(changes: { [propertyName: string]: SimpleChange }) {
117117
const changedInputs = Object.keys(changes);
118118
// Only update the inline SVG icon if the inputs changed, to avoid unnecessary DOM operations.
@@ -134,7 +134,7 @@ export class MdIcon implements OnChanges, OnInit, AfterViewChecked {
134134
this._updateAriaLabel();
135135
}
136136

137-
/** @internal */
137+
/** TODO: internal */
138138
ngOnInit() {
139139
// Update font classes because ngOnChanges won't be called if none of the inputs are present,
140140
// e.g. <md-icon>arrow</md-icon>. In this case we need to add a CSS class for the default font.
@@ -143,7 +143,7 @@ export class MdIcon implements OnChanges, OnInit, AfterViewChecked {
143143
}
144144
}
145145

146-
/** @internal */
146+
/** TODO: internal */
147147
ngAfterViewChecked() {
148148
// Update aria label here because it may depend on the projected text content.
149149
// (e.g. <md-icon>home</md-icon> should use 'home').

‎src/components/input/input.ts

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -216,22 +216,31 @@ export class MdInput implements ControlValueAccessor, AfterContentInit, OnChange
216216
return !!this.placeholder || this._placeholderChild != null;
217217
}
218218

219-
/** Implemented as part of ControlValueAccessor. */
219+
/**
220+
* Implemented as part of ControlValueAccessor.
221+
* TODO: internal
222+
*/
220223
writeValue(value: any) {
221224
this._value = value;
222225
}
223226

224-
/** Implemented as part of ControlValueAccessor. */
227+
/**
228+
* Implemented as part of ControlValueAccessor.
229+
* TODO: internal
230+
*/
225231
registerOnChange(fn: any) {
226232
this._onChangeCallback = fn;
227233
}
228234

229-
/** Implemented as part of ControlValueAccessor. */
235+
/**
236+
* Implemented as part of ControlValueAccessor.
237+
* TODO: internal
238+
*/
230239
registerOnTouched(fn: any) {
231240
this._onTouchedCallback = fn;
232241
}
233242

234-
/** @internal */
243+
/** TODO: internal */
235244
ngAfterContentInit() {
236245
this._validateConstraints();
237246

@@ -241,7 +250,7 @@ export class MdInput implements ControlValueAccessor, AfterContentInit, OnChange
241250
});
242251
}
243252

244-
/** @internal */
253+
/** TODO: internal */
245254
ngOnChanges(changes: {[key: string]: SimpleChange}) {
246255
this._validateConstraints();
247256
}

‎src/components/list/list.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export class MdListItem implements AfterContentInit {
4747
/** @internal */
4848
hasFocus: boolean = false;
4949

50-
/** @internal */
50+
/** TODO: internal */
5151
ngAfterContentInit() {
5252
this._setLineClass(this._lines.length);
5353

‎src/components/radio/radio.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export class MdRadioGroup implements AfterContentInit, ControlValueAccessor {
150150
/**
151151
* Initialize properties once content children are available.
152152
* This allows us to propagate relevant attributes to associated buttons.
153-
* @internal
153+
* TODO: internal
154154
*/
155155
ngAfterContentInit() {
156156
// Mark this component as initialized in AfterContentInit because the initial value can
@@ -204,23 +204,23 @@ export class MdRadioGroup implements AfterContentInit, ControlValueAccessor {
204204

205205
/**
206206
* Implemented as part of ControlValueAccessor.
207-
* @internal
207+
* TODO: internal
208208
*/
209209
writeValue(value: any) {
210210
this.value = value;
211211
}
212212

213213
/**
214214
* Implemented as part of ControlValueAccessor.
215-
* @internal
215+
* TODO: internal
216216
*/
217217
registerOnChange(fn: (value: any) => void) {
218218
this._controlValueAccessorChangeFn = fn;
219219
}
220220

221221
/**
222222
* Implemented as part of ControlValueAccessor.
223-
* @internal
223+
* TODO: internal
224224
*/
225225
registerOnTouched(fn: any) {
226226
this.onTouched = fn;
@@ -333,7 +333,7 @@ export class MdRadioButton implements OnInit {
333333
this._disabled = (value != null && value !== false) ? true : null;
334334
}
335335

336-
/** @internal */
336+
/** TODO: internal */
337337
ngOnInit() {
338338
if (this.radioGroup) {
339339
// If the radio is inside a radio group, determine if it should be checked

‎src/components/sidenav/sidenav.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ export class MdSidenavLayout implements AfterContentInit {
266266
}
267267
}
268268

269-
/** @internal */
269+
/** TODO: internal */
270270
ngAfterContentInit() {
271271
// On changes, assert on consistency.
272272
this._sidenavs.changes.subscribe(() => this._validateDrawers());

‎src/components/slide-toggle/slide-toggle.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,23 +108,23 @@ export class MdSlideToggle implements ControlValueAccessor {
108108

109109
/**
110110
* Implemented as part of ControlValueAccessor.
111-
* @internal
111+
* TODO: internal
112112
*/
113113
writeValue(value: any): void {
114114
this.checked = value;
115115
}
116116

117117
/**
118118
* Implemented as part of ControlValueAccessor.
119-
* @internal
119+
* TODO: internal
120120
*/
121121
registerOnChange(fn: any): void {
122122
this.onChange = fn;
123123
}
124124

125125
/**
126126
* Implemented as part of ControlValueAccessor.
127-
* @internal
127+
* TODO: internal
128128
*/
129129
registerOnTouched(fn: any): void {
130130
this.onTouched = fn;

‎src/components/tabs/tabs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export class MdTabGroup {
4444
/**
4545
* Waits one frame for the view to update, then upates the ink bar
4646
* Note: This must be run outside of the zone or it will create an infinite change detection loop
47-
* @internal
47+
* TODO: internal
4848
*/
4949
ngAfterViewChecked(): void {
5050
this._zone.runOutsideAngular(() => {

‎src/core/overlay/overlay-directives.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ export class ConnectedOverlayDirective implements OnInit, OnDestroy {
5050
return this._overlayRef;
5151
}
5252

53-
/** @internal */
53+
/** TODO: internal */
5454
ngOnInit() {
5555
this._createOverlay();
5656
}
5757

58-
/** @internal */
58+
/** TODO: internal */
5959
ngOnDestroy() {
6060
this._destroyOverlay();
6161
}

‎src/core/overlay/position/connected-position-strategy.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export class ConnectedPositionStrategy implements PositionStrategy {
4444
/**
4545
* Updates the position of the overlay element, using whichever preferred position relative
4646
* to the origin fits on-screen.
47-
* @internal
47+
* TODO: internal
4848
*/
4949
apply(element: HTMLElement): Promise<void> {
5050
// We need the bounding rects for the origin and the overlay to determine how to position
@@ -78,12 +78,6 @@ export class ConnectedPositionStrategy implements PositionStrategy {
7878
return Promise.resolve();
7979
}
8080

81-
82-
/** Adds a preferred position to the end of the ordered preferred position list. */
83-
addPreferredPosition(pos: ConnectionPositionPair): void {
84-
this._preferredPositions.push(pos);
85-
}
86-
8781
withFallbackPosition(
8882
originPos: OriginConnectionPosition,
8983
overlayPos: OverlayConnectionPosition): this {

‎src/core/overlay/position/global-position-strategy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export class GlobalPositionStrategy implements PositionStrategy {
8787

8888
/**
8989
* Apply the position to the element.
90-
* @internal
90+
* TODO: internal
9191
*/
9292
apply(element: HTMLElement): Promise<void> {
9393
element.style.position = this._cssPosition;

‎src/core/overlay/position/viewport-ruler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {Injectable} from '@angular/core';
44

55
/**
66
* Simple utility for getting the bounds of the browser viewport.
7-
* @internal
7+
* TODO: internal
88
*/
99
@Injectable()
1010
export class ViewportRuler {

0 commit comments

Comments
 (0)