Added documentation for connect file

This commit is contained in:
Kevin FEDYNA
2025-01-22 14:48:00 +01:00
parent 36c5c9cf39
commit 6456529b7f
+5
View File
@@ -4,6 +4,11 @@ interface DatabaseConnection extends Disposable {
database: Database;
}
/**
* Connect to the given database and attach `students.db`.
* @param database The database name.
* @returns The database connection as disposable.
*/
export default function connect(database: string): DatabaseConnection {
const connection = new Database(`databases/data/${database}.db`, {
create: false,