mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
* CB-5340 adds unit tests for basic hooks * CB-5340 test: trigger github actions * CB-5340 fixes unit tests * CB-5340 fixes unit tests * CB-5340 fixes unit tests * CB-5340 adds jest moduled imports for unit tests * CB-5340 adds jest moduled imports for unit tests * CB-5340 revert some changes * CB-5340 cleanup * CB-5340 replaces global jest to moduled * CB-5340 uncomment tests and skip it * CB-5340 cleanup * chore: enable jest globals * CB-5340 fix unit tests --------- Co-authored-by: Aleksei Potsetsuev <wrouds@gmail.com>
17 lines
445 B
TypeScript
17 lines
445 B
TypeScript
/*
|
|
* CloudBeaver - Cloud Database Manager
|
|
* Copyright (C) 2020-2024 DBeaver Corp and others
|
|
*
|
|
* Licensed under the Apache License, Version 2.0.
|
|
* you may not use this file except in compliance with the License.
|
|
*/
|
|
export function bindFunctions<T>(object: T, keys: Array<keyof T>): void {
|
|
for (const key of keys) {
|
|
const value = object[key];
|
|
|
|
if (typeof value === 'function') {
|
|
object[key] = value.bind(object);
|
|
}
|
|
}
|
|
}
|