Template - ModuleBuilder
Template.ModuleBuilderA Builder to create a template
Module.Templates can be organised into a modules, which function as a kind of "namespace" for streams, tasks and layouts. Other Builders can be placed "inside" a module upon construction. Any streams, tasks and layouts constructed by that builder will exist inside that modules namespace.
Example
const module_a = new ModuleBuilder("a")
const module_b = new ModuleBuilder("b", module_a)
const source_c = new SourceBuilder("c", module_b).value(...)
Hierarchy
-
Builder
↳
ModuleBuilder
Methods
export
▸ export(stream
): StaticExportBuilder
Create a StaticExportBuilder to export a
Stream from a module to its parent module.Note that it is not possible to access data streams from outside a module unless they have been explicitly exported.
Type parameters
Name | Type |
---|---|
T | extends EastType |
Parameters
Name | Type |
---|---|
stream | Stream |
Returns
StaticExportBuilder
forEach
▸ forEach(stream
): DynamicModuleBuilder
Create a module dynamically for each key-value entry in a dictionary stream.
Type parameters
Name | Type |
---|---|
T | extends DictType |
Parameters
Name | Type |
---|---|
stream | Stream |
Returns
DynamicModuleBuilder
path
▸ path():
ModulePath
Return the "path" to this module from the root module, as an array containing the modules.
Returns
ModulePath