Module '"pg"' has no exported member 'escapeLiteral'
cesco69 opened this issue · comments
francesco commented
import { escapeLiteral } from 'pg';
Module '"pg"' has no exported member 'escapeLiteral'
{
"pg": "^8.11.3"
}
Walter Berggren commented
The type seems to be missing from the corresponding types library: #3099
The fix hasn't been merged yet: DefinitelyTyped/DefinitelyTyped#68112
francesco commented
ok, this is a workaround for the users come here
// types.d.ts
declare module 'pg' {
export function escapeIdentifier(str: string): string;
export function escapeLiteral(str: string): string;
}
Gabe Gorelick commented
This is fixed in the latest version of @types/pg
(8.11.0). I think this issue can be closed.