feat(web): options to disable machine
This commit is contained in:
@@ -7,6 +7,6 @@ export async function wrapServerPromise<T>(result: Promise<T>) {
|
||||
}
|
||||
export function withServerPromise<T extends (...args: any[]) => Promise<any>>(
|
||||
fn: T
|
||||
): (...args: Parameters<T>) => Promise<ReturnType<T> | { error: string; }> {
|
||||
): (...args: Parameters<T>) => Promise<ReturnType<T> | { error: string }> {
|
||||
return (...args: Parameters<T>) => wrapServerPromise(fn(...args));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user