fork of hey-api/openapi-ts because I need some additional things
1import type { PyNodeBase } from '../base';
2import { PyNodeKind } from '../kinds';
3import type { PyStatement } from '../statement';
4
5export interface PyBlock extends PyNodeBase {
6 kind: PyNodeKind.Block;
7 statements: ReadonlyArray<PyStatement>;
8}
9
10export function createBlock(
11 statements: ReadonlyArray<PyStatement>,
12 leadingComments?: ReadonlyArray<string>,
13 trailingComments?: ReadonlyArray<string>,
14): PyBlock {
15 return {
16 kind: PyNodeKind.Block,
17 leadingComments,
18 statements,
19 trailingComments,
20 };
21}