Skip to content

Commit 3080212

Browse files
committed
fix: Add more golang types -> number ts type
1 parent d6c1c49 commit 3080212

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

scripts/apitypings/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ func toTsType(fieldType string) string {
183183
switch fieldType {
184184
case "bool":
185185
return "boolean"
186-
case "uint64", "uint32", "float64":
186+
case "int", "int8", "int16", "int32", "int64", "uint", "uint8", "uint16", "uint32", "uint64", "uintptr", "float32", "float64":
187187
return "number"
188188
}
189189

site/src/api/typesGenerated.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ export interface TemplateVersion {
7373
// From codersdk/users.go:17:6.
7474
export interface UsersRequest {
7575
readonly search: string
76-
readonly limit: int
77-
readonly offset: int
76+
readonly limit: number
77+
readonly offset: number
7878
}
7979

8080
// From codersdk/users.go:32:6.

0 commit comments

Comments
 (0)