Block
Create an indented block of source text. The block has opener text which is
added prior to the block, which defaults to "{", and closer text which is
added after the block, which defaults to "}".
import { Block } from "@alloy-js/core";
<Block closer="string" inline newline opener="string"> {children}</Block>import { Block } from "@alloy-js/core/stc";
Block({ closer: string, inline: boolean, newline: boolean, opener: string,}).children(children)| children | optionalChildrenThe block’s contents |
| closer | optionalstringThe closing punctuation of the block. Defaults to ”}“. |
| inline | optionalbooleanIf true the block will not indent the content into new lines |
| newline | optionalbooleanWhether the block starts on a new line. When true, a hardline is added
prior to the block. If |
| opener | optionalstringThe opening punctuation of the block. Defaults to ”{”. |