From a37c0ac2342a7f76626967d42825d9fa70b18501 Mon Sep 17 00:00:00 2001 From: Vitaly Tomilov Date: Wed, 16 Nov 2022 00:28:20 +0000 Subject: [PATCH] refactoring types --- typescript/pg-promise.d.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/typescript/pg-promise.d.ts b/typescript/pg-promise.d.ts index bf30428c..e43c9407 100644 --- a/typescript/pg-promise.d.ts +++ b/typescript/pg-promise.d.ts @@ -21,8 +21,8 @@ import * as pg from './pg-subset'; import * as pgMinify from 'pg-minify'; import * as spexLib from 'spex'; -// internal txMode namespace; -declare namespace txModeNamespace { +// internal namespace for "txMode" property: +declare namespace _txMode { // Transaction Isolation Level; // API: http://vitaly-t.github.io/pg-promise/txMode.html#.isolationLevel enum isolationLevel { @@ -289,7 +289,7 @@ declare namespace pgPromise { constructor(api: IPromiseConfig) } - const txMode: typeof txModeNamespace; + const txMode: typeof _txMode; const utils: IUtils; const as: IFormatting; @@ -418,7 +418,7 @@ declare namespace pgPromise { tx(tag: string | number, cb: (t: ITask & Ext) => T | XPromise): XPromise - tx(options: { tag?: any, mode?: txModeNamespace.TransactionMode | null }, cb: (t: ITask & Ext) => T | XPromise): XPromise + tx(options: { tag?: any, mode?: _txMode.TransactionMode | null }, cb: (t: ITask & Ext) => T | XPromise): XPromise // Conditional Transactions; // API: http://vitaly-t.github.io/pg-promise/Database.html#txIf @@ -426,7 +426,7 @@ declare namespace pgPromise { txIf(tag: string | number, cb: (t: ITask & Ext) => T | XPromise): XPromise - txIf(options: { tag?: any, mode?: txModeNamespace.TransactionMode | null, reusable?: boolean | ((t: ITask & Ext) => boolean), cnd?: boolean | ((t: ITask & Ext) => boolean) }, cb: (t: ITask & Ext) => T | XPromise): XPromise + txIf(options: { tag?: any, mode?: _txMode.TransactionMode | null, reusable?: boolean | ((t: ITask & Ext) => boolean), cnd?: boolean | ((t: ITask & Ext) => boolean) }, cb: (t: ITask & Ext) => T | XPromise): XPromise } // Database object in connected state; @@ -645,7 +645,7 @@ declare namespace pgPromise { } interface ITaskArguments extends IArguments { - options: { tag?: any, cnd?: any, mode?: txModeNamespace.TransactionMode | null } & T + options: { tag?: any, cnd?: any, mode?: _txMode.TransactionMode | null } & T cb(): any }