storj/private/apigen
Jeremy Wharton 587fa8fdff private/apigen: use correct TS type for nillable fields
This change gives the proper type to TS class fields generated from
nillable Go struct fields. Previously, Go struct fields having a nil
representation ([]Type, *Type, etc.) were translated into TypeScript as
"Type | undefined". This isn't correct because these fields, when nil,
are given the value "null" when marshalled into JSON. This change fixes
this issue by giving these fields the type "Type | null".

Change-Id: I5a1a83eb3810a3cba10895bb2f0f75ca5fd7d1b5
2023-11-21 17:58:07 +00:00
..
example private/apigen: use correct TS type for nillable fields 2023-11-21 17:58:07 +00:00
common_test.go private/apigen: Avoid clashes of types names 2023-10-05 07:30:09 +00:00
common.go private/apigen: handle omitempty JSON option in structs 2023-11-18 07:09:42 -06:00
docgen.go private/apigen: handle omitempty JSON option in structs 2023-11-18 07:09:42 -06:00
endpoint_test.go private/apigen: Add a TypeScript client mock generator 2023-10-25 14:43:01 +02:00
endpoint.go private/apigen: Remove support for anonymous types 2023-11-16 12:29:21 +00:00
gogen_test.go private/apigen: Remove support for anonymous types 2023-11-16 12:29:21 +00:00
gogen.go private/apigen: prevent self imports 2023-11-15 21:41:20 +00:00
tsgen.go private/apigen: Remove support for anonymous types 2023-11-16 12:29:21 +00:00
tsgenmock.go private/apigen: Remove support for anonymous types 2023-11-16 12:29:21 +00:00
tstypes_test.go private/apigen: Remove support for anonymous types 2023-11-16 12:29:21 +00:00
tstypes.go private/apigen: use correct TS type for nillable fields 2023-11-21 17:58:07 +00:00