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[]}
nameConflictResolver={(name: string, symbols: any[]) => void}
namePolicy={NamePolicy<string>}
printWidth={number}
tabWidth={number}
useTabs
>
{children}
</Output>

Props

basePathoptionalstring

The base path for the output contents. Defaults to ”.“

childrenoptionalChildren
externalsoptionalSymbolCreator[]

External libraries whose symbols should be available for reference.

nameConflictResolveroptional(name: string, symbols: any[]) => void

Policy for handling multiple symbols declared with the same name.

namePolicyoptionalNamePolicy context interface<string>

Name policy to use for this output.

printWidthoptionalnumber

The number of characters the printer will wrap on. Defaults to 100 characters.

tabWidthoptionalnumber

The number of spaces to use for indentation. Defaults to 2 spaces.

useTabsoptionalboolean

Whether to use tabs instead of spaces for indentation. Defaults to false.

See also