Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Destructuring assignment in the parameter list #771

Open
thuong-infotrack-vn opened this issue Jun 11, 2024 · 0 comments
Open

Destructuring assignment in the parameter list #771

thuong-infotrack-vn opened this issue Jun 11, 2024 · 0 comments

Comments

@thuong-infotrack-vn
Copy link

thuong-infotrack-vn commented Jun 11, 2024

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

reportGetNoLawyersPerDay = (
  query?: {
    /** @format date-time */
    TimeFrom?: string;
    /** @format date-time */
    TimeTo?: string;
  },
  params: RequestParams = {}
);

into this

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant