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

Remove $Subtype and $Supertype when converting #3

Closed
Li0liQ opened this issue Jul 20, 2019 · 2 comments
Closed

Remove $Subtype and $Supertype when converting #3

Li0liQ opened this issue Jul 20, 2019 · 2 comments

Comments

@Li0liQ
Copy link

Li0liQ commented Jul 20, 2019

$Subtype and $Shape generic flow types don't make sense in typescript.
The tool should remove them, i.e. $Subtype<Type> -> Type.

See microsoft/TypeScript#2710 (comment) .

@khell
Copy link
Owner

khell commented Sep 9, 2019

$Shape is an alias of Partial: https://github.com/piotrwitek/utility-types/blob/master/src/utility-types.ts#L134 In Flow it marks all the properties of a type optional, likewise with its TS equivalent. Can you please elaborate on why it doesn't make sense? Maybe we should change it directly to Partial and skip the utility-types alias.

Agreed with $Subtype. I don't think that's something we currently handle at all so it is output as-is. I'll add a case for it.

@khell
Copy link
Owner

khell commented Sep 19, 2019

Completed here, thanks!
#8

@khell khell closed this as completed Sep 19, 2019
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