Interface TemplatedResourcesGenerator

Generator used to create resources relative to a given base identifier. Similar to ResourcesGenerator, but takes as input a string indicating where the templates are stored that need to be used for resource generation.

interface TemplatedResourcesGenerator {
    generate: ((templateFolder: string, location: ResourceIdentifier, options: Dict<unknown>) => AsyncIterable<Resource>);
}

Implemented by

Properties

Properties

generate: ((templateFolder: string, location: ResourceIdentifier, options: Dict<unknown>) => AsyncIterable<Resource>)

Generates resources with the given options, based on the given template folder. The output Iterable should be sorted so that containers always appear before their contents.

Type declaration

    • (templateFolder, location, options): AsyncIterable<Resource>
    • Parameters

      • templateFolder: string

        Folder where the templates are located.

      • location: ResourceIdentifier

        Base identifier.

      • options: Dict<unknown>

        Options that can be used when generating resources.

      Returns AsyncIterable<Resource>

      A map where the keys are the identifiers and the values the corresponding representations to store.