async renderAndWriteToFile(asyncapiDocument, templateFilePath, outputpath, extraTemplateData) {
    const renderContent = await this.renderFile(asyncapiDocument, templateFilePath, extraTemplateData);
    if (renderContent === undefined) {
      return;
    } else if (isReactTemplate(this.templateConfig)) {
      await saveRenderedReactContent(renderContent, outputpath, this.noOverwriteGlobs);
    } else {
      await writeFile(outputpath, renderContent);
    }
  }
Renders a template and writes the result into a file.

@private
@param {AsyncAPIDocument} asyncapiDocument AsyncAPI document to pass to the template.
@param {String} templateFilePath Path to the input file being rendered.
@param {String} outputPath Path to the resulting rendered file.
@param {Object} [extraTemplateData] Extra data to pass to the template.