Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tedious v18 includes different TypeScript annotations #971

Open
Eldjotnar opened this issue Apr 26, 2024 · 5 comments
Open

Tedious v18 includes different TypeScript annotations #971

Eldjotnar opened this issue Apr 26, 2024 · 5 comments
Assignees
Labels
bug Something isn't working built-in dialect Related to a built-in dialect mssql Related to MS SQL Server (MSSQL) typescript Related to Typescript

Comments

@Eldjotnar
Copy link

Installing the latest version of tedious (18.2.0) will result in a typescript error when creating a new MssqlDialect.

Type 'Connection' is not assignable to type 'TediousConnection | Promise<TediousConnection>'.
  Type 'Connection' is not assignable to type 'TediousConnection'.
    Types of property 'beginTransaction' are incompatible.
      Type '(callback: BeginTransactionCallback, name?: string | undefined, isolationLevel?: number | undefined) => void' is not assignable to type '(callback: (error?: Error | undefined) => void, transactionId?: string | undefined, isolationLevel?: number | undefined) => void'.
        Types of parameters 'callback' and 'callback' are incompatible.
          Types of parameters 'error' and 'err' are incompatible.
            Type 'Error | null | undefined' is not assignable to type 'Error | undefined'.
              Type 'null' is not assignable to type 'Error | undefined'.

If the proposed solution is just to add | null to the definition in mssql-dialect-config.d.ts, I'm happy to open a PR.

@igalklebanov
Copy link
Member

Hey 👋

PRs welcome. You'd also need to bump tedious dev dependency to latest.

@igalklebanov igalklebanov added bug Something isn't working built-in dialect Related to a built-in dialect typescript Related to Typescript mssql Related to MS SQL Server (MSSQL) labels Apr 26, 2024
@mjbergman92
Copy link

I ran into this while trying to get started

@Necrelox
Copy link

@mjbergman92 same 😭 in the meantime I have to downgrade to tedious 16.4.0.

@mjbergman92
Copy link

@Necrelox I reverted back to tedious@17 and I've had no issues so far.

@Necrelox
Copy link

@mjbergman92 I apologize for the late response. Thank you for your feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working built-in dialect Related to a built-in dialect mssql Related to MS SQL Server (MSSQL) typescript Related to Typescript
Projects
None yet
Development

No branches or pull requests

4 participants