Skip to content

Commit eff8139

Browse files
authored
expose types property on public HTTPQueryOptions type (#110)
1 parent ac7315a commit eff8139

File tree

5 files changed

+27
-1
lines changed

5 files changed

+27
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## UNRELEASED
2+
3+
expose types property on public HTTPQueryOptions type
4+
15
## 0.10.1 (2024-10-07)
26

37
Fix `CONFIG.MD` documentation.

dist/jsr/index.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ import {
163163
ClientBase as PgClientBase,
164164
Pool as PgPool,
165165
PoolClient as PgPoolClient,
166+
types as PgTypes
166167
} from "pg";
167168

168169
export class ClientBase extends PgClientBase {
@@ -240,6 +241,12 @@ export interface HTTPQueryOptions<ArrayMode extends boolean, FullResults extends
240241
* Default: `undefined`
241242
*/
242243
authToken?: string | (() => Promise<string> | string);
244+
245+
/**
246+
* Custom type parsers
247+
* See https://github.com/brianc/node-pg-types
248+
*/
249+
types?: typeof PgTypes;
243250
}
244251

245252
export interface HTTPTransactionOptions<ArrayMode extends boolean, FullResults extends boolean> extends HTTPQueryOptions<ArrayMode, FullResults> {

dist/npm/index.d.mts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ import {
167167
ClientBase as PgClientBase,
168168
Pool as PgPool,
169169
PoolClient as PgPoolClient,
170+
types as PgTypes
170171
} from "pg";
171172

172173
export class ClientBase extends PgClientBase {
@@ -244,6 +245,12 @@ export interface HTTPQueryOptions<ArrayMode extends boolean, FullResults extends
244245
* Default: `undefined`
245246
*/
246247
authToken?: string | (() => Promise<string> | string);
248+
249+
/**
250+
* Custom type parsers
251+
* See https://github.com/brianc/node-pg-types
252+
*/
253+
types?: typeof PgTypes;
247254
}
248255

249256
export interface HTTPTransactionOptions<ArrayMode extends boolean, FullResults extends boolean> extends HTTPQueryOptions<ArrayMode, FullResults> {

dist/npm/index.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ import {
163163
ClientBase as PgClientBase,
164164
Pool as PgPool,
165165
PoolClient as PgPoolClient,
166+
types as PgTypes
166167
} from "pg";
167168

168169
export class ClientBase extends PgClientBase {
@@ -240,6 +241,12 @@ export interface HTTPQueryOptions<ArrayMode extends boolean, FullResults extends
240241
* Default: `undefined`
241242
*/
242243
authToken?: string | (() => Promise<string> | string);
244+
245+
/**
246+
* Custom type parsers
247+
* See https://github.com/brianc/node-pg-types
248+
*/
249+
types?: typeof PgTypes;
243250
}
244251

245252
export interface HTTPTransactionOptions<ArrayMode extends boolean, FullResults extends boolean> extends HTTPQueryOptions<ArrayMode, FullResults> {

export/httpQuery.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ interface HTTPQueryOptions {
5050
arrayMode?: boolean; // default false
5151
fullResults?: boolean; // default false
5252
fetchOptions?: Record<string, any>;
53-
// these callback options are not currently exported:
5453
types?: typeof defaultTypes;
54+
55+
// these callback options are not currently exported:
5556
queryCallback?: (query: ParameterizedQuery) => void;
5657
resultCallback?: (
5758
query: ParameterizedQuery,

0 commit comments

Comments
 (0)