isolated constructor functions for entities and relations from config

This commit is contained in:
dswbx
2024-12-19 08:16:47 +01:00
parent 1d1ebff64d
commit d7ee13011f
6 changed files with 53 additions and 51 deletions

View File

@@ -10,7 +10,7 @@ type OmitFirstArg<F> = F extends (x: any, ...args: infer P) => any
* the first argument "entity" for convenience
* @param entity
*/
export const useData = <T extends keyof DataApi>(entity: string) => {
export const useData = <T extends keyof DataApi<DB>>(entity: string) => {
const api = useApi().data;
const methods = [
"readOne",