added slide component, twwek some pages, and enchanced docs

This commit is contained in:
2024-10-23 16:14:34 +09:00
parent e99db9f8bd
commit 8247b05192
72 changed files with 985 additions and 300 deletions

View File

@@ -17,6 +17,13 @@ type asyncDatabaseVoidCallbackFunction = () => any;
* @param {string} sqlQuery SQL query to execute
* @param {asyncDatabaseRowsCallbackFunction} callback callback to perform further operations on each row
* @returns {Promise<Type>} Promise for database operation
* @example
* interface Person {
* name: string;
* age: number;
* birthday: string;
* }
* let allRows = await asyncDatabaseRead<Array<Person>>(db, "SELECT * FROM people;", (rows) => { return rows; });
*/
const asyncDatabaseRead = async <Type>(
database: sqlite3.Database,
@@ -41,6 +48,8 @@ const asyncDatabaseRead = async <Type>(
* @param {string} sqlQuery SQL query to execute
* @param {asyncDatabaseVoidCallbackFunction} callback callback to perform after the operation
* @returns {Promise<Type>} Promise for database operation
* @example
* await asyncDatabaseWrite(db, "INSERT INTO people (name, age, birthday) VALUES ('Ben', 21, '1970-1-1');", () => {});
*/
const asyncDatabaseWrite = async <Type>(
database: sqlite3.Database,