Skip to main content

InstanceFactoryCallback type alias

Callback function type for creating instances from template expansions.

Signature

export type InstanceFactoryCallback<TTemplate, TInstance> = (expandedName: string, combination: Record<string, string>, templateContent: TTemplate, originalTemplateName: string) => TInstance;

Remarks

This function is invoked for each combination generated during template expansion. It receives the expanded name, matrix combination parameters, and the template content, and must return a new instance of type TInstance.

The callback is responsible for:

  1. Creating the appropriate instance type (e.g., Action or BuildConfiguration).
  2. Passing the expanded name to the instance constructor.
  3. Storing the matrix parameters for later template evaluation.
  4. Associating the template content with the instance.

Generated via tsdoc2docusaurus 1.3.2 by API Extractor/Documenter 7.57.2.