Skip to content

Commit 510101a

Browse files
committed
[CONJS-136] typescript error when trying to use SqlError interface
1 parent 2df2038 commit 510101a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

types/index.d.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,21 @@ export interface SqlError extends Error {
647647
fatal: boolean;
648648
}
649649

650+
interface SqlErrorConstructor extends ErrorConstructor {
651+
new (
652+
msg: string,
653+
fatal?: boolean,
654+
info?: { threadId?: number },
655+
sqlState?: string | null,
656+
errno?: number,
657+
additionalStack?: string,
658+
addHeader?: boolean,
659+
): SqlError;
660+
readonly prototype: SqlError;
661+
}
662+
663+
declare var SqlError: SqlErrorConstructor;
664+
650665
export const enum TypeNumbers {
651666
DECIMAL = 0,
652667
TINY = 1,

0 commit comments

Comments
 (0)