Get Resolvable Sync
This commit is contained in:
@@ -40,6 +40,14 @@ class FetchOnce<T, U extends Array<unknown>> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public getDataOrUndefined(): T|undefined {
|
||||||
|
return this.data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public getErrorOrUndefined(): unknown|undefined {
|
||||||
|
return this.error;
|
||||||
|
}
|
||||||
|
|
||||||
protected isFinished(): boolean {
|
protected isFinished(): boolean {
|
||||||
return this.state === ResolvableState.DONE || this.state === ResolvableState.ERROR;
|
return this.state === ResolvableState.DONE || this.state === ResolvableState.ERROR;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user