@@ -20,11 +20,12 @@ forceFrameRate(60);
20
20
const immediateStrategy : RxStrategyCredentials = {
21
21
name : 'immediate' ,
22
22
work : ( cdRef ) => cdRef . detectChanges ( ) ,
23
- behavior : ( work : any , scope : any , ngZone : NgZone ) => {
23
+ behavior : ( { work , scope, ngZone } ) => {
24
24
return ( o$ ) =>
25
25
o$ . pipe (
26
26
scheduleOnQueue ( work , {
27
- ngZone, priority : PriorityLevel . ImmediatePriority ,
27
+ ngZone,
28
+ priority : PriorityLevel . ImmediatePriority ,
28
29
scope,
29
30
} )
30
31
) ;
@@ -34,11 +35,12 @@ const immediateStrategy: RxStrategyCredentials = {
34
35
const userBlockingStrategy : RxStrategyCredentials = {
35
36
name : 'userBlocking' ,
36
37
work : ( cdRef ) => cdRef . detectChanges ( ) ,
37
- behavior : ( work : any , scope : any , ngZone : NgZone ) => {
38
+ behavior : ( { work , scope, ngZone } ) => {
38
39
return ( o$ ) =>
39
40
o$ . pipe (
40
41
scheduleOnQueue ( work , {
41
- ngZone, priority : PriorityLevel . UserBlockingPriority ,
42
+ ngZone,
43
+ priority : PriorityLevel . UserBlockingPriority ,
42
44
scope,
43
45
} )
44
46
) ;
@@ -48,32 +50,44 @@ const userBlockingStrategy: RxStrategyCredentials = {
48
50
const normalStrategy : RxStrategyCredentials = {
49
51
name : 'normal' ,
50
52
work : ( cdRef ) => cdRef . detectChanges ( ) ,
51
- behavior : ( work : any , scope : any , ngZone : NgZone ) => {
53
+ behavior : ( { work , scope, ngZone } ) => {
52
54
return ( o$ ) =>
53
55
o$ . pipe (
54
- scheduleOnQueue ( work , { ngZone, priority : PriorityLevel . NormalPriority , scope } )
56
+ scheduleOnQueue ( work , {
57
+ ngZone,
58
+ priority : PriorityLevel . NormalPriority ,
59
+ scope,
60
+ } )
55
61
) ;
56
62
} ,
57
63
} ;
58
64
59
65
const lowStrategy : RxStrategyCredentials = {
60
66
name : 'low' ,
61
67
work : ( cdRef ) => cdRef . detectChanges ( ) ,
62
- behavior : ( work : any , scope : any , ngZone : NgZone ) => {
68
+ behavior : ( { work , scope, ngZone } ) => {
63
69
return ( o$ ) =>
64
70
o$ . pipe (
65
- scheduleOnQueue ( work , { ngZone, priority : PriorityLevel . LowPriority , scope } )
71
+ scheduleOnQueue ( work , {
72
+ ngZone,
73
+ priority : PriorityLevel . LowPriority ,
74
+ scope,
75
+ } )
66
76
) ;
67
77
} ,
68
78
} ;
69
79
70
80
const idleStrategy : RxStrategyCredentials = {
71
81
name : 'idle' ,
72
82
work : ( cdRef ) => cdRef . detectChanges ( ) ,
73
- behavior : ( work : any , scope : any , ngZone : NgZone ) => {
83
+ behavior : ( { work , scope, ngZone } ) => {
74
84
return ( o$ ) =>
75
85
o$ . pipe (
76
- scheduleOnQueue ( work , { ngZone, priority : PriorityLevel . IdlePriority , scope } )
86
+ scheduleOnQueue ( work , {
87
+ ngZone,
88
+ priority : PriorityLevel . IdlePriority ,
89
+ scope,
90
+ } )
77
91
) ;
78
92
} ,
79
93
} ;
@@ -84,7 +98,7 @@ function scheduleOnQueue<T>(
84
98
priority : PriorityLevel ;
85
99
scope : Record < string , unknown > ;
86
100
delay ?: number ;
87
- ngZone : NgZone
101
+ ngZone : NgZone ;
88
102
}
89
103
) : MonoTypeOperatorFunction < T > {
90
104
return ( o$ : Observable < T > ) : Observable < T > =>
0 commit comments