Skip to content

error event missing in types #3749

Description

@Mister-Hope

I am not sure if this is possible:

import { createPool } from 'mysql2/promise'

const pool = await createPool({ /* ... */ })

pool.on('error', (err) => {
  // handle all the errors here
})

From the source code, it does inherit "error" listener from somewhere, but the types do not allow doing this.

Sorry I am a little busy these days so I can not dig into codes, also I try to look though the docs and there are also no descriptions about this.

Is the types wrong or I am not supposed to do this?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions