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

Anything that is not - or date should be use as type for interfaces #28

Open
shackra opened this issue May 18, 2020 · 0 comments
Open

Comments

@shackra
Copy link

shackra commented May 18, 2020

As stated.

Something like:

type Custom struct {
    MyValue `ts:"MyCustomType"`
}

Should become:

interface Custom {
    my_value: MyCustomType
}

For importing the types, I use a script with something like echo "import {Type} from '@types'" > src/types/golang.ts before running struct2ts, if someone is wondering.

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

1 participant