cleanup(forms): marks abstract classes as abstract

This commit is contained in:
vsavkin 2015-10-28 16:56:14 -07:00 committed by Victor Savkin
parent 547e011abe
commit 534db7fe2b
2 changed files with 5 additions and 4 deletions

View File

@ -1,8 +1,9 @@
import {AbstractControl} from '../model';
import {isPresent} from 'angular2/src/core/facade/lang';
import {unimplemented} from 'angular2/src/core/facade/exceptions';
export class AbstractControlDirective {
get control(): AbstractControl { return null; }
export abstract class AbstractControlDirective {
get control(): AbstractControl { return unimplemented(); }
get value(): any { return isPresent(this.control) ? this.control.value : null; }

View File

@ -10,11 +10,11 @@ import {unimplemented} from 'angular2/src/core/facade/exceptions';
// an abstract method in the public API, and we cannot reflect
// on that in Dart due to https://github.com/dart-lang/sdk/issues/18721
// Also we don't have abstract setters, see https://github.com/Microsoft/TypeScript/issues/4669
export class NgControl extends AbstractControlDirective {
export abstract class NgControl extends AbstractControlDirective {
name: string = null;
valueAccessor: ControlValueAccessor = null;
get validator(): Function { return unimplemented(); }
viewToModelUpdate(newValue: any): void { return unimplemented(); }
abstract viewToModelUpdate(newValue: any): void;
}