mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-21 04:53:58 +08:00
chore(tslint): fix noImplicitAny errors
This commit is contained in:
@ -94,8 +94,8 @@ export class SegmentButton {
|
||||
* @private
|
||||
* On click of a SegmentButton
|
||||
*/
|
||||
@HostListener('click', ['$event'])
|
||||
private onClick(ev) {
|
||||
@HostListener('click')
|
||||
private onClick() {
|
||||
console.debug('SegmentButton, select', this.value);
|
||||
this.ionSelect.emit(this);
|
||||
}
|
||||
@ -112,7 +112,7 @@ export class SegmentButton {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
set isActive(isActive) {
|
||||
set isActive(isActive: any) {
|
||||
this._renderer.setElementClass(this._elementRef.nativeElement, 'segment-activated', isActive);
|
||||
this._renderer.setElementAttribute(this._elementRef.nativeElement, 'aria-pressed', isActive);
|
||||
}
|
||||
@ -215,7 +215,7 @@ export class Segment {
|
||||
* @private
|
||||
* Write a new value to the element.
|
||||
*/
|
||||
writeValue(value) {
|
||||
writeValue(value: any) {
|
||||
this.value = isPresent(value) ? value : '';
|
||||
if (this._buttons) {
|
||||
let buttons = this._buttons.toArray();
|
||||
@ -231,7 +231,7 @@ export class Segment {
|
||||
ngAfterViewInit() {
|
||||
let buttons = this._buttons.toArray();
|
||||
for (let button of buttons) {
|
||||
button.ionSelect.subscribe((selectedButton) => {
|
||||
button.ionSelect.subscribe((selectedButton: any) => {
|
||||
this.writeValue(selectedButton.value);
|
||||
this.onChange(selectedButton.value);
|
||||
this.ionChange.emit(selectedButton);
|
||||
@ -251,22 +251,22 @@ export class Segment {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
onChange = (_) => {};
|
||||
onChange = (_: any) => {};
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
onTouched = (_) => {};
|
||||
onTouched = (_: any) => {};
|
||||
|
||||
/**
|
||||
* @private
|
||||
* Set the function to be called when the control receives a change event.
|
||||
*/
|
||||
registerOnChange(fn) { this.onChange = fn; }
|
||||
registerOnChange(fn: any) { this.onChange = fn; }
|
||||
|
||||
/**
|
||||
* @private
|
||||
* Set the function to be called when the control receives a touch event.
|
||||
*/
|
||||
registerOnTouched(fn) { this.onTouched = fn; }
|
||||
registerOnTouched(fn: any) { this.onTouched = fn; }
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user