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 (generator): let generated client import types using TypeScript's import type #710

Merged
merged 2 commits into from
Nov 30, 2023

Conversation

kevin-dp
Copy link
Contributor

This PR fixes #707 by explicitly importing types using import type instead of just import.

Copy link
Contributor

@thruflo thruflo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great 👍

Can I just sanity check: are there any other places in the code where we should fix this to make imports work for a Svelte developer?

I.e.: if they're importing other types exposed by the main typescript client library?

@kevin-dp
Copy link
Contributor Author

kevin-dp commented Nov 30, 2023

Great 👍

Can I just sanity check: are there any other places in the code where we should fix this to make imports work for a Svelte developer?

I.e.: if they're importing other types exposed by the main typescript client library?

This is a concern of the one that is importing, i.e. only a problem in the project that is using Svelte (not internally in our electric-sql package). Therefore, I believe those imports are under the control of the application developer and it's their responsibility to import types using import type.

@kevin-dp kevin-dp merged commit 65f10d6 into main Nov 30, 2023
6 checks passed
@kevin-dp kevin-dp deleted the kevindp/electric-client-import-types branch November 30, 2023 10:22
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 needs 'import type'
2 participants