File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ const (
23
23
indent = " "
24
24
)
25
25
26
- // TODO: Handle httpapi.Response and other types
27
26
func main () {
28
27
ctx := context .Background ()
29
28
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
49
51
50
sortedTypes := make ([]string , 0 , len (t .Types ))
52
- sortedEnums := make ([]string , 0 , len (t .Types ))
51
+ sortedEnums := make ([]string , 0 , len (t .Enums ))
53
52
54
53
for k := range t .Types {
55
54
sortedTypes = append (sortedTypes , k )
@@ -209,6 +208,7 @@ func (g *Generator) generateAll() (*TypescriptTypes, error) {
209
208
// here.
210
209
values = append (values , elem .Val ().String ())
211
210
}
211
+ sort .Strings (values )
212
212
var s strings.Builder
213
213
_ , _ = s .WriteString (g .posLine (v ))
214
214
_ , _ = s .WriteString (fmt .Sprintf ("export type %s = %s\n " ,
You can’t perform that action at this time.
0 commit comments