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

fix(contract-client): when options should go first #940

Merged

Conversation

chadoh
Copy link
Contributor

@chadoh chadoh commented Apr 22, 2024

Make the methodOptions object the first argument for ContractClient methods that take no arguments.

This makes it match the types generated by the CLI.

Copy link
Contributor

@Shaptic Shaptic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One suggestion ⬇️ but can you also add a changelog entry?

src/contract_client/client.ts Outdated Show resolved Hide resolved
@chadoh chadoh force-pushed the fix/contract-client-methods-with-no-args branch from 89b2e32 to 146c381 Compare April 24, 2024 18:25
Copy link

socket-security bot commented Apr 24, 2024

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@typescript-eslint/parser@7.7.1 Transitive: environment, filesystem +13 1.88 MB jameshenry

View full report↗︎

@chadoh chadoh force-pushed the fix/contract-client-methods-with-no-args branch from 146c381 to 219f71a Compare April 24, 2024 18:33
Copy link
Contributor

@Shaptic Shaptic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏 nice

yarn.lock Outdated Show resolved Hide resolved
Make the `methodOptions` object the first argument for ContractClient
methods that take no arguments.

This makes it match the types generated by the CLI.

In order to get eslint to stop complaining about TypeScript feature
`Pick`, I also switched eslint's parser to `@typescript-eslint/parser`
@chadoh chadoh force-pushed the fix/contract-client-methods-with-no-args branch from 219f71a to 7789035 Compare April 24, 2024 19:19
@Shaptic Shaptic merged commit c1d7588 into stellar:master Apr 25, 2024
10 checks passed
@chadoh chadoh deleted the fix/contract-client-methods-with-no-args branch April 30, 2024 15:15
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

Successfully merging this pull request may close these issues.

3 participants