diff --git a/src/hyper-light-card.test.ts b/src/hyper-light-card.test.ts index a1b119e..7d3224f 100644 --- a/src/hyper-light-card.test.ts +++ b/src/hyper-light-card.test.ts @@ -21,7 +21,7 @@ describe('HyperLightCard', () => { }, }, callService: jest.fn(), // Mock the callService function - } as any; + } as unknown; // Set up the required config property card.setConfig({ entity: 'light.test_light' }); @@ -59,7 +59,7 @@ describe('HyperLightCard', () => { it('throws an error when no entity is provided', () => { expect(() => { - card.setConfig({} as any); + card.setConfig({} as unknown); }).toThrow('You need to define an entity'); }); @@ -107,7 +107,7 @@ describe('HyperLightCard', () => { }, }, callService: jest.fn(), - } as any; + } as unknown; // Set the initial internal state card['_isOn'] = true; // Light is initially on diff --git a/src/utils.ts b/src/utils.ts index a542bd0..6b169ac 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -144,22 +144,22 @@ export function memoize( const isLoggingEnabled = process.env.NODE_ENV !== 'production'; // Disable logging in production by default export const log = { - debug: (...args: any[]) => { + debug: (...args: unknown[]): void => { if (isLoggingEnabled) { console.debug(...args); } }, - log: (...args: any[]) => { + log: (...args: unknown[]): void => { if (isLoggingEnabled) { console.log(...args); } }, - warn: (...args: any[]) => { + warn: (...args: unknown[]): void => { if (isLoggingEnabled) { console.warn(...args); } }, - error: (...args: any[]) => { + error: (...args: unknown[]): void => { if (isLoggingEnabled) { console.error(...args); }