fix: wrap ModuleImplementations so that all methods are async (#9012)

This commit is contained in:
Alexander Nortung authored and GitHub committed 2024-09-06 12:59:52 +02:00
1 parent 72f7ff882d
commit 20545b194e
2 files changed
+8 -1

No files matched your search

+6
View File
@@ -312,3 +312,9 @@ export type QueryConfig<TEntity extends BaseEntity> = {
defaultLimit?: number
isList?: boolean
}
export type TransformObjectMethodToAsync<T extends object> = {
[K in keyof T]: T[K] extends (...args: infer A) => infer R
? (...args: A) => Promise<Awaited<R>>
: T[K] extends object ? TransformObjectMethodToAsync<T[K]> : T[K];
}