Skip to content

TypeScript errors on errors store in UI for discriminated unions with nested data #653

@JanKillburger-PH

Description

@JanKillburger-PH
  • Before posting an issue, read the FAQ and search the previous issues. I haven't found anything related to this.

Description
This is related to discriminated unions that contain object values among the discriminated properties. The runtime behavior is totally fine but I am getting TypeScript errors in the +page.svelte file when using the errors object in my HTML markup that the nested properties don't exist on the errors object. With the form object everything is fine, so I assume the issue is related to how the errors types are derived.

If applicable, a MRE
I have modified the discriminated-union example to reproduce the issue: https://www.sveltelab.dev/ml216d801cl50x6
Again, the runtime behavior is perfect. I receive the error and it is displayed in the UI. But the TypeScript errors in the +page.svelte persist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions