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

submitter is not typed in packages/kit/types/index.d.ts SubmitFunction arguments #9483

Closed
igneosaur opened this issue Mar 22, 2023 · 0 comments · Fixed by #9484
Closed

submitter is not typed in packages/kit/types/index.d.ts SubmitFunction arguments #9483

igneosaur opened this issue Mar 22, 2023 · 0 comments · Fixed by #9484

Comments

@igneosaur
Copy link
Contributor

igneosaur commented Mar 22, 2023

Describe the bug

A submitter argument is available in the SubmitFunction however the type is missing in index.d.ts. The type has already been added to the documentation and packages/kit/types/ambient.d.ts but the SubmitFunction is duplicated due to a likeyly bug in TS (related).
Screenshot 2023-03-22 at 15 21 56
The original feature was added here.

Reproduction

This can be seen in any SvelteKit app that uses a SubmitFunction and destructures submitter from the input arguments.

Logs

Property 'submitter' does not exist on type '{ action: URL; data: FormData; form: HTMLFormElement; controller: AbortController; cancel(): void; }'.ts(2339)

System Info

System:
    OS: macOS 13.2.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 3.86 GB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 19.7.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.5.1 - /usr/local/bin/npm
    Watchman: 20221009.103647.0 - /usr/local/bin/watchman
  Browsers:
    Brave Browser: 111.1.49.120
    Safari: 16.3
  npmPackages:
    @sveltejs/adapter-auto: ^2.0.0 => 2.0.0 
    @sveltejs/kit: ^1.5.0 => 1.13.0 
    svelte: ^3.46.0 => 3.57.0 
    vite: ^4.0.3 => 4.2.1

Severity

annoyance

Additional Information

No response

@igneosaur igneosaur changed the title 'submitter' is not typed in SubmitFunction when developing in a SvelteKit app submitter is not typed in SubmitFunction when developing in a SvelteKit app Mar 22, 2023
@igneosaur igneosaur changed the title submitter is not typed in SubmitFunction when developing in a SvelteKit app submitter is not typed in packages/kit/types/index.d.ts SubmitFunction Mar 22, 2023
@igneosaur igneosaur changed the title submitter is not typed in packages/kit/types/index.d.ts SubmitFunction submitter is not typed in packages/kit/types/index.d.ts SubmitFunction arguments Mar 22, 2023
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 a pull request may close this issue.

1 participant