Closed guihig closed 4 years ago
This should work, I'll verify it later, in the meantime can you provide your IDE version?
PyCharm 2020.2.3 (Professional Edition)
Build #PY-202.7660.27, built on October 6, 2020
Licensed to Guilherme Ferreira
Subscription is active until June 21, 2021
Runtime version: 11.0.8+10-b944.34 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.8.14-arch1-1
GC: ParNew, ConcurrentMarkSweep
Memory: 1933M
Cores: 16
Registry: ide.intellij.laf.enable.animation=true, ide.browser.jcef.preinit=false, debugger.watches.in.variables=false, ide.balloon.shadow.size=0, eslint.additional.file.extensions=svelte, ide.browser.jcef.enabled=false
Non-Bundled Plugins: IdeaVIM, Key Promoter X, com.vecheslav.darculaDarkerTheme, com.vincentp.gruvbox-theme, de.netnexus.camelcaseplugin, mobi.hsz.idea.gitignore, name.kropp.intellij.makefile, org.toml.lang, dev.blachut.svelte.lang, intellij.prettierJS, org.jetbrains.plugins.vue, com.leinardi.pycharm.mypy, ru.meanmail.plugin.requirements, ru.adelf.idea.dotenv
Current Desktop: Undefined
@tomblachut actually I haven't checked this case before sending the PR :(
@guihig this is in fact a bug, thanks for reporting.
@anstarovoyt I didn't either 😅 happens to best of us. We need to add more tests next time.
Interesting, this works
<script lang="ts">
let base = 1;
$: declaration = base * 2;
</script>
but this doesn't:
<script lang="ts">
import {anything} from "./whatever";
let base = 1;
$: declaration = base * 2;
</script>
Ahh yeah without import export it's treated as non-ESModule
@anstarovoyt SvelteTypeScriptReferenceExpressionResolver.createLocalResolveProcessor
is never called so my hack with SvelteSinkResolveProcessor
does not work
@guihig this is in fact a bug, thanks for reporting.
@anstarovoyt I didn't either sweat_smile happens to best of us. We need to add more tests next time.
Glad to help.
If there is anything I can help with, don't hesitate to ask me.
v0.15.1 contains a fix
When using "lang='ts'" in the script tag, i am supposing that intellij wont recognize svelte syntax
$:
and throw the message bellow:If that behavior does not come from the svelte plugin just ignore this issue and forgive me for the missundertood.