Skip to content

Commit 1025726

Browse files
authored
🤖 Merge PR DefinitelyTyped#72248 [mysql] incorrect TypeCast type next() return type (void->any) by @vedler
1 parent a645f15 commit 1025726

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎types/mysql/index.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ export type TypeCast =
286286
buffer(): null | Buffer;
287287
geometry(): null | GeometryType;
288288
},
289-
next: () => void,
289+
next: () => any,
290290
) => any);
291291

292292
export type queryCallback = (err: MysqlError | null, results?: any, fields?: FieldInfo[]) => void;

‎types/mysql/mysql-tests.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ connection.query({
442442
if (field.type === "TINY" && field.length === 1) {
443443
return (field.string() === "1"); // 1 = true, 0 = false
444444
}
445-
next();
445+
return next();
446446
},
447447
});
448448

@@ -456,7 +456,7 @@ connection.query({
456456
}
457457
return (JSON.parse(string));
458458
}
459-
next();
459+
return next();
460460
},
461461
});
462462

0 commit comments

Comments
 (0)