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

Type Promisify<...> has no call signatures #2866

Closed
6 tasks done
mwstr opened this issue Feb 14, 2023 · 5 comments · Fixed by #7273
Closed
6 tasks done

Type Promisify<...> has no call signatures #2866

mwstr opened this issue Feb 14, 2023 · 5 comments · Fixed by #7273
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)

Comments

@mwstr
Copy link

mwstr commented Feb 14, 2023

Describe the bug

I'm trying to reproduce resolves example. The Chai style assertion throws strange Typescript error:
image

Reproduction

https://stackblitz.com/edit/vitest-dev-vitest-52dmdx?file=test/basic.test.ts

System Info

System:
    OS: Linux 6.1 Fedora Linux 37 (Workstation Edition)
    CPU: (16) x64 Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz
    Memory: 5.08 GB / 15.46 GB
    Container: Yes
    Shell: 5.2.15 - /bin/bash
  Binaries:
    Node: 18.0.0 - ~/.volta/tools/image/node/18.0.0/bin/node
    npm: 8.6.0 - ~/.volta/tools/image/node/18.0.0/bin/npm
  Browsers:
    Chrome: 110.0.5481.77
  npmPackages:
    vite: ^4.1.1 => 4.1.1 
    vitest: ^0.28.5 => 0.28.5

Used Package Manager

pnpm

Validations

@mwstr mwstr changed the title Type 'Promisify<...>' has no call signatures Type Promisify<...> has no call signatures Feb 14, 2023
@FeldrinH
Copy link

This appears to still be a problem and it is quite annoying because it makes using the Chai API with promises very inconvenient in TypeScript projects.

@FeldrinH
Copy link

Together with #3941 this seems to leave no good options for asserting errors thrown in async functions if you are using TypeScript.

@hanneswidrig
Copy link

This is still an issue in the latest version of Vitest.

@sheremet-va sheremet-va added the p3-minor-bug An edge case that only affects very specific usage (priority) label Oct 2, 2024
@QuentinRoy
Copy link

QuentinRoy commented Jan 16, 2025

It seems to also be the case with

await expect(something).resolves.toSatisfy(predicate)

@hi-ogawa
Copy link
Contributor

QuentinRoy added a commit to QuentinRoy/lightmill-js that referenced this issue Jan 18, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Feb 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants