-
-
Notifications
You must be signed in to change notification settings - Fork 167
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
feat: TS migration for GraphQL Resolvers #342
Conversation
})), | ||
starting_equipment_options: async (background: Background) => | ||
background.starting_equipment_options.map(async option => { | ||
if ('equipment_category' in option.from) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this if
is necessary. Also, since it's inside a map
function, it's a bit strange seeing that if the if failed the function wouldn't return a value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to do this in a lot places due to how types for choices are currently setup. Otherwise I get:
Property 'equipment_category' does not exist on type 'OptionSet'.
Property 'equipment_category' does not exist on type 'OptionsArrayOptionSet'.
🎉 This PR is included in version 2.9.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
What does this do?
How was it tested?
npm run build
and CIIs there a Github issue this is resolving?
No
Was any impacted documentation updated to reflect this change?
Yup!
Here's a fun image for your troubles