Releases: coder/guts
v1.6.1
v1.6.0
!! Breaking Change !!
type <Name> any previously did not generate an output. It now does.
This is because any == interface{}, and this type generator intentionally does not generate interfaces. In Golang however, interface{} is equivalent to the any type in typescript. So this change includes empty interfaces in the output.
If your output has additional types that you do not expect, please file an issue. Or exclude the types programatically.
What's Changed
- feat: ignore non-exported identifiers by @toqueteos in #38
- feat: add GoParser.ExcludeCustom method by @toqueteos in #39
- chore: prevent
nullin heritageextendsexpressions by @Emyrk in #41 - feat: introduce MutationFunc type by @toqueteos in #43
- feat: avoid generating repeated type constraints by @toqueteos in #42
- feat: add InterfaceToType mutation to convert interfaces to type aliases by @stavros-k in #52
- !feat: handle base type any case by @Emyrk in #56
- fix: do not generate a type for interfaces by @Emyrk in #58
- chore: support attaching arbitrary comments to types by @Emyrk in #57
- feat: preserve comments from golang -> typescript by @Emyrk in #59
New Contributors
- @toqueteos made their first contribution in #38
- @stavros-k made their first contribution in #52
Full Changelog: v1.5.1...v1.6.0
v1.5.1
v1.5.0
v1.4.0
v1.3.0
!! Breaking Change !!
Enum output changed from:
export type EnumString = "bar" | "baz" | "foo" | "qux";to
export enum EnumString {
EnumBar = "bar",
EnumBaz = "baz",
EnumFoo = "foo",
EnumQux = "qux"
}To get the previous behavior use the mutation config.EnumAsTypes.
// use alias types for enums
ts.ApplyMutations(
config.EnumAsTypes,
)Full Changelog: v1.2.0...v1.3.0
v1.2.0
!! Breaking Change !!
type Example map[string]stringtype Example = Record<string,string> | nullTo get the previous behavior, where the output is just Record<string,string>, use the mutation config.NotNullMaps. This will revert this change for the output.
This was added to be more accurate to the truth, that golang map types can return a null json value.
What's Changed
- feat: Added basic tuple support 8032d06
type Numbers [3]inttype Numbers = [ number, number, number ];Full Changelog: v1.1.0...v1.2.0
v1.1.0
v1.0.1
Initial Release
Stable initial release of guts. Intended to be used as a library.