constructor(config: any) { super(config); this.connection.on('parameterStatus', msg => { // See the following question: // https://stackoverflow.com/questions/58725659/get-the-postgresql-server-version-from-connection if (msg.parameterName === 'server_version') { this.version = msg.parameterValue; } }); this.connection.stream.on('something', () => { }); // any event handlers are allowed: this.on('whatever', (whatever1: any, whatever2: any) => { }); this.query('test', [1, 2]).then(); }