Skip to content

Commit 401db79

Browse files
authored
fix(types): correct TypeCast's Next callback to return unknown (#3129)
* fix(types): correctly type Next as unknown Fixes typeCast Next type appears to be incorrect #3122 * Revert fixed type change in txt files * Revert txt to 5c22cf0^ for weird EOF issue
1 parent 4c6e140 commit 401db79

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

typings/mysql/lib/Connection.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ export interface ConnectionOptions {
183183
*
184184
* You can also specify a function to do the type casting yourself:
185185
* ```ts
186-
* (field: Field, next: () => void) => {
186+
* (field: Field, next: () => unknown) => {
187187
* return next();
188188
* }
189189
* ```

typings/mysql/lib/parsers/typeCast.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ export type Field = Type & {
4949
geometry: () => Geometry | Geometry[] | null;
5050
};
5151

52-
export type Next = () => void;
52+
export type Next = () => unknown;
5353

5454
export type TypeCast = ((field: Field, next: Next) => any) | boolean;

typings/mysql/lib/protocol/sequences/Query.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export interface QueryOptions {
4444
*
4545
* You can also specify a function to do the type casting yourself:
4646
* ```ts
47-
* (field: Field, next: () => void) => {
47+
* (field: Field, next: () => unknown) => {
4848
* return next();
4949
* }
5050
* ```

0 commit comments

Comments
 (0)