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

fix: not resolve types #2

Merged
merged 3 commits into from
Dec 9, 2024
Merged

fix: not resolve types #2

merged 3 commits into from
Dec 9, 2024

Conversation

yutak23
Copy link
Owner

@yutak23 yutak23 commented Dec 9, 2024

this fix #1.

The current issue arises because SessionData types in svelte-kit-sessions and svelte-kit-connect-cloudflare-kv are not aligned, leading to type mismatches. By introducing a generic type parameter (T) in KvStore, we can explicitly specify the SessionData structure when using KvStore. This approach resolves type inconsistencies and ensures type safety, as KvStore and svelte-kit-sessions share the same SessionData definition. It also enhances flexibility, allowing different projects to define and use their own SessionData types seamlessly.

@yutak23 yutak23 merged commit c995015 into main Dec 9, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

svelte-kit-connect-cloudflare-kv breaks SessionData typing
1 participant