-
Notifications
You must be signed in to change notification settings - Fork 83
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(intellisense): intellisense for array arg in on
#141
Conversation
Hi @ankeetmaini ! Thanks for contributing to this project. Intellisense is awesome. To make it work 100% for octokit users is a game changer in developer's experience. If we get this fixed will be awesome :) 💬 Feedback:✅ Tested copy-pasting the BeforeAfter❓ With this change I see we lose support for use the same this works because these are events from the same "event suite" webhooks.on(["check_run", "check_run.completed"], ({ name }) => {
console.log(name, "event received");
}) this does not work because are events from different "event suites" webhooks.on(["check_run", "label.edited"], ({ name }) => {
console.log(name, "event received");
}) I think we should keep compatibility for this use case but let's see what @gr2m thinks about it. Extra ball: On this pull request it is planned to cover your use case and split the type declaration in several files to have a better structure. Maybe you are interested on following it up or even participate on it. |
Also, I would say to wait to land these fixes which will give back stability to |
Sure, it can wait till we get these two merged in! |
I can try and see if we can keep the same handler usecase. Also if #113 is slated to go in soon, I can close this and help out. :) |
🆒 , if you need help with it let us know :) |
@dominguezcelada I've removed all the hardcoded overloads and used conditional types to store the mapping of
|
I agree but this is better than what we have now. @dominguezcelada PR looks good to me if you think it's good. We can iterate on details |
@ankeetmaini nice job doing the type generation more generic with conditional types. PR's fixing An idea that came in my mind is to extend
And for If you need help with it, let me know :) |
@dominguezcelada I've added the changes for validating type fixes. Let me know if something more needs to be done! |
Amazing Job @ankeetmaini. Tried it in a dummy repo and works good to me :) |
on
on
🎉 This PR is included in version 7.6.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
on
on
Fix #140