We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent3865f36 commit176b481Copy full SHA for 176b481
scripts/apitypings/main.go
@@ -23,7 +23,6 @@ const (
23
indent=" "
24
)
25
26
-// TODO: Handle httpapi.Response and other types
27
funcmain() {
28
ctx:=context.Background()
29
log:=slog.Make(sloghuman.Sink(os.Stderr))
@@ -49,7 +48,7 @@ func (t TypescriptTypes) String() string {
49
48
_,_=s.WriteString("// Code generated by 'make coder/scripts/apitypings/main.go'. DO NOT EDIT.\n\n")
50
51
sortedTypes:=make([]string,0,len(t.Types))
52
-sortedEnums:=make([]string,0,len(t.Types))
+sortedEnums:=make([]string,0,len(t.Enums))
53
54
fork:=ranget.Types {
55
sortedTypes=append(sortedTypes,k)
@@ -209,6 +208,7 @@ func (g *Generator) generateAll() (*TypescriptTypes, error) {
209
208
//here.
210
values=append(values,elem.Val().String())
211
}
+sort.Strings(values)
212
vars strings.Builder
213
_,_=s.WriteString(g.posLine(v))
214
_,_=s.WriteString(fmt.Sprintf("export type %s = %s\n",