-
-
Notifications
You must be signed in to change notification settings - Fork 223
Closed
Labels
FixedFixed in master branch. Pending production release.Fixed in master branch. Pending production release.bugSomething isn't workingSomething isn't working
Description
Describe the bug
draggable has three states, "true", "false" and auto (missing value). Currently that is flagged as an error when TypeScript checking/preprocessing is active.
(JSX attribute) svelte.JSX.HTMLAttributes<HTMLDivElement>.draggable?: boolean
Type 'string' is not assignable to type 'boolean'.ts(2322)
This might just require a type change in svelte-jsx.d.ts to something like the type of contenteditable ("true" | "false" | boolean).
To Reproduce
Example component:
<script type="text/typescript">
</script>
<div draggable="true"/>Expected behavior
Values "true" and "false" are accepted.
System (please complete the following information):
- OS: Windows 10, 64bit
- IDE: VSCode
- Plugin/Package: Svelte for VSCode
Workaround
Interpolate boolean:
<div draggable={true}/>Metadata
Metadata
Assignees
Labels
FixedFixed in master branch. Pending production release.Fixed in master branch. Pending production release.bugSomething isn't workingSomething isn't working