Added documentation for connect file
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user