Skip to content

Commit 21621b4

Browse files
PuddySqlInstance --> fix jsDoc of initPostgre
1 parent 276db24 commit 21621b4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/PuddySqlInstance.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ class PuddySqlInstance extends PuddySqlEngine {
420420
* @throws {Error} If the table has already been initialized.
421421
*/
422422
async initTable(settings = {}, tableData = []) {
423-
if (typeof settings !== 'object' || settings === null || Array.isArray(settings))
423+
if (!isJsonObject(settings))
424424
throw new Error('settings must be a plain object');
425425
if (typeof settings.name !== 'string') throw new Error('settings.name must be a string');
426426
if (!this.#tables[settings.name]) {
@@ -705,7 +705,7 @@ class PuddySqlInstance extends PuddySqlEngine {
705705
* It also attaches a `SIGINT` listener to gracefully close the database connection
706706
* when the process is terminated.
707707
*
708-
* @param {Object} config - PostgreSQL client configuration object.
708+
* @param {import('pg').PoolConfig} config - PostgreSQL client configuration object.
709709
* Must be compatible with the `pg` Pool constructor.
710710
* @throws {Error} If a SQL engine is already initialized for this instance.
711711
*/

0 commit comments

Comments
 (0)