fix(forms): Update types for TypeScript nullability support

This reverts commit 6d930d2fc5.
This commit is contained in:
Miško Hevery
2017-04-17 11:13:30 -07:00
committed by Tobias Bosch
parent bc431888f3
commit 57bc245cb4
27 changed files with 343 additions and 330 deletions

View File

@ -45,7 +45,7 @@ export class RangeValueAccessor implements ControlValueAccessor {
this._renderer.setElementProperty(this._elementRef.nativeElement, 'value', parseFloat(value));
}
registerOnChange(fn: (_: number) => void): void {
registerOnChange(fn: (_: number|null) => void): void {
this.onChange = (value) => { fn(value == '' ? null : parseFloat(value)); };
}