MCPcopy Create free account
hub / github.com/buke/quickjs-go / ExportValue

Method ExportValue

module.go:57–63  ·  view source on GitHub ↗

ExportValue adds an export ValueSpec to the module.

(name string, spec ValueSpec)

Source from the content-addressed store, hash-verified

55
56// ExportValue adds an export ValueSpec to the module.
57func (mb *ModuleBuilder) ExportValue(name string, spec ValueSpec) *ModuleBuilder {
58 mb.exports = append(mb.exports, ModuleExportEntry{
59 Name: name,
60 Spec: spec,
61 })
62 return mb
63}
64
65// ExportLiteral adds a literal export definition to the module.
66func (mb *ModuleBuilder) ExportLiteral(name string, value interface{}) *ModuleBuilder {

Callers 3

ExportMethod · 0.95
ExportLiteralMethod · 0.95

Calls

no outgoing calls

Tested by 1