[fabric/core] Overload AsyncResult.ok method to support optional value parameter
This commit is contained in:
parent
623e67afeb
commit
b77ba6dc83
@ -35,7 +35,9 @@ export class AsyncResult<
|
||||
);
|
||||
}
|
||||
|
||||
static ok<T>(value: T): AsyncResult<T, never> {
|
||||
static ok(): AsyncResult<void, never>;
|
||||
static ok<T>(value: T): AsyncResult<T, never>;
|
||||
static ok(value?: any) {
|
||||
return new AsyncResult(Promise.resolve(Result.ok(value)));
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user