Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
Description
from https://github.com/mariadb-corporation/mariadb-connector-nodejs/issues/292
Current Situation:
The TypeScript type definition file defines a constructor with seven (7) arguments while the actual implementation has nine (9) arguments.
Consequence: When trying to instantiate using the mariadb.SqlError class
the sql and cause arguments are not visible to typescript
if the constructor is invoked as seen by typescript, the arguments are assigned to the wrong fields internally
one cannot set the cause argument at all
TypeScript constructor signature:
interface SqlErrorConstructor extends ErrorConstructor { new ( msg: string, fatal?: boolean, info?:
, sqlState?: string | null, errno?: number, additionalStack?: string, addHeader?: boolean ): SqlError; readonly prototype: SqlError; }
Actual Implementation: constructor(msg, sql, fatal, info, sqlState, errno, additionalStack, addHeader = undefined, cause)