Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4687442

Browse files
committed
fix(toast): types
1 parent735f5ed commit4687442

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

‎projects/coreui-angular/src/lib/toast/toast/toast.component.ts‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export class ToastComponent implements OnInit, OnDestroy {
6767
* Auto hide the toast.
6868
*@type boolean
6969
*/
70-
@Input()autohide=true;
70+
@Input()autohide:boolean=true;
7171

7272
/**
7373
* Sets the color context of the component to one of CoreUI’s themed colors.
@@ -79,13 +79,13 @@ export class ToastComponent implements OnInit, OnDestroy {
7979
* Delay hiding the toast (ms).
8080
*@type number
8181
*/
82-
@Input()delay=5000;
82+
@Input()delay:number=5000;
8383

8484
/**
8585
* Apply fade transition to the toast.
8686
*@type boolean
8787
*/
88-
@Input()fade=true;
88+
@Input()fade:boolean=true;
8989

9090
/**
9191
* Toggle the visibility of component.
@@ -115,19 +115,19 @@ export class ToastComponent implements OnInit, OnDestroy {
115115

116116
/**
117117
* Event emitted on visibility change. [docs]
118-
*@type boolean
118+
*@typeEventEmitter<boolean>
119119
*/
120-
@Output()visibleChange=newEventEmitter<boolean>();
120+
@Output()visibleChange:EventEmitter<boolean>=newEventEmitter<boolean>();
121121

122122
/**
123123
* Event emitted on timer tick. [docs]
124124
*@type number
125125
*/
126126
@Output()timer:EventEmitter<number>=newEventEmitter();
127127

128-
privatetimerId:any;
129-
privateclockId:any;
130-
privateclockTimerId:any;
128+
privatetimerId:ReturnType<typeofsetTimeout>|undefined;
129+
privateclockId:ReturnType<typeofsetInterval>|undefined;
130+
privateclockTimerId:ReturnType<typeofsetTimeout>|undefined;
131131

132132
private_clock!:number;
133133

@@ -188,15 +188,15 @@ export class ToastComponent implements OnInit, OnDestroy {
188188
setTimer():void{
189189
this.clearTimer();
190190
if(this.autohide&&this.visible){
191-
this.timerId=this.delay>0 ?setTimeout(()=>this.onClose(),this.delay) :null;
191+
this.timerId=this.delay>0 ?setTimeout(()=>this.onClose(),this.delay) :undefined;
192192
this.setClock();
193193
}
194194
}
195195

196196
clearTimer():void{
197197
this.clearClock();
198198
clearTimeout(this.timerId);
199-
this.timerId=null;
199+
this.timerId=undefined;
200200
}
201201

202202
onClose():void{
@@ -223,6 +223,6 @@ export class ToastComponent implements OnInit, OnDestroy {
223223
clearClock():void{
224224
clearTimeout(this.clockTimerId);
225225
clearInterval(this.clockId);
226-
this.clockId=null;
226+
this.clockId=undefined;
227227
}
228228
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp