-
Notifications
You must be signed in to change notification settings - Fork 292
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
Type of Erased types #2914
Comments
Yes, this would be really nice for Python if it was possible. E.g for the example: let fn (a: U2<string, int>) =
() It's currently translated to: def fn(a: Any=None) -> None:
pass I would like to transpile this to become: def fn(a: Tuple[str, int]) -> None:
pass |
This was referenced Nov 20, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right now any type decorated with
Erase
becomesAny
in Fable AST. This makes sense because originallyErase
was thought for erased unions representing Typescript unions. However now there are cases where we want to erase the declaration but not necessarily the type.Another use case is when using a union just to wrap a primitive, then it should probably become the type of the primitive (although I'm not sure if Fable users frequently do this).
The text was updated successfully, but these errors were encountered: