Skip to content

Output

This component is the root component for all your emitted output. Place your various SourceDirectory and SourceFile components inside Output to create directories and files in your output directory.

import { Output } from "@alloy-js/core";
<Output
basePath="string"
externals={SymbolCreator[]}
insertFinalNewLine
nameConflictResolver={NameConflictResolver}
namePolicy={NamePolicy<string>}
noFlush
printWidth={number}
tabWidth={number}
useTabs
>
{children}
</Output>
basePathoptional stringThe base path for the output contents. Defaults to ”.“
childrenoptional Children
externalsoptional SymbolCreator[]External libraries whose symbols should be available for reference.
insertFinalNewLineoptional booleanIf files should end with a final new line.
nameConflictResolveroptional NameConflictResolverPolicy for handling multiple symbols declared with the same name.
namePolicyoptional NamePolicy<string>Name policy to use for this output.
noFlushoptional booleanSkip flushing scheduled jobs before printing.
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.