Skip to content

Commit f079305

Browse files
committed
Use real View types in value accessors.
1 parent 9827856 commit f079305

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

src/nativescript-angular/value-accessors/date-value-accessor.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ const DATE_VALUE_ACCESSOR = provide(NG_VALUE_ACCESSOR, { useExisting: forwardRef
2020
host: { '(dateChange)': 'onChange($event.value)' },
2121
bindings: [DATE_VALUE_ACCESSOR]
2222
})
23-
export class DateValueAccessor extends BaseValueAccessor<any> {
24-
//TODO: change <any> above to DatePicker
23+
export class DateValueAccessor extends BaseValueAccessor<DatePicker> {
2524
onTouched = () => { };
2625

2726
constructor(elementRef: ElementRef) {

src/nativescript-angular/value-accessors/selectedIndex-value-accessor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {View} from "ui/core/view";
66

77
const SELECTED_INDEX_VALUE_ACCESSOR = provide(NG_VALUE_ACCESSOR, { useExisting: forwardRef(() => SelectedIndexValueAccessor), multi: true });
88

9-
type SelectableView = {selectedIndex: number} & View;
9+
export type SelectableView = {selectedIndex: number} & View;
1010

1111
/**
1212
* The accessor for setting a selectedIndex and listening to changes that is used by the

src/nativescript-angular/value-accessors/text-value-accessor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {View} from "ui/core/view";
66

77
const TEXT_VALUE_ACCESSOR = provide(NG_VALUE_ACCESSOR, { useExisting: forwardRef(() => TextValueAccessor), multi: true });
88

9-
type TextView = {text: string} & View;
9+
export type TextView = {text: string} & View;
1010

1111
/**
1212
* The accessor for writing a text and listening to changes that is used by the

src/nativescript-angular/value-accessors/time-value-accessor.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ const TIME_VALUE_ACCESSOR = provide(NG_VALUE_ACCESSOR, { useExisting: forwardRef
2020
host: { '(timeChange)': 'onChange($event.value)' },
2121
bindings: [TIME_VALUE_ACCESSOR]
2222
})
23-
export class TimeValueAccessor extends BaseValueAccessor<any> {
24-
//TODO: change <any> above to TimePicker
23+
export class TimeValueAccessor extends BaseValueAccessor<TimePicker> {
2524
onTouched = () => { };
2625

2726
constructor(elementRef: ElementRef) {

0 commit comments

Comments
 (0)