Skip to content

renderAsync

Async variant — awaits any scheduled async jobs (e.g. produced by <Output> consumers that read external data) before walking the tree.

import { renderAsync } from "@alloy-js/core";
function renderAsync(children: Children, options?: PrintTreeOptions): Promise<OutputDirectory>;
childrenChildren
optionsoptional PrintTreeOptions
insertFinalNewLineoptional booleanIf files should end with a final new line.
printWidthoptional numberThe number of characters the printer will wrap on. Defaults to 100 characters.
tabWidthoptional numberThe number of spaces to use for indentation. Defaults to 2 spaces.
useTabsoptional booleanWhether to use tabs instead of spaces for indentation. Defaults to false.

Promise<OutputDirectory>