fork of hey-api/openapi-ts because I need some additional things
1import type { PyNodeBase } from '../base';
2import type { PyExpression } from '../expression';
3import { PyNodeKind } from '../kinds';
4
5export interface PyFunctionParameter extends PyNodeBase {
6 defaultValue?: PyExpression;
7 kind: PyNodeKind.FunctionParameter;
8 name: string;
9 type?: PyExpression;
10}
11
12export function createFunctionParameter(
13 name: string,
14 type?: PyExpression,
15 defaultValue?: PyExpression,
16 leadingComments?: ReadonlyArray<string>,
17 trailingComments?: ReadonlyArray<string>,
18): PyFunctionParameter {
19 return {
20 defaultValue,
21 kind: PyNodeKind.FunctionParameter,
22 leadingComments,
23 name,
24 trailingComments,
25 type,
26 };
27}