From b65cf6a7577a4e4f38e5f9bfe5fc38780430e1a1 Mon Sep 17 00:00:00 2001 From: wellwelwel <46850407+wellwelwel@users.noreply.github.com> Date: Sun, 9 Jul 2023 08:08:24 -0300 Subject: [PATCH] chore: polishing documentation --- documentation/en/TypeScript-Examples.md | 2 +- ...-custom-class.ts => basic-custom-class.ts} | 0 .../row-data-packet-multi-statements.ts | 40 +++++++++---------- 3 files changed, 20 insertions(+), 22 deletions(-) rename examples/typescript/{baisc-custom-class.ts => basic-custom-class.ts} (100%) diff --git a/documentation/en/TypeScript-Examples.md b/documentation/en/TypeScript-Examples.md index 63c5286523..44f771cc02 100644 --- a/documentation/en/TypeScript-Examples.md +++ b/documentation/en/TypeScript-Examples.md @@ -303,4 +303,4 @@ You can also check some code examples using **MySQL2** and **TypeScript** to und - [Extending and using **Interfaces** with `RowDataPacket`, `rowAsArray` and `multipleStatements`](../../examples/typescript/row-data-packet-row-as-array-multi-statements.ts) - [Checking for `ResultSetHeader`, extending and using **Interfaces** with `RowDataPacket` from `ProcedureCallPacket`](../../examples/typescript/procedure-call-packet.ts) - [Checking for `ResultSetHeader`, extending and using **Interfaces** with `RowDataPacket` and `rowAsArray` from `ProcedureCallPacket`](../../examples/typescript/procedure-call-packet-row-as-array.ts) -- [Creating a basic custom **MySQL2** **Class**](../../examples/typescript/baisc-custom-class.ts) +- [Creating a basic custom **MySQL2** **Class**](../../examples/typescript/basic-custom-class.ts) diff --git a/examples/typescript/baisc-custom-class.ts b/examples/typescript/basic-custom-class.ts similarity index 100% rename from examples/typescript/baisc-custom-class.ts rename to examples/typescript/basic-custom-class.ts diff --git a/examples/typescript/row-data-packet-multi-statements.ts b/examples/typescript/row-data-packet-multi-statements.ts index f2bd3092f8..75b870d93a 100644 --- a/examples/typescript/row-data-packet-multi-statements.ts +++ b/examples/typescript/row-data-packet-multi-statements.ts @@ -9,12 +9,10 @@ import mysql, { RowDataPacket, } from 'mysql2/promise'; - interface User extends RowDataPacket { - /** id */ - 0: number; - /** name */ - 1: string; - } +interface User extends RowDataPacket { + id: number; + name: string; +} (async () => { const access: ConnectionOptions = { @@ -63,18 +61,18 @@ import mysql, { })(); /** Output - * - * Inserted: 4 - * ----------- - * id: 4 - * name: Gween - * ----------- - * id: 2 - * name: John - * ----------- - * id: 1 - * name: Josh - * ----------- - * id: 3 - * name: Marie - */ + * + * Inserted: 4 + * ----------- + * id: 4 + * name: Gween + * ----------- + * id: 2 + * name: John + * ----------- + * id: 1 + * name: Josh + * ----------- + * id: 3 + * name: Marie + */