ExportLiteral adds a literal export definition to the module.
(name string, value interface{})
| 64 | |
| 65 | // ExportLiteral adds a literal export definition to the module. |
| 66 | func (mb *ModuleBuilder) ExportLiteral(name string, value interface{}) *ModuleBuilder { |
| 67 | return mb.ExportValue(name, MarshalSpec{Value: value}) |
| 68 | } |
| 69 | |
| 70 | // Build creates and registers the JavaScript module in the given context |
| 71 | // The module will be available for import in JavaScript code |