fix: run prettier on all file to avoid prettier issue inside PR

This commit is contained in:
thomas
2024-01-07 21:41:36 +01:00
parent 3bc793f6b3
commit c8b7c5d4a6
195 changed files with 575 additions and 452 deletions

View File

@@ -29,7 +29,7 @@ export class CallStateComponentStore<
| (U & CallStateComponentState)
| CallStateComponentState = U extends void
? CallStateComponentState
: U & CallStateComponentState
: U & CallStateComponentState,
> extends ComponentStore<T> {
private error = inject(ERROR_TOKEN);
private flickerTime = inject(FLICKER_TIME);
@@ -39,23 +39,23 @@ export class CallStateComponentStore<
}
readonly isLoading$: Observable<boolean> = this.select(
(state) => state.callState === 'LOADING'
(state) => state.callState === 'LOADING',
);
readonly isLoadingWithFlicker$: Observable<boolean> = this.select(
(state) => state.callState === 'LOADING'
(state) => state.callState === 'LOADING',
).pipe(
switchMap((loading) => nonFlickerLoader(of(loading), this.flickerTime))
switchMap((loading) => nonFlickerLoader(of(loading), this.flickerTime)),
);
readonly isLoaded$: Observable<boolean> = this.select(
(state) => state.callState === 'LOADED'
(state) => state.callState === 'LOADED',
).pipe(switchMap((loaded) => of(loaded)));
readonly callState$ = this.select((state) => state.callState);
readonly error$: Observable<string | undefined> = this.select((state) =>
this.error.getErrorMessage(getErrorCallState(state.callState))
this.error.getErrorMessage(getErrorCallState(state.callState)),
);
readonly updateCallState = this.updater(
@@ -64,7 +64,7 @@ export class CallStateComponentStore<
...(state as object),
callState: callState ?? 'LOADED',
} as T;
}
},
);
readonly startLoading = this.updater(
@@ -74,7 +74,7 @@ export class CallStateComponentStore<
...patchedState,
callState: 'LOADING',
} as T;
}
},
);
readonly stopLoading = this.updater(
@@ -84,12 +84,12 @@ export class CallStateComponentStore<
...patchedState,
callState: 'LOADED',
} as T;
}
},
);
protected handleError(
error: unknown,
patchedState: Partial<U> = {}
patchedState: Partial<U> = {},
): CallStateError {
const err = this.error.toError(error);
this.patchState({