Skip to content

fix(handler type): make callback parameter optional #222

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

Merged
merged 1 commit into from
Jan 31, 2022

Conversation

ercgrat
Copy link
Contributor

@ercgrat ercgrat commented Nov 28, 2021

🎉 Thanks for sending this pull request! 🎉

Please make sure the title is clear and descriptive.

If you are fixing a typo or documentation, please skip these instructions.

Otherwise please fill in the sections below.

Which problem is this pull request solving?

  • Callbacks are not necessary when executing CRUD handlers. This is making the migration from JS Netlify functions to TS exceedingly difficult. I have to pass empty functions everywhere I call a handler (() => {}) which is violating the common ESLint rule for no empty arrow functions.

List other issues or pull requests related to this problem

n/a

Describe the solution you've chosen

  • Making the callback parameter optional.

Describe alternatives you've considered

  • Using ESLint overrides on every line I call a handler but do not require a callback.

Checklist

Please add a x inside each checkbox:

  • I have read the contribution guidelines.
  • The status checks are successful (continuous integration). Those can be seen below.

Sorry, something went wrong.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@ercgrat
Copy link
Contributor Author

ercgrat commented Nov 28, 2021

I don't have access to set the type:* label. Could someone please modify that for me?

@ascorbic ascorbic added the type: bug code to address defects in shipped code label Nov 30, 2021
Copy link
Contributor

@ascorbic ascorbic left a comment

Choose a reason for hiding this comment

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

Thanks!

@ercgrat
Copy link
Contributor Author

ercgrat commented Jan 30, 2022

Hey @ascorbic coming back to this quite late, I also don’t have permission to merge. Please merge this! :)

@kodiakhq kodiakhq bot merged commit 2c9edc6 into netlify:main Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants