fork of hey-api/openapi-ts because I need some additional things
1import type { PyNodeBase } from '../base';
2import { PyNodeKind } from '../kinds';
3
4export type LiteralValue = string | number | boolean | null;
5
6export interface PyLiteral extends PyNodeBase {
7 kind: PyNodeKind.Literal;
8 value: LiteralValue;
9}
10
11export function createLiteral(
12 value: LiteralValue,
13 leadingComments?: ReadonlyArray<string>,
14 trailingComments?: ReadonlyArray<string>,
15): PyLiteral {
16 return {
17 kind: PyNodeKind.Literal,
18 leadingComments,
19 trailingComments,
20 value,
21 };
22}