Skip to content

Commit 2e99c2e

Browse files
committed
fix: output declarations
1 parent c75308a commit 2e99c2e

File tree

3 files changed

+9
-15
lines changed

3 files changed

+9
-15
lines changed

src/bridge.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export const createBridge = (postgres: typeof Postgres) => {
8080
},
8181
off: connectionEvents.off.bind(connectionEvents),
8282
on: connectionEvents.on.bind(connectionEvents),
83-
query: async (sql: string, parameters): Promise<QueryResult> => {
83+
query: async (sql: string, parameters: Parameters<typeof connection.unsafe>[1]): Promise<QueryResult> => {
8484
// https://github.com/porsager/postgres#result-array
8585
const resultArray = await connection.unsafe(sql, parameters);
8686

test/postgres-bridge/bridge.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import test from 'ava';
22
import {
33
Pool as PgPool,
4+
// @ts-expect-error-next-line pg types not available
45
} from 'pg';
56
import postgres from 'postgres';
67
import * as sinon from 'sinon';

tsconfig.json

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,18 @@
11
{
22
"compilerOptions": {
3-
"allowSyntheticDefaultImports": true,
3+
"declaration": true,
44
"esModuleInterop": true,
5+
"lib": [
6+
"es2020"
7+
],
58
"module": "commonjs",
6-
"declaration": true,
7-
"moduleResolution": "node",
8-
"noImplicitAny": false,
9-
"noImplicitReturns": true,
10-
"noUnusedLocals": true,
11-
"noUnusedParameters": false,
12-
"outDir": "dist",
13-
"resolveJsonModule": true,
14-
"skipLibCheck": true,
9+
"noEmit": true,
10+
"rootDir": ".",
11+
"sourceMap": true,
1512
"strict": true,
1613
"target": "es2018",
1714
"useUnknownInCatchVariables": false
1815
},
19-
"exclude": [
20-
"dist",
21-
"node_modules"
22-
],
2316
"include": [
2417
"src",
2518
"test"

0 commit comments

Comments
 (0)