diff --git a/typings/mysql/lib/Connection.d.ts b/typings/mysql/lib/Connection.d.ts index 2dabd960fc..6af95e1f7d 100644 --- a/typings/mysql/lib/Connection.d.ts +++ b/typings/mysql/lib/Connection.d.ts @@ -183,7 +183,7 @@ export interface ConnectionOptions { * * You can also specify a function to do the type casting yourself: * ```ts - * (field: Field, next: () => void) => { + * (field: Field, next: () => unknown) => { * return next(); * } * ``` diff --git a/typings/mysql/lib/parsers/typeCast.d.ts b/typings/mysql/lib/parsers/typeCast.d.ts index b8e975148b..7d62b983ad 100644 --- a/typings/mysql/lib/parsers/typeCast.d.ts +++ b/typings/mysql/lib/parsers/typeCast.d.ts @@ -49,6 +49,6 @@ export type Field = Type & { geometry: () => Geometry | Geometry[] | null; }; -export type Next = () => void; +export type Next = () => unknown; export type TypeCast = ((field: Field, next: Next) => any) | boolean; diff --git a/typings/mysql/lib/protocol/sequences/Query.d.ts b/typings/mysql/lib/protocol/sequences/Query.d.ts index 44d6c910c9..34da54c23c 100644 --- a/typings/mysql/lib/protocol/sequences/Query.d.ts +++ b/typings/mysql/lib/protocol/sequences/Query.d.ts @@ -44,7 +44,7 @@ export interface QueryOptions { * * You can also specify a function to do the type casting yourself: * ```ts - * (field: Field, next: () => void) => { + * (field: Field, next: () => unknown) => { * return next(); * } * ``` diff --git a/website/test/fixtures/external-code-embed/QueryOptions.txt b/website/test/fixtures/external-code-embed/QueryOptions.txt index e12549ffce..94930ef4cb 100644 --- a/website/test/fixtures/external-code-embed/QueryOptions.txt +++ b/website/test/fixtures/external-code-embed/QueryOptions.txt @@ -32,7 +32,7 @@ export interface QueryOptions { * Determines if column values should be converted to native JavaScript types. It is not recommended (and may go away / change in the future) * to disable type casting, but you can currently do so on either the connection or query level. (Default: true) * - * You can also specify a function (field: any, next: () => void) => {} to do the type casting yourself. + * You can also specify a function (field: any, next: () => unknown) => {} to do the type casting yourself. * * WARNING: YOU MUST INVOKE the parser using one of these three field functions in your custom typeCast callback. They can only be called once. * @@ -60,4 +60,4 @@ export interface QueryOptions { * By specifying a function that returns a readable stream, an arbitrary stream can be sent when sending a local fs file. */ infileStreamFactory?: (path: string) => Readable; -} \ No newline at end of file +} diff --git a/website/test/resources/external-code-embed/random-methods.txt b/website/test/resources/external-code-embed/random-methods.txt index ddf6fee73f..c2d1030a2b 100644 --- a/website/test/resources/external-code-embed/random-methods.txt +++ b/website/test/resources/external-code-embed/random-methods.txt @@ -41,7 +41,7 @@ export interface QueryOptions { * Determines if column values should be converted to native JavaScript types. It is not recommended (and may go away / change in the future) * to disable type casting, but you can currently do so on either the connection or query level. (Default: true) * - * You can also specify a function (field: any, next: () => void) => {} to do the type casting yourself. + * You can also specify a function (field: any, next: () => unknown) => {} to do the type casting yourself. * * WARNING: YOU MUST INVOKE the parser using one of these three field functions in your custom typeCast callback. They can only be called once. *