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

svelte-migrate should remove strictEvents #277

Open
marekdedic opened this issue Nov 6, 2024 · 2 comments
Open

svelte-migrate should remove strictEvents #277

marekdedic opened this issue Nov 6, 2024 · 2 comments

Comments

@marekdedic
Copy link

Describe the bug

Hi,
Svelte 4 supported the strictEvents attribute on the <script> element:

<script lang="ts" strictEvents>
</script>

In Svelte 5, this is no longer supported. Thus, svelte-migrate should remove this attribute

Reproduction

I don't know how to create a repro repo for svelte-migrate

Logs

No response

System Info

System:
    OS: Linux 6.5 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
    CPU: (12) x64 12th Gen Intel(R) Core(TM) i7-1265U
    Memory: 7.59 GB / 15.22 GB
    Container: Yes
    Shell: 5.8.1 - /usr/bin/zsh
  Binaries:
    Node: 22.11.0 - /usr/bin/node
    Yarn: 1.22.21 - /usr/bin/yarn
    npm: 10.9.0 - /usr/bin/npm
    pnpm: 8.15.8 - /usr/bin/pnpm
  npmPackages:
    svelte: ^5.0.0 => 5.1.11

Severity

annoyance

Additional Information

No response

@benmccann
Copy link
Member

I honestly have no idea what strictEvents is. I don't see it on svelte.dev at all or the Svelte 5 migration guide, so adding it to the migration guide might be a good first step

@marekdedic
Copy link
Author

Yeah, this is something that was implemented, but never properly documented. Anyway, more info is here:

https://github.com/dummdidumm/rfcs/blob/ts-typedefs-within-svelte-components/text/ts-typing-props-slots-events.md#typing-events

@benmccann benmccann transferred this issue from sveltejs/kit Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants