Skip to content

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

@igneosaur

Description

@igneosaur

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions