Skip to content

Handles custom variables incorrectly #2324

@KTibow

Description

@KTibow

Describe the bug

(This might be the wrong place but) when I use custom variables without a value, TS errors like Object literal may only specify known properties, and '"--type"' does not exist in type '{ type: "primary" | "tonal" | "text"; disabled?: boolean | undefined; }'.

Reproduction

<Component --var />

Expected behaviour

If --var="true" doesn't error, --var should either not error (as it evaluates into the same thing) or give a more clear error (if this isn't supposed to be allowed).

System Info

  • OS: Fedora Workstation 38
  • IDE: VS Code

Which package is the issue about?

svelte-check

Additional Information, eg. Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedFixed in master branch. Pending production release.bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions