Fix user store tests

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2022-12-06 09:18:59 -05:00
1 parent c4a8604b25
commit 59657fcea4
2 files changed
+12 -9

No files matched your search

+1 -1
View File
@@ -150,7 +150,7 @@ export function hasDefiniteField<Field extends keyof T, T>(field: Field): (val:
return (val): val is T & { [f in Field]-?: NonNullable<T[Field]> } => val[field] != null;
}
export function isPromiseLike(res: unknown): res is (Promise<unknown> | { then: () => unknown }) {
export function isPromiseLike(res: unknown): res is (Promise<unknown> | { then: (fn: (val: unknown) => any) => Promise<unknown> }) {
if (res instanceof Promise) {
return true;
}