Skip to content

Commit 989ec2b

Browse files
authored
Merge pull request #2087 from wellwelwel/issue-2086
fix: change from .ts files to .d.ts
2 parents 2d91b01 + 98e6f3a commit 989ec2b

File tree

18 files changed

+272
-359
lines changed

18 files changed

+272
-359
lines changed

test/tsc-build/mysql/createPool/callbacks/connection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { access } from '../../baseConnection.js';
33

44
const pool = mysql.createPool(access);
55

6-
pool.getConnection((err, conn) => {
6+
pool.getConnection((_err, conn) => {
77
conn.connection;
88

99
try {

test/tsc-build/mysql/createPool/callbacks/execute.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import { access, sql, sqlPS, values } from '../../baseConnection.js';
3232

3333
/** getConnection and query */
3434
{
35-
mysql.createPool(access).getConnection((err, connection) => {
35+
mysql.createPool(access).getConnection((_err, connection) => {
3636
/** Overload: execute(sql, () => {}}) */
3737
connection.execute(sql, (err, result, fields) => {
3838
console.log(err, result, fields);

test/tsc-build/mysql/createPool/callbacks/getConnection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { access } from '../../baseConnection.js';
33

44
const pool = mysql.createPool(access);
55

6-
pool.getConnection((err, conn) => {
6+
pool.getConnection((_err, conn) => {
77
try {
88
// @ts-expect-error: The connection can't get another connection
99
conn.getConnection();

test/tsc-build/mysql/createPool/callbacks/query.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import { access, sql, sqlPS, values } from '../../baseConnection.js';
3232

3333
/** getConnection */
3434
{
35-
mysql.createPool(access).getConnection((err, connection) => {
35+
mysql.createPool(access).getConnection((_err, connection) => {
3636
/** Overload: query(sql, () => {}}) */
3737
connection.query(sql, (err, result, fields) => {
3838
console.log(err, result, fields);

test/tsc-build/mysql/createPool/callbacks/release.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { access } from '../../baseConnection.js';
33

44
const pool = mysql.createPool(access);
55

6-
pool.getConnection((err, conn) => {
6+
pool.getConnection((_err, conn) => {
77
conn.release();
88

99
try {

test/tsc-build/mysql/createPool/callbacks/releaseConnection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ import { access } from '../../baseConnection.js';
33

44
const pool = mysql.createPool(access);
55

6-
pool.getConnection((err, conn) => {
6+
pool.getConnection((_err, conn) => {
77
pool.releaseConnection(conn);
88
});

test/tsc-build/mysql/createPoolCluster/getConnection.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ poolCluster.add('cluster1', uriAccess);
77
poolCluster.add('cluster2', access);
88

99
/** execute */
10-
poolCluster.getConnection((err, conn) => {
10+
poolCluster.getConnection((_err, conn) => {
1111
/** Overload: execute(sql, () => {}}) */
1212
conn.execute(sql, (err, result, fields) => {
1313
console.log(err, result, fields);
@@ -38,7 +38,7 @@ poolCluster.getConnection((err, conn) => {
3838
});
3939

4040
/** query */
41-
poolCluster.getConnection('cluster1', (err, conn) => {
41+
poolCluster.getConnection('cluster1', (_err, conn) => {
4242
/** Overload: query(sql, () => {}}) */
4343
conn.query(sql, (err, result, fields) => {
4444
console.log(err, result, fields);

test/tsc-build/mysql/createPoolCluster/of/getConnection.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ poolCluster.add('cluster1', uriAccess);
77
poolCluster.add('cluster2', access);
88

99
/** execute */
10-
poolCluster.of('cluster1').getConnection((err, conn) => {
10+
poolCluster.of('cluster1').getConnection((_err, conn) => {
1111
/** Overload: execute(sql, () => {}}) */
1212
conn.execute(sql, (err, result, fields) => {
1313
console.log(err, result, fields);
@@ -38,7 +38,7 @@ poolCluster.of('cluster1').getConnection((err, conn) => {
3838
});
3939

4040
/** query */
41-
poolCluster.of('cluster2').getConnection((err, conn) => {
41+
poolCluster.of('cluster2').getConnection((_err, conn) => {
4242
/** Overload: query(sql, () => {}}) */
4343
conn.query(sql, (err, result, fields) => {
4444
console.log(err, result, fields);

test/tsc-build/tsconfig.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"target": "ES2016",
55
"module": "CommonJS",
66
"moduleResolution": "Node",
7-
"isolatedModules": true,
87
"esModuleInterop": true,
98
"allowSyntheticDefaultImports": true,
109
"strict": true,
@@ -13,6 +12,8 @@
1312
"strictFunctionTypes": false,
1413
"skipLibCheck": false,
1514
"noEmitOnError": true,
16-
"noEmit": true
15+
"noEmit": true,
16+
"noUnusedParameters": true,
17+
"isolatedModules": true,
1718
}
1819
}

tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
"strict": true,
1111
"noImplicitAny": true,
1212
"moduleResolution": "node",
13-
"removeComments": false
13+
"removeComments": false,
14+
"noUnusedParameters": true,
15+
"isolatedModules": true,
1416
}
1517
}

0 commit comments

Comments
 (0)