Refactor types

This commit is contained in:
Benjamin Toby
2024-10-14 07:49:01 +01:00
parent 11a4c1f4d9
commit d84b15c35c
46 changed files with 696 additions and 376 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ const https = require("https");
/**
* @typedef {Object} GetSchemaReturn
* @property {boolean} success - Did the function run successfully?
* @property {import("../types/database-schema.td").DSQL_DatabaseSchemaType[] | import("../types/database-schema.td").DSQL_DatabaseSchemaType | null} payload - Response payload
* @property {import("@/package-shared/types/database-schema.td").DSQL_DatabaseSchemaType[] | import("@/package-shared/types/database-schema.td").DSQL_DatabaseSchemaType | null} payload - Response payload
*/
/**
+1 -1
View File
@@ -66,7 +66,7 @@ async function get({ key, db, query, queryValues, tableName }) {
DSQL_PASS?.match(/./) &&
DSQL_DB_NAME?.match(/./)
) {
/** @type {import("../types/database-schema.td").DSQL_DatabaseSchemaType | undefined} */
/** @type {import("@/package-shared/types/database-schema.td").DSQL_DatabaseSchemaType | undefined} */
let dbSchema;
try {
+1 -1
View File
@@ -78,7 +78,7 @@ async function post({ key, query, queryValues, database, tableName }) {
DSQL_PASS?.match(/./) &&
DSQL_DB_NAME?.match(/./)
) {
/** @type {import("../types/database-schema.td").DSQL_DatabaseSchemaType | undefined} */
/** @type {import("@/package-shared/types/database-schema.td").DSQL_DatabaseSchemaType | undefined} */
let dbSchema;
try {