-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Sveltekit and Svelte5 with Typia: The $ prefix is reserved, and cannot be used for variables and imports #335
Comments
@mblandr |
Here it is: |
OK, got it. Also, if we want to escape this problem separate the typia's function to external file, or create a PR for In unplugin-typia, we can't do anything. If I were you, I'll separate the typia's validation to external file like |
I know this doesn't work in svelte. |
Hmm, |
https://github.com/samchon/typia/blob/v7.0/src/internal/%24ProtobufWriter.ts Well, such As the |
@ryoppippi In the next v7 major update, I need to change the internal functions' name to start with another character. Is it okay with starting the underscore like I have not used svelt at all, so need your guidance. |
As Svelte-Kit prohibits `$` starting instance name, I've changed typia v7 to utilize `_` starting functions internally generated.
The next v7 major update of The next major update may come in two or three weeks. |
Close ryoppippi/unplugin-typia#335: change `$` prefix to `_` for Svelte.
O, it will be great, thanks |
Thank you!!! |
@samchon |
@mblandr you can update typia and unplugin-typia to the latest version, and make sure that it works fine |
unplugin-typia version
1.0.6
What platform is your computer? Copy the output of
npx envinfo --system -npmPackages cleye --binaries
System: OS: Windows 10 10.0.19045 CPU: (20) x64 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz Memory: 14.60 GB / 63.93 GB Binaries: Node: 20.16.0 - ~\AppData\Local\pnpm\node.EXE npm: 10.8.2 - ~\AppData\Local\pnpm\npm.CMD pnpm: 9.9.0 - ~\AppData\Local\pnpm\pnpm.EXE bun: 1.1.30 - D:\dev\bun\bin\bun.EXE
Describe the bug
here is code in +page.svelte
import typia, { tags } from "typia";
const formState = $state({
name: "",
email: "",
comment: "",
});
here is error:
Reproduction
create sveltekit project with svelte 5:
bun create svelte@latest my-app .
add unpligin-typia and typia
bun i -D @ryoppippi/unplugin-typia typia
bun typia setup
add to vite.config.ts
import UnpluginTypia from '@ryoppippi/unplugin-typia/vite'
export default defineConfig({
plugins: [UnpluginTypia(), sveltekit()]
});
bun dev
Validations
The text was updated successfully, but these errors were encountered: