Skip to content

Commit

Permalink
Export names on the index as well as in a namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
RobbieMcKinstry committed Oct 14, 2022
1 parent 8933871 commit 06747b3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/codegen/nodejs/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -1780,10 +1780,14 @@ func (ns *namespace) intoIOFiles(ctx *ioContext, parent string) ([]*ioFile, erro
var file = newIOFile(indexPath)
ctx.mod.genHeader(
file.writer(),
ctx.mod.sdkImportsWithPath(true, true, dirRoot),
ctx.mod.sdkImportsWithPath(false, false, dirRoot),
ctx.externalImports,
ctx.imports,
)
fmt.Fprintf(file.writer(), "export * from \"./%s\";\n", "input")
fmt.Fprintf(file.writer(), "export * from \"./%s\";\n", "output")
fmt.Fprintf(file.writer(), "export * as %s from \"./%s\";\n", "inputs", "input")
fmt.Fprintf(file.writer(), "export * as %s from \"./%s\";\n", "outputs", "output")
files = append(files, file)
}

Expand Down

0 comments on commit 06747b3

Please sign in to comment.