SourceFile
import { SourceFile } from "@alloy-js/core";
<SourceFile filetype="string" header={Children} path="string" printWidth={number} reference={ComponentDefinition<{ refkey: Refkey; }>} tabWidth={number} useTabs> {children}</SourceFile>
import { SourceFile } from "@alloy-js/core/stc";
SourceFile({ filetype: string, header: Children, path: string, printWidth: number, reference: ComponentDefinition<{ refkey: Refkey; }>, tabWidth: number, useTabs: boolean,}).children(children)
Props
children | optionalChildren |
filetype | string The type of contents in this file. |
header | optionalChildren The header of the file. This is rendered before the contents of the file. This is useful for adding license headers or other metadata to the file. |
path | string The path of this file relative to its parent directory |
printWidth | optionalnumber The number of characters the printer will wrap on. Defaults to 100 characters. |
reference | optionalComponentDefinition<{
refkey: Refkey;
}> The component to use to render refkeys references within the file’s contents. |
tabWidth | optionalnumber The number of spaces to use for indentation. Defaults to 2 spaces. |
useTabs | optionalboolean Whether to use tabs instead of spaces for indentation. Defaults to false. |