Skip to content

InputHTMLAttributes definition capture attribute incorrect #3788

@flipkickmedia

Description

@flipkickmedia

Version

3.0.11

Reproduction link

here

Steps to reproduce

Create a component, render this with JSX

What is expected?

Attribute is correctly defined, shouldn't be seeing an error here

What is actually happening?

Error gets reported by tsc:

ERROR in src/components/actiona/actiona.tsx:6:54
TS2322: Type 'string' is not assignable to type 'boolean | undefined'.
    4 |   name: "CaptureInputx",
    5 |   setup: function () {
  > 6 |     return () => <input type="file" accept="image/*" capture={"camera"} />;
      |                                                      ^^^^^^^
    7 |   },
    8 | });
    9 |

Error is inside:
node_modules/.pnpm/@VUE runtime-dom@3.0.11/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts
line: 565

attribute is defined as a boolean when it should be:
capture?: boolean | string

Metadata

Metadata

Assignees

No one assigned

    Labels

    🔨 p3-minor-bugPriority 3: this fixes a bug, but is an edge case that only affects very specific usage.🐞 bugSomething isn't workingscope: types

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions