Skip to content

svelte-check "unrecognized UnaryExpression operator 39" in reactive statement #1202

@tyler-boyd

Description

@tyler-boyd

Similar to #245

Describe the bug
When running svelte-check, I see the following warning:

Getting Svelte diagnostics...

Warning - unrecognized UnaryExpression operator 39!
                This is an edge case unaccounted for in svelte2tsx, please file an issue:
                https://github.com/sveltejs/language-tools/issues/new/choose
                 +$customFrom

To Reproduce

The code snippet is something like

$: if (+date !== +$customFrom) { ... }

The app seems to work fine, so I suspect this is a false-positive in the checker.

Expected behavior

No warnings, as this is valid code that compiles and runs correctly.

System (please complete the following information):

  • OS: Linux, Mac
  • IDE: N/A (but VSCode)
  • Plugin/Package: svelte-check

Additional context
Again, seems similar to #245

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