kubb
kubb copied to clipboard
Request an option: function object-style parameters.
What is the problem this feature would solve?
Expect an alternative:
type Options = {
name: string,
params: {/*...*/},
headers: {/*...*/},
/* ... */
}
function xxx(options: Options) {}
Currently only:
type Options = {
name: Name,
params: SomeParams,
headers: SomeHeaders,
/* ... */
}
function xxx(name: Name, params: SomeParams, headers: SomeHeaders) {}
External documents/projects?
No response
What is the feature you are proposing to solve the problem?
Avoid redundant undefined
to occupy positions when you don't need to provide intermediate parameters, just likes func('a value', undefined, undefined, 'a value')
What alternatives have you considered?
No response