Skip to content

Releases: coder/guts

v1.3.0

28 Apr 16:35
2cbbcee
Compare
Choose a tag to compare

!! Breaking Change !!

  • !feat: use first class typescript enums by @Emyrk in #20

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

16 Apr 21:01
a8b3dee
Compare
Choose a tag to compare

!! Breaking Change !!

  • feat: golang map types unioned with possible 'null' by @Emyrk in #18
type Example map[string]string
type Example = Record<string,string> | null

To 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]int
type Numbers = [ number, number, number ];

Full Changelog: v1.1.0...v1.2.0

v1.1.0

13 Mar 00:24
e428755
Compare
Choose a tag to compare

Changelog

  • Update go to 1.23
  • Supports generics defined in aliases
type AliasGeneric[A any] = BasicGeneric[A]

v1.0.1

29 Jan 03:01
7fa0e8e
Compare
Choose a tag to compare

Changelog

  • cffad1b Added support for unnamed type constraints.
type UnionConstraint[T string | int64] struct {
	Value T
}
export interface UnionConstraint<T extends string | number> {
    readonly Value: T;
}

Initial Release

30 Dec 15:08
3805ba1
Compare
Choose a tag to compare

Stable initial release of guts. Intended to be used as a library.