Skip to content

[solidjs][typescript] Getting typing right in the LoginForm example #219

@nicoknoll

Description

@nicoknoll

Hi, I'm just trying to get typing working but somehow even the LoginForm typescript example leads to errors.

My main issue is getting typing for the FormStore<FieldValues> right. One of the issues Intellij gives me is that it always requires the second argument (Generic type 'FormStore' requires '2' type argument(s) ) which seems to be easy to fix. But even when this is fixed the fields "of" parameter always complains with Type FormStore<LoginForm> is not assignable to type FormStore<TFieldValues, TResponseData> as well as the children render method Type (field: any, props: any) => JSX.Element is not assignable to type <TFieldValues, TFieldName>(store: FieldStore<TFieldValues, TFieldName>, props: FieldElementProps<TFieldValues, TFieldName>) => JSX.Element .

Bildschirmfoto 2024-06-21 um 14 00 43

Let me know if I can add any more information to reproduce this.

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions