change to getter
This commit is contained in:
@@ -47,7 +47,7 @@ export class ServiceState {
|
|||||||
* Check if state is `loading`.
|
* Check if state is `loading`.
|
||||||
* @returns in `loading` state or not.
|
* @returns in `loading` state or not.
|
||||||
*/
|
*/
|
||||||
isLoading(): boolean {
|
get loading(): boolean {
|
||||||
return this.state == 'loading';
|
return this.state == 'loading';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ export class ServiceState {
|
|||||||
* Check if state is `success`.
|
* Check if state is `success`.
|
||||||
* @returns in `success state or not.
|
* @returns in `success state or not.
|
||||||
*/
|
*/
|
||||||
isSuccess(): boolean {
|
get success(): boolean {
|
||||||
return this.state == 'success';
|
return this.state == 'success';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ export class ServiceState {
|
|||||||
* Check if state is `failed`.
|
* Check if state is `failed`.
|
||||||
* @returns in `failed` state or not.
|
* @returns in `failed` state or not.
|
||||||
*/
|
*/
|
||||||
isFailed(): boolean {
|
get failed(): boolean {
|
||||||
return this.state == 'failed';
|
return this.state == 'failed';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user