-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Update TypeScript signature of createOffer #3232
Conversation
Thanks @moretti for the patch and the suggestions! In general it looks good to merge. Even if not documented, the As a side note, if you have experience with annotations/documentations for js projects, I'll be glad to hear your opinion about the types enhancements for janode, since people discussing there seem to prefer type files over jsdoc/tsdoc. |
@atoppi I see, I wasn't aware that the old API is still supported. In that case, it would be a good idea to mark the deprecated methods as such, so that editors supporting TypeScript can provide warnings when they are used. Could you please confirm if the Regarding the types enhancements for From my understanding, when documenting TypeScript and For JavaScript with JSDoc: /**
* @param {string} somebody - Somebody's name.
*/
function sayHello(somebody) {
console.log(`Hello ${somebody}`);
} For TypeScript with TSDoc: /**
* @param somebody - Somebody's name.
*/
function sayHello(somebody: string): void {
console.log(`Hello ${somebody}`);
} |
@moretti |
@atoppi Thanks, updated! |
9a28a2c
to
27f179d
Compare
@moretti unless you think there's more to add to this patch, it looks good to merge for me, thanks! 👍 |
Hey @lminiero, I don't see any more additions needed for this patch. It's good to merge from my end. Thanks! 🙏 |
Ack, merging then ✌️ |
This PR introduces an update to the TypeScript signature of the
createOffer
API method to include correct type annotations, aligning with the documentation provided on Janus API Documentation for initial offer creation and ICE restart.I suggest considering the use of TSDoc to document the API and generate part of the JavaScript API documentation. Integrating it with Doxygen could improve codebase maintainability, readability, and automate the process of keeping the API documentation up-to-date.