Skip to content

Commit d98d362

Browse files
committed
fix(commons): widen target types in deepMerge tests to fix TS errors
1 parent 0fa558a commit d98d362

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

packages/commons/tests/unit/deepMerge.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ describe('Function: deepMerge', () => {
319319

320320
it('handles circular arrays', () => {
321321
// Prepare
322-
const target = { a: 1 };
322+
const target: Record<string, unknown> = { a: 1 };
323323
const circularArr: unknown[] = [1, 2];
324324
circularArr.push(circularArr);
325325
const source = { arr: circularArr };
@@ -387,7 +387,7 @@ describe('Function: deepMerge', () => {
387387
it('merges shared objects within arrays', () => {
388388
// Prepare
389389
const sharedObj = { shared: true };
390-
const target = {
390+
const target: Record<string, unknown> = {
391391
arr: [{ a: 1 }, { b: 2 }],
392392
};
393393
const source = {
@@ -453,7 +453,7 @@ describe('Function: deepMerge', () => {
453453
it('merges shared objects referenced in arrays', () => {
454454
// Prepare
455455
const sharedObj = { shared: true };
456-
const target = {
456+
const target: Record<string, unknown> = {
457457
arr: [{ a: 1 }, { b: 2 }],
458458
};
459459
const source = {
@@ -691,7 +691,7 @@ describe('Function: deepMerge', () => {
691691

692692
it('handles special number values', () => {
693693
// Prepare
694-
const target = {};
694+
const target: Record<string, unknown> = {};
695695
const source = {
696696
inf: Number.POSITIVE_INFINITY,
697697
negInf: Number.NEGATIVE_INFINITY,
@@ -710,7 +710,7 @@ describe('Function: deepMerge', () => {
710710
it('handles function values', () => {
711711
// Prepare
712712
const fn = () => 42;
713-
const target = {};
713+
const target: Record<string, unknown> = {};
714714
const source = { fn };
715715

716716
// Act

0 commit comments

Comments
 (0)