diff --git a/src/index.ts b/src/index.ts index 6970731a..3fecf684 100644 --- a/src/index.ts +++ b/src/index.ts @@ -9,6 +9,7 @@ export type { BinarySqlTokenType, ClientConfigurationInputType, ClientConfigurationType, + CommonQueryMethodsType, ConnectionTypeType, DatabaseConnectionType, DatabasePoolConnectionType, diff --git a/src/types.ts b/src/types.ts index f656dfc8..d23e2caa 100644 --- a/src/types.ts +++ b/src/types.ts @@ -132,7 +132,7 @@ export type QueryCopyFromBinaryFunctionType = ( columnTypes: ReadonlyArray, ) => Promise; // bindPoolConnection returns an object -type CommonQueryMethodsType = { +export type CommonQueryMethodsType = { readonly any: QueryAnyFunctionType; readonly anyFirst: QueryAnyFirstFunctionType; readonly exists: QueryExistsFunctionType; diff --git a/test/dts.ts b/test/dts.ts index b00d4bb5..1ea02847 100644 --- a/test/dts.ts +++ b/test/dts.ts @@ -408,3 +408,8 @@ const samplesFromDocs = async () => { // end samples from readme }; + +const exportedTypes = () => { + // make sure CommonQueryMethodsType is exported by package + expectTypeOf().toHaveProperty('any').toBeCallableWith(sql`select 1`); +};