declare module "pg" {
  export interface PoolConfig {
    [key: string]: unknown;
  }

  export interface PoolClient {
    query: (...args: unknown[]) => Promise<unknown>;
    release: () => void;
  }

  export class Pool {
    constructor(config?: PoolConfig);
    connect: () => Promise<PoolClient>;
    query: (...args: unknown[]) => Promise<unknown>;
    end: () => Promise<void>;
    on: (event: string, listener: (...args: unknown[]) => void) => void;
  }
}
