chore: move vscode local out of experiments (#5773)

We've been dogfooding the VS Code extension for a while,
and it seems stable enough that it's overall positive
to release!
This commit is contained in:
Kyle Carberry
2023-01-20 04:32:59 +00:00
committed by GitHub
parent b91b4533d8
commit 546a8931aa
10 changed files with 20 additions and 56 deletions
+6 -1
View File
@@ -223,8 +223,13 @@ func (g *Generator) generateAll() (*TypescriptTypes, error) {
sort.Strings(values)
var s strings.Builder
_, _ = s.WriteString(g.posLine(v))
joined := strings.Join(values, " | ")
if joined == "" {
// It's possible an enum has no values.
joined = "never"
}
_, _ = s.WriteString(fmt.Sprintf("export type %s = %s\n",
name, strings.Join(values, " | "),
name, joined,
))
var pluralName string