// current
joinSecurejoin(code:string, callback:(result:number)=>()):void
// wanted
joinSecurejoin(code:string):Promise<number>
ah while we are already at it, we should add a doc comment stating that the result is the joined chat id.
Why is this urgent?
Because the cb argument is not a real callback (contains no error), also the error on fail is thrown somewhere, but not at the place joinSecurejoin was called.
So wrapping the current function in a promise within js is not enough, the throwing of the error needs to be fixed in the napi module as well.
ah while we are already at it, we should add a doc comment stating that the result is the joined chat id.
Why is this urgent?
Because the cb argument is not a real callback (contains no error), also the error on fail is thrown somewhere, but not at the place
joinSecurejoin
was called. So wrapping the current function in a promise within js is not enough, the throwing of the error needs to be fixed in the napi module as well.