Skip to content

Conversation

@ArtskydJ
Copy link
Contributor

When I ran npm run type-test, I got a few error messages. One of the messages was:

Cannot find module 'mysql2' or its corresponding type declarations.

This PR fixes that error.

There are a few more typescript errors, but I don't know the right way to fix those.
npm run type-test
> mysql2@3.0.1 type-test
> node ./node_modules/typescript/bin/tsc -p tests.json && mocha typings/test --timeout 10000

index.d.ts:86:18 - error TS2320: Interface 'PoolConnection' cannot simultaneously extend types 'PoolConnection' and 'Connection'.
  Named property 'execute' of types 'PoolConnection' and 'Connection' are not identical.

86 export interface PoolConnection extends mysql.PoolConnection, Connection {
                    ~~~~~~~~~~~~~~

index.d.ts:86:18 - error TS2320: Interface 'PoolConnection' cannot simultaneously extend types 'PoolConnection' and 'Connection'.
  Named property 'unprepare' of types 'PoolConnection' and 'Connection' are not identical.

86 export interface PoolConnection extends mysql.PoolConnection, Connection {
                    ~~~~~~~~~~~~~~

Found 2 errors in the same file, starting at: index.d.ts:86

The error message was:
Cannot find module 'mysql2' or its corresponding type declarations.
@sidorares sidorares merged commit 3e78661 into sidorares:master Apr 13, 2023
@ArtskydJ ArtskydJ deleted the fix-typescript-test branch April 25, 2023 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants