codegen: Correctly gen TS without defaults (#51155)

This commit is contained in:
sam boyer
2022-06-21 21:55:37 -04:00
committed by GitHub
parent f81f33420e
commit e6d91235a7

View File

@@ -227,8 +227,10 @@ func (ls *ExtractedLineage) GenerateTypescriptCoremodel(path string) (WriteDiffe
} }
// TODO until cuetsy can toposort its outputs, put the top/parent type at the bottom of the file. // TODO until cuetsy can toposort its outputs, put the top/parent type at the bottom of the file.
parts.Nodes = append(parts.Nodes, top.T, top.D) parts.Nodes = append(parts.Nodes, top.T)
// parts.Nodes = append([]ts.Decl{top.T, top.D}, parts.Nodes...) if top.D != nil {
parts.Nodes = append(parts.Nodes, top.D)
}
var strb strings.Builder var strb strings.Builder
var str string var str string