enable intellisense for the main classes (#10618)

This commit is contained in:
Kyℓe Hensel
2025-02-17 21:35:50 +11:00
committed by GitHub
parent 083d6d04fe
commit f513ccd03d
12 changed files with 87 additions and 20 deletions

19
test/spec/util/rebind.js Normal file
View File

@@ -0,0 +1,19 @@
describe('utilRebind', () => {
it('copies methods from source to target', () => {
const target = { original: 123 };
const source = new class {
value = 456;
method() {
return this.value;
}
};
const copied = iD.utilRebind(target, source, 'method');
expect(copied).toStrictEqual({
original: 123,
method: expect.any(Function)
});
expect(copied.method()).toBe(456);
});
});