-
-
Notifications
You must be signed in to change notification settings - Fork 627
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
docs: introduce TypeScript documentation #2122
Conversation
After several tests, I never got an Instead, every query always returns
Examples from source code (JS)
Handling it considering not to cause a break change
That said, I don't propose to use the For now, I will continue the TypeScript documentation, but ignoring the |
The documentation and the examples are ready 🕺🏻 I have created seven TypeScript examples based on Issues. |
Thanks @wellwelwel! I think the naming confusion comes from the fact it's called "OK_Packet" in the documentation and it's a ResultSetHeader here. We should probably only use ResultSetHeader name for consistency
|
Hey, @sidorares 🙋🏻♂️ I have chosen I did a quick test and even a personal project would break if I changed from About keep it as it is... I explain it better in my previous comment and complementing, the reason for this is to pattern the main difference between Just complementing (again), basically the Feel free to change it, I'm always open for ideas and suggestions 🤹🏻♀️ |
For optional fields, especially in TypeScript, is recommended check if the field exists, and if yes, the
typeof myResultSetHeader?.changedRows === 'number';
'changedRows' in myResultSetHeader && myResultSetHeader.changedRows > 0; |
I added an installation case for
@types/node
in README.md, but described its purpose in/documentation/en/TypeScript-Examples.md
.Every example in this documentation was tested 🤹🏻♀️
Annotations:
examples/typescript/