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

draggable attribute causing error Deno: Type string is not assignable to type boolean | undefined #3223

Closed
karolskolasinski opened this issue Aug 2, 2024 · 0 comments · Fixed by #3224
Labels

Comments

@karolskolasinski
Copy link

What version of Hono are you using?

4.5.1

What runtime/platform is your app running on?

Deno

What steps can reproduce the bug?

try to return a div with 'draggable` attribute

<div draggable="true"> I'M A DRAGGABLE DIV</div>

What is the expected behavior?

it should be possible to add draggable attribute:

  • if you add draggable=true it renders correctly, but compiler complains
  • if you add draggable compiler doesn't complain, but renders without our attribute, so you can't drag
  • if you add draggable={true} similarly as above

What do you see instead?

TS2322 [ERROR]: Type 'string' is not assignable to type 'boolean | undefined'.
          draggable="true"
          ~~~~~~~~~
    at file:///home/karol/projects/pliker.net/repliker/client/dg/forms/available_properties.tsx:29:11

    The expected type comes from property 'draggable' which is declared here on type 'HTMLAttributes'
        draggable?: boolean | undefined;
        ~~~~~~~~~
        at https://jsr.io/@hono/hono/4.5.1/src/jsx/intrinsic-elements.ts:155:5

Additional information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant