Skip to content

Commit b65cf6a

Browse files
committed
chore: polishing documentation
1 parent 9cb714a commit b65cf6a

File tree

3 files changed

+20
-22
lines changed

3 files changed

+20
-22
lines changed

documentation/en/TypeScript-Examples.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,4 +303,4 @@ You can also check some code examples using **MySQL2** and **TypeScript** to und
303303
- [Extending and using **Interfaces** with `RowDataPacket`, `rowAsArray` and `multipleStatements`](../../examples/typescript/row-data-packet-row-as-array-multi-statements.ts)
304304
- [Checking for `ResultSetHeader`, extending and using **Interfaces** with `RowDataPacket` from `ProcedureCallPacket`](../../examples/typescript/procedure-call-packet.ts)
305305
- [Checking for `ResultSetHeader`, extending and using **Interfaces** with `RowDataPacket` and `rowAsArray` from `ProcedureCallPacket`](../../examples/typescript/procedure-call-packet-row-as-array.ts)
306-
- [Creating a basic custom **MySQL2** **Class**](../../examples/typescript/baisc-custom-class.ts)
306+
- [Creating a basic custom **MySQL2** **Class**](../../examples/typescript/basic-custom-class.ts)

examples/typescript/row-data-packet-multi-statements.ts

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@ import mysql, {
99
RowDataPacket,
1010
} from 'mysql2/promise';
1111

12-
interface User extends RowDataPacket {
13-
/** id */
14-
0: number;
15-
/** name */
16-
1: string;
17-
}
12+
interface User extends RowDataPacket {
13+
id: number;
14+
name: string;
15+
}
1816

1917
(async () => {
2018
const access: ConnectionOptions = {
@@ -63,18 +61,18 @@ import mysql, {
6361
})();
6462

6563
/** Output
66-
*
67-
* Inserted: 4
68-
* -----------
69-
* id: 4
70-
* name: Gween
71-
* -----------
72-
* id: 2
73-
* name: John
74-
* -----------
75-
* id: 1
76-
* name: Josh
77-
* -----------
78-
* id: 3
79-
* name: Marie
80-
*/
64+
*
65+
* Inserted: 4
66+
* -----------
67+
* id: 4
68+
* name: Gween
69+
* -----------
70+
* id: 2
71+
* name: John
72+
* -----------
73+
* id: 1
74+
* name: Josh
75+
* -----------
76+
* id: 3
77+
* name: Marie
78+
*/

0 commit comments

Comments
 (0)