Closed catloversg closed 4 days ago
actually the reason it is on the destructuring, is to remove it from the API returned
to remove it from the API returned
@ceifa Can you clarify this part? I don't get it. What will happen if we remove restartAppIfNecessary
from the destructuring?
Note that the code picks the init
, runCallbacks
and restartAppIfNecessary
from nativeBinding
, and the rest, it puts on a variable called api
, which is returned.
With this PR, the restartAppIfNecessary
would also be included on the api
, which is not intended to, as it should be outside of the client.
Your PR:
typeof steamworks.init(480).restartAppIfNecessary // function
Current code:
typeof steamworks.init(480).restartAppIfNecessary // undefined
The reason is because it is already outside the client:
typeof steamworks.restartAppIfNecessary // function
I get it now. Thanks for the explanation.
restartAppIfNecessary
is unused in theinit
function.