-
Notifications
You must be signed in to change notification settings - Fork 82
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
Various TypeScript compilation errors, upgrading from 7.21.0 to 7.24.1 #436
Comments
This looks like an issue with It'd be really helpful if you could provide a small repo reproducing the problem, so that we can look at what dependencies are being used :) |
@bcoe might it be related to the custom event names you were using? I think we event types became more restrictive recently in |
@G-Rath with regards to a reproduction, the tests in this application will pass currently: https://github.com/googleapis/repo-automation-bots/tree/master/packages/owl-bot But, if you:
The compilation exceptions will happen.
@gr2m it seems like this error might be related to the custom handler name:
But the rest of the errors seem to be happening regardless of whether I configure a custom event name or not:
|
One of the issues, is that we require Since probot requires |
🤦 That is completely my fault - I should have moved it to |
It seems like there's maybe a couple unrelated hiccups biting me:
Hope this helps, happy to keep running tests on my end 😄 Thanks for the super fast response. |
The remaining issues are with probot itself and are unrelated to here |
probot/probot#1472 should prevent some of the errors you've experienced from happening until probot is updated with the new types |
that might be related to the |
So I've checked this out locally, and I think it's just a case of
This happens because of the initial import failures, which means TypeScript can't finish resolving the types properly. Upon "fixing" those, you get better errors that indicate the property does exist:
overall, getting those import problems should be the first thing anyone does before looking into this further, as they greatly impact what errors happen since TypeScript won't have the right types in some places, causing it to give up inference which'll lead to other errors (i.g. like "property does not exist") |
Testing with the latest versions of probot, etc., and I seem to be able to compile again 👍 Thank you for your help. |
Can I use a type guard to inform the typescript compiler that I have e.g. a |
Next time, please open up a new issue. You shouldn't need to inform the TS compiler of what event you have, it's inferred automatically |
What happened?
When upgrading from
7.21.0
to7.24.1
, I receive quite a few compilation errors:What did you expect to happen?
Compilation continues to work.
What the problem might be
The problem seems to be an interdependency between
@octokit/rest
andprobot
.The text was updated successfully, but these errors were encountered: