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

generated type guards can not be used when imported from index #237

Closed
kurkle opened this issue Mar 22, 2023 · 2 comments · Fixed by #239
Closed

generated type guards can not be used when imported from index #237

kurkle opened this issue Mar 22, 2023 · 2 comments · Fixed by #239

Comments

@kurkle
Copy link

kurkle commented Mar 22, 2023

With the -g flag, type guards are generated nicely. But they are exported as type in the index, which makes then not usable through the index:

export type { isTypeAsset, TypeAsset, TypeAssetFields } from "./TypeAsset";

When trying to use:

'isTypeAsset' cannot be used as a value because it was exported using 'export type'.ts(1362)
@marcolink
Copy link
Collaborator

Thanks @kurkle 🙏

Would you mind reviewing this: #239

@kurkle
Copy link
Author

kurkle commented Apr 11, 2023

Sorry I was not fast enough for the review, but I can confirm it works fine now 👏

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 a pull request may close this issue.

2 participants