The primary interface for code generation using a template. An instance can be obtained by importing the exported "Generator" constant into the template.
templateArgs object Gets any template arguments that were configured for the template instance in the codegenconfig.json file.
Executes the specified code generation template without any model.
options CodeGenerationOptions The code generation options.
template (writer: TextWriter) => void A callback function that writes code to the provided TextWriter.
void Executes the specified code generation template without any model.
template (writer: TextWriter) => Promise A callback function that writes code to the provided TextWriter. This callback should return a Promise when writing has finished.
Executes the specified code generation template with the model that is configured for the current template.
options ModelBasedCodeGenerationOptions The code generation options.
void Executes the specified code generation template with the model that is configured for the current template.
template (writer: TextWriter, model: TTargetModel) => Promise A callback function that writes code to the provided TextWriter. This callback should return a Promise when writing has finished.
Gets the model that is configured for the current template.
options CodeModelOptions [0..1] The model options.
Promise Gets the model that is configured for the current template.