change to getter

FrozenArcher 2024-03-12 15:11:40 +08:00
parent 55c286ac4b
commit e7acb1b55f
1 changed files with 3 additions and 3 deletions

View File

@ -47,7 +47,7 @@ export class ServiceState {
* Check if state is `loading`.
* @returns in `loading` state or not.
*/
isLoading(): boolean {
get loading(): boolean {
return this.state == 'loading';
}
@ -55,7 +55,7 @@ export class ServiceState {
* Check if state is `success`.
* @returns in `success state or not.
*/
isSuccess(): boolean {
get success(): boolean {
return this.state == 'success';
}
@ -63,7 +63,7 @@ export class ServiceState {
* Check if state is `failed`.
* @returns in `failed` state or not.
*/
isFailed(): boolean {
get failed(): boolean {
return this.state == 'failed';
}
}