docs: add JSDoc headers to all externally exported store functions
This commit is contained in:
@@ -1,5 +1,15 @@
|
||||
import { SCHEMA_SCRIPTS } from '../schema.js';
|
||||
|
||||
/**
|
||||
* Initializes the database schema by running all schema scripts.
|
||||
*
|
||||
* @param {object} pool - The mssql connection pool.
|
||||
* @returns {Function} An async function that initializes the schema.
|
||||
*
|
||||
* @example
|
||||
* const fn = initialize(pool);
|
||||
* await fn();
|
||||
*/
|
||||
export default function initialize(pool) {
|
||||
return async () => {
|
||||
for (const script of SCHEMA_SCRIPTS) {
|
||||
|
||||
Reference in New Issue
Block a user