Update Types

This commit is contained in:
Benjamin Toby
2025-01-26 07:03:38 +01:00
parent 7188fe6e2c
commit 94d15ecb30
12 changed files with 84 additions and 51 deletions
+12 -7
View File
@@ -1,10 +1,11 @@
import { DbContextsArray } from "../../backend/db/runQuery";
import { ServerQueryParam } from "../../../types";
type Param = {
query: string | {
query: ServerQueryParam;
table: string;
};
import { ApiGetQueryObject } from "../../../types";
type Param<T extends {
[key: string]: any;
} = {
[key: string]: any;
}> = {
query: string | ApiGetQueryObject<T>;
queryValues?: (string | number)[];
dbFullName: string;
tableName?: string;
@@ -15,5 +16,9 @@ type Param = {
/**
* # Get Function FOr API
*/
export default function apiGet({ query, dbFullName, queryValues, tableName, dbSchema, debug, dbContext, }: Param): Promise<import("../../../types").GetReturn>;
export default function apiGet<T extends {
[key: string]: any;
} = {
[key: string]: any;
}>({ query, dbFullName, queryValues, tableName, dbSchema, debug, dbContext, }: Param<T>): Promise<import("../../../types").GetReturn>;
export {};