acacode / acacode/swagger-typescript-api

Destructuring assignment in the parameter list

Open
#771 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
4.1k
Forks
436
PR merge metrics
No merged PRs in 30d

Description

Hi currently I'm using react-query mutation
How can I turn this

```typescript
reportGetNoLawyersPerDay = (
query?: {
/** @format date-time */
TimeFrom?: string;
/** @format date-time */
TimeTo?: string;
},
params: RequestParams = {}
);
```
into this
```typescript
reportGetNoLawyersPerDay = ({
query,
params = {}
}: {
query?: {
/** @format date-time */
TimeFrom?: string;
/** @format date-time */
TimeTo?: string;
};
params?: RequestParams;
});
```
because I wanna use only one parameter for that function, is there any option for this?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.