Skip to content

Commit 77db625

Browse files
committed
chore: remove nullable list elements in ts typegen
Backend will not send partially null slices.
1 parent c06ef7c commit 77db625

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

scripts/apitypings/main.go

+2
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ func TsMutations(ts *guts.Typescript) {
7979
// Omitempty + null is just '?' in golang json marshal
8080
// number?: number | null --> number?: number
8181
config.SimplifyOmitEmpty,
82+
// TsType: (string | null)[] --> (string)[]
83+
config.NullUnionSlices,
8284
)
8385
}
8486

site/src/api/typesGenerated.ts

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)