2
0
mirror of https://github.com/frappe/books.git synced 2024-11-08 14:50:56 +00:00

fix: remove setting of error type on query-error

- type Listener params as any
This commit is contained in:
18alantom 2023-06-22 14:32:26 +05:30
parent d0571a2450
commit f652cdca0a
2 changed files with 2 additions and 4 deletions

View File

@ -90,9 +90,6 @@ export default class DatabaseCore extends DatabaseBase {
async connect() {
this.knex = knex(this.connectionParams);
this.knex.on('query-error', (error: Error) => {
error.cause = getDbError(error);
});
await this.knex.raw('PRAGMA foreign_keys=ON');
}

View File

@ -3,7 +3,8 @@ enum EventType {
OnceListeners = '_onceListeners',
}
type Listener = (...args: unknown[]) => unknown | Promise<unknown>;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
type Listener = (...args: any[]) => unknown | Promise<unknown>;
export default class Observable<T> {
[key: string]: unknown | T;