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

go 1.18 generics support #58

Open
sev3ryn opened this issue May 26, 2022 · 1 comment
Open

go 1.18 generics support #58

sev3ryn opened this issue May 26, 2022 · 1 comment

Comments

@sev3ryn
Copy link

sev3ryn commented May 26, 2022

It would be great if this tool could convert Go generics to Typescript generics

type SimpleTile struct {
	AuditID string `json:"audit_id,omitempty"`
	Image   string `json:"image"`
}

type WideTile struct {
	SimpleTile
	Title      string `json:"title"`
	ButtonText string `json:"button_text"`
}

type DefaultTile struct {
	SimpleTile
	Title           string `json:"title"`
	ProviderName    string `json:"provider_name"`
	ProviderFavicon string `json:"provider_favicon"`
}

type Teaser[T DefaultTile | SimpleTile | WideTile] struct {
	Tiles []T `json:"tiles"`
}
@johan-lejdung
Copy link

Agreed, running into the same issue. Might solve it in out fork in a while

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