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

Coerce Typescript in FormElement.vue #19691

Open
jmchilton opened this issue Feb 25, 2025 · 0 comments
Open

Coerce Typescript in FormElement.vue #19691

jmchilton opened this issue Feb 25, 2025 · 0 comments
Assignees

Comments

@jmchilton
Copy link
Member

After #19670 & #19680 - this is the last vue-tsc error in FormElement.vue. It doesn't look super hard to solve but my first attempt failed and I ripped it out of #19680.

src/components/Form/FormElement.vue:316:18 - error TS2322: Type '"upload" | "text" | "data" | "select" | "tags" | "color" | "hidden" | "password" | "data_collection" | "rules" | "hidden_data" | "baseurl" | "radio" | "directory_uri" | "data_column" | ... 4 more ... | undefined' is not assignable to type '"data" | "data_collection" | undefined'.
  Type '"upload"' is not assignable to type '"data" | "data_collection" | undefined'.

316                 :type="props.type"
                     ~~~~

  src/components/Form/Elements/FormData/FormData.vue:53:9
    53         type?: "data" | "data_collection";
               ~~~~
    The expected type comes from property 'type' which is declared here on type 'Readonly<Partial<{ type: "data" | "data_collection"; value: { values: DataOption[]; }; tag: string; loading: boolean; multiple: boolean; optional: boolean; extensions: string[]; collectionTypes: string[]; flavor: string; }> & Omit<...>> & Record<...>'
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

No branches or pull requests

2 participants