-
Notifications
You must be signed in to change notification settings - Fork 39
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 incorrect games events types #40
base: master
Are you sure you want to change the base?
Conversation
Access `overwolf.games.events.onInfoUpdates2` results `info` property was always an empty object. `[key: string]: any;` is a temporary solution until all possibilities are added. I added only [live_client_data](https://overwolf.github.io/docs/api/overwolf-games-events-lol#live_client_data) and [game_info](https://overwolf.github.io/docs/api/overwolf-games-events-lol#matchstate). Can you check if this is correct? In addition, `extends InfoUpdate2[Feature]` gives you the correct type if you previously checked the `Feature` (see screenshots).
Calling `overwolf.games.launchers.events.getInfo(10902, console.log)` (when League Launcher is running) returns and object with `success`, `status` and `res`. Calling the same method with an unknown ID like `overwolf.games.launchers.events.getInfo(999999, console.log)` returns an object with `success`, `status` and `reason`. There is not `error` property, even if TypeScript tells me so. Thus, I removed `extends Result` to remove `error` from the result and added `status` and `reason`. `res` is optional.
I updated this request and description due to an invalid typedef. |
@eransharv anything I could do to move things forward? |
@lmachens sorry for the delay, but this is a PR that I should check carefully as from browsing it, something not looks right. But not sure. I will be available to check it thoroughly at the beginning of next week. |
@eransharv did you find time beginning of this week? |
@lmachens sorry about the delay. I'm waiting for the result of an internal discussion regarding the game events def file. I don't have an ETA, but it's on the top of my list. So it will not take too long. |
@eransharv any update? |
@lmachens It's in my schedule for Tomorrow. I will update you by Tomorrow's EOD. Thanks for your patience. |
This pull request has two commits.
Access
overwolf.games.events.onInfoUpdates2
resultsinfo
property was always an empty object.any;
is a temporary solution until all possibilities are added, I already added the available features.live_client_data and game_info should be complete.
Can you check if this is correct?
In addition,
InfoUpdates2Event
validates combinations offeature
andinfo
. See screenshot:Calling
overwolf.games.launchers.events.getInfo(10902, console.log)
(when League Launcher is running) returns and object withsuccess
,status
andres
.Calling the same method with an unknown ID like
overwolf.games.launchers.events.getInfo(999999, console.log)
returns an object withsuccess
,status
andreason
.There is not
error
property, even if TypeScript tells me so.Thus, I removed
extends Result
to removeerror
from the result and addedstatus
andreason
.res
is optional.