QwikDev / qwik

Instant-loading web apps, without effort
https://qwik.dev
MIT License
20.71k stars 1.29k forks source link

[🐞] Form's onSubmit and onSubmitCompleted type definition broken #6595

Closed atinylittleshell closed 3 months ago

atinylittleshell commented 3 months ago

Which component is affected?

Qwik City

Describe the bug

I believe it's caused by https://github.com/QwikDev/qwik-city-build/commit/152398a378c85255abd58fa1c9c4c9457916f245.

onSubmit and onSubmitCompleted no longer accepts plain functions and would throw type errors.

Reproduction

https://stackblitz.com/edit/qwik-starter-n822fd?file=src%2Froutes%2Findex.tsx

Steps to reproduce

No response

System Info

System:
    OS: Linux 6.9 Arch Linux
    CPU: (16) x64 11th Gen Intel(R) Core(TM) i9-11900K @ 3.50GHz
    Memory: 56.82 GB / 62.67 GB
    Container: Yes
    Shell: 5.9 - /home/atinylittleshell/.nix-profile/bin/zsh
  Binaries:
    Node: 22.2.0 - ~/.nvm/versions/node/v22.2.0/bin/node
    npm: 10.7.0 - ~/.nvm/versions/node/v22.2.0/bin/npm
    bun: 1.1.10 - ~/.nix-profile/bin/bun
  npmPackages:
    @builder.io/qwik: ^1.5.7 => 1.5.7 
    @builder.io/qwik-city: ^1.5.7 => 1.5.7 
    typescript: 5.4.5 => 5.4.5 
    undici: * => 6.19.0 
    vite: ^5.2.10 => 5.3.1

Additional Information

No response

gioboa commented 3 months ago

Hi @atinylittleshell this is a duplicate of #6541 and it's solved by #6542

In the next release you will find the correct type definition. So I'm closing this issue for now, feel free to re-open it if it's still an issue for you. Thanks