tkrajina / typescriptify-golang-structs

A Golang struct to TypeScript class/interface converter
Apache License 2.0
505 stars 87 forks source link

to interfaces #41

Closed Narven closed 3 years ago

Narven commented 3 years ago

How are we supose to convert to interfaces instead of classes? Using the code in the readme

converter := typescriptify.New().
    Add(Person{}).
    Add(Dummy{})
err := converter.ConvertToFile("ts/models.ts")
if err != nil {
    panic(err.Error())
}
tkrajina commented 3 years ago

Committed a missing initialisation method now:

converter := typescriptify.New().
    WithInterface(true).
    ...
Narven commented 3 years ago

Its kind of hard to use that this since WithInterface(true). does not exists

unless is on a alternate universe or a top secret version

Narven commented 3 years ago

@tkrajina why are you closing this?

There is NO WithInterface(true) in release 0.1.5

tkrajina commented 3 years ago

I'm closing it because it's there.

https://github.com/tkrajina/typescriptify-golang-structs/commit/1c95abb56327167a5330367f25231f7ac82dd7f0

I don't plan to create releases for every single commit (especially if they aren't bug fixes). If you're using go modules you can easily point to a single commit.

Narven commented 3 years ago

Thanks