-
Notifications
You must be signed in to change notification settings - Fork 45
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
@serializable: Error squiggles in VSCode #179
Comments
Hey, which version of typescript are you using? |
Oh is this a fault on my end only? Sorry, I'm new to this whole ecosystem. Anyway, this is what i found: > npm ls typscript
my-needle-engine-project@1.0.0
├─┬ @needle-tools/helper@1.1.0
│ └─┬ @needle-tools/needle-component-compiler@1.10.3
│ └── typescript@4.9.5
└── typescript@5.2.2 |
Thanks, I havent tested it with typescript 5 yet. Can you try if changing the type to |
Oh? That's what gets installed automatically using the exporter though? I did not (knowingly) deviate from the defaults.
|
Ah sorry I wasnt aware that it was updated in the vite template. So that can't be it What do you get when you change it to |
Interesting: Does not log anything. I can set a breakpoint there and it hits (after un-ingoring the file). Is there some magic going on? |
Ah you need to edit the file in |
Looks like in TS5 this parameter is a This issue would likely go away if we switch to TS5 entirely and drop support for experimentalDecorators, instead using the non-experimental ones with that context. I'm not sure if we can use Here are some decorator usage notes for TS5: And the info in the PR that added it is much better than the current docs: |
We'll add a fix for this in the next update by supporting both the old and the new decorator syntax:
a call to That being said our package will continue using |
Describe the bug 💬
VSCode is complaining about usage of
@serializable
on non-primitive targets likeObject3D
:This renders almost every file/tab with red font because it has this error.
Changing the returned function to also accept
any
and transforming it to a string if necessary seems to work:Squiggle gone, yay:
Operating System 👩💻
Windows
What browsers are you seeing the problem on? 🏄♂️
No response
Editor Version 🎲
2020.3
Needle Exporter version
3.13.0-pre
Project Info (Unity only) 📜
No response
Steps to reproduce 🔢
Reproduction ♻
No response
Discord or Discussion link
No response
Validations 🩹
The text was updated successfully, but these errors were encountered: