@@ -36,15 +36,15 @@ export class AsyncComputedSignalImpl<T>
3636 implements BackRef
3737{
3838 $untrackedLoading$ : boolean = false ;
39- $untrackedError$ : Error | null = null ;
39+ $untrackedError$ : Error | undefined = undefined ;
4040
41- $loadingEffects$ : null | Set < EffectSubscription > = null ;
42- $errorEffects$ : null | Set < EffectSubscription > = null ;
41+ $loadingEffects$ : undefined | Set < EffectSubscription > = undefined ;
42+ $errorEffects$ : undefined | Set < EffectSubscription > = undefined ;
4343 $destroy$ : NoSerialize < ( ) => void > | null ;
4444 $promiseValue$ : T | typeof NEEDS_COMPUTATION = NEEDS_COMPUTATION ;
4545 private $promise$ : Promise < T > | null = null ;
4646
47- [ _EFFECT_BACK_REF ] : Map < EffectProperty | string , EffectSubscription > | null = null ;
47+ [ _EFFECT_BACK_REF ] : Map < EffectProperty | string , EffectSubscription > | undefined = undefined ;
4848
4949 constructor (
5050 container : Container | null ,
@@ -71,7 +71,7 @@ export class AsyncComputedSignalImpl<T>
7171 this . $untrackedLoading$ = value ;
7272 this . $container$ ?. $scheduler$ (
7373 ChoreType . RECOMPUTE_AND_SCHEDULE_EFFECTS ,
74- null ,
74+ undefined ,
7575 this ,
7676 this . $loadingEffects$
7777 ) ;
@@ -83,20 +83,20 @@ export class AsyncComputedSignalImpl<T>
8383 }
8484
8585 /** The error that occurred when the signal was resolved. */
86- get error ( ) : Error | null {
86+ get error ( ) : Error | undefined {
8787 return setupSignalValueAccess (
8888 this ,
8989 ( ) => ( this . $errorEffects$ ||= new Set ( ) ) ,
9090 ( ) => this . untrackedError
9191 ) ;
9292 }
9393
94- set untrackedError ( value : Error | null ) {
94+ set untrackedError ( value : Error | undefined ) {
9595 if ( value !== this . $untrackedError$ ) {
9696 this . $untrackedError$ = value ;
9797 this . $container$ ?. $scheduler$ (
9898 ChoreType . RECOMPUTE_AND_SCHEDULE_EFFECTS ,
99- null ,
99+ undefined ,
100100 this ,
101101 this . $errorEffects$
102102 ) ;
@@ -136,7 +136,7 @@ export class AsyncComputedSignalImpl<T>
136136 if ( isPromise ( untrackedValue ) ) {
137137 const isFirstComputation = this . $promiseValue$ === NEEDS_COMPUTATION ;
138138 this . untrackedLoading = true ;
139- this . untrackedError = null ;
139+ this . untrackedError = undefined ;
140140
141141 if ( this . $promiseValue$ !== NEEDS_COMPUTATION ) {
142142 // skip cleanup after resuming
@@ -148,7 +148,7 @@ export class AsyncComputedSignalImpl<T>
148148 DEBUG && log ( 'Promise resolved' , promiseValue ) ;
149149 this . $promiseValue$ = promiseValue ;
150150 this . untrackedLoading = false ;
151- this . untrackedError = null ;
151+ this . untrackedError = undefined ;
152152 if ( this . setValue ( promiseValue ) ) {
153153 DEBUG && log ( 'Scheduling effects for subscribers' , this . $effects$ ?. size ) ;
154154 scheduleEffects ( this . $container$ , this , this . $effects$ ) ;
0 commit comments