@@ -34,7 +34,7 @@ import {
3434 ViewChild ,
3535 ViewEncapsulation ,
3636} from '@angular/core' ;
37- import { Observable , of as obaservableOf , Subject } from 'rxjs' ;
37+ import { Observable , of as observableOf , Subject } from 'rxjs' ;
3838import { startWith , takeUntil } from 'rxjs/operators' ;
3939
4040import { CdkStepHeader } from './step-header' ;
@@ -124,7 +124,7 @@ export class CdkStep implements OnChanges {
124124 @ViewChild ( TemplateRef , { static : true } ) content : TemplateRef < any > ;
125125
126126 /** The top level abstract control of the step. */
127- @Input ( ) stepControl : FormControlLike ;
127+ @Input ( ) stepControl : AbstractControlLike ;
128128
129129 /** Whether user has seen the expanded step content or not. */
130130 interacted = false ;
@@ -338,7 +338,7 @@ export class CdkStepper implements AfterViewInit, OnDestroy {
338338 . withWrap ( )
339339 . withVerticalOrientation ( this . _orientation === 'vertical' ) ;
340340
341- ( this . _dir ? ( this . _dir . change as Observable < Direction > ) : obaservableOf < Direction > ( ) )
341+ ( this . _dir ? ( this . _dir . change as Observable < Direction > ) : observableOf < Direction > ( ) )
342342 . pipe ( startWith ( this . _layoutDirection ( ) ) , takeUntil ( this . _destroyed ) )
343343 . subscribe ( direction => this . _keyManager . withHorizontalOrientation ( direction ) ) ;
344344
@@ -517,12 +517,12 @@ export class CdkStepper implements AfterViewInit, OnDestroy {
517517
518518
519519/**
520- * Simplified representation of a FormControl from @angular/forms.
520+ * Simplified representation of an "AbstractControl" from @angular/forms.
521521 * Used to avoid having to bring in @angular/forms for a single optional interface.
522522 * @docs -private
523523 */
524- interface FormControlLike {
525- asyncValidator : ( ) => any | null ;
524+ interface AbstractControlLike {
525+ asyncValidator : ( ( control : any ) => any ) | null ;
526526 dirty : boolean ;
527527 disabled : boolean ;
528528 enabled : boolean ;
@@ -531,21 +531,21 @@ interface FormControlLike {
531531 parent : any ;
532532 pending : boolean ;
533533 pristine : boolean ;
534- root : FormControlLike ;
534+ root : AbstractControlLike ;
535535 status : string ;
536536 statusChanges : Observable < any > ;
537537 touched : boolean ;
538538 untouched : boolean ;
539539 updateOn : any ;
540540 valid : boolean ;
541- validator : ( ) => any | null ;
541+ validator : ( ( control : any ) => any ) | null ;
542542 value : any ;
543543 valueChanges : Observable < any > ;
544544 clearAsyncValidators ( ) : void ;
545545 clearValidators ( ) : void ;
546546 disable ( opts ?: any ) : void ;
547547 enable ( opts ?: any ) : void ;
548- get ( path : ( string | number ) [ ] | string ) : FormControlLike | null ;
548+ get ( path : ( string | number ) [ ] | string ) : AbstractControlLike | null ;
549549 getError ( errorCode : string , path ?: ( string | number ) [ ] | string ) : any ;
550550 hasError ( errorCode : string , path ?: ( string | number ) [ ] | string ) : boolean ;
551551 markAllAsTouched ( ) : void ;
@@ -556,15 +556,15 @@ interface FormControlLike {
556556 markAsUntouched ( opts ?: any ) : void ;
557557 patchValue ( value : any , options ?: Object ) : void ;
558558 reset ( value ?: any , options ?: Object ) : void ;
559- setAsyncValidators ( newValidator : ( ) => any | ( ( ) => any ) [ ] | null ) : void ;
559+ setAsyncValidators ( newValidator : ( control : any ) => any |
560+ ( ( control : any ) => any ) [ ] | null ) : void ;
560561 setErrors ( errors : { [ key : string ] : any } | null , opts ?: any ) : void ;
561562 setParent ( parent : any ) : void ;
562- setValidators ( newValidator : ( ) => any | ( ( ) => any ) [ ] | null ) : void ;
563+ setValidators ( newValidator : ( control : any ) => any |
564+ ( ( control : any ) => any ) [ ] | null ) : void ;
563565 setValue ( value : any , options ?: Object ) : void ;
564566 updateValueAndValidity ( opts ?: any ) : void ;
565567 patchValue ( value : any , options ?: any ) : void ;
566- registerOnChange ( fn : Function ) : void ;
567- registerOnDisabledChange ( fn : ( isDisabled : boolean ) => void ) : void ;
568568 reset ( formState ?: any , options ?: any ) : void ;
569569 setValue ( value : any , options ?: any ) : void ;
570570}
0 commit comments