Skip to content

Commit c05dbda

Browse files
committed
chore: make TS happy
1 parent d021ec5 commit c05dbda

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"pkg": "run-s clean build:server && pkg --out-path bin .pkg.config.json",
2626
"test": "run-s db:clean db:run test:run db:clean",
2727
"db:clean": "cd test/db && docker-compose down",
28-
"db:run": "cd test/db && docker-compose up --detach",
28+
"db:run": "cd test/db && docker-compose up --detach && sleep 5",
2929
"test:run": "jest --runInBand"
3030
},
3131
"engines": {

src/lib/PostgresMetaPublications.ts

+1
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ CREATE PUBLICATION ${ident(name)} ${tableClause}
175175
} else if (old!.tables.length === 0) {
176176
tableSql = ''
177177
} else {
178+
// @ts-ignore: Suppress TS2589
178179
tableSql = `ALTER PUBLICATION ${ident(old!.name)} DROP TABLE ${old!.tables
179180
.map((table) => `${ident(table.schema)}.${ident(table.name)}`)
180181
.join(',')};`

src/lib/db.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const init: (config: PoolConfig) => {
2626

2727
const { rows } = await pool.query(sql)
2828
return { data: rows, error: null }
29-
} catch (e) {
29+
} catch (e: any) {
3030
return { data: null, error: { message: e.message } }
3131
}
3232
},

test/lib/config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { pgMeta } from './utils'
22

33
test('list', async () => {
44
const res = await pgMeta.config.list()
5+
// @ts-ignore: Suppress TS2589
56
expect(res.data?.find(({ name }) => name === 'autovacuum')).toMatchInlineSnapshot(`
67
Object {
78
"boot_val": "on",

0 commit comments

Comments
 (0)