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

[Feature]: Svelte 5 $inspect rune support. #251

Open
alex-knyaz opened this issue Dec 25, 2023 · 0 comments
Open

[Feature]: Svelte 5 $inspect rune support. #251

alex-knyaz opened this issue Dec 25, 2023 · 0 comments

Comments

@alex-knyaz
Copy link

alex-knyaz commented Dec 25, 2023

What happened?

Svelte 3 & 4 had $: console.log(...) thing that worked wonders, svelte 5 removes $: syntax, and replaces $: console.log(...) with $inspect(...), with does not work with console ninja.

Version

all versions

Steps to reproduce (or sample repo)

  1. use svelte 5 starter project template.
  2. add $inspect(...) to any $state variable.
  3. run project & change state.
  4. no inline output in vscode at $inspect(...) line.

When implementing support for this, be careful of how to handle '.with' feature:
$inspect(x); // default console.log
$inspect(x).with(console.trace);
$inspect(x, y).with(() => { debugger; });

Log output

N/A
@ArtemGovorov ArtemGovorov changed the title [Bug]: Svelte 5 $inspect rune support. [Feature]: Svelte 5 $inspect rune support. Dec 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants