Skip to content

Commit 276e35a

Browse files
committed
Removing any type references in the validate-theme script.
1 parent 685ba75 commit 276e35a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

scripts/validate-themes.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ const THEMES_DIRECTORY = path.join(CWD, 'src/themes');
3434
* Deep merges source object into target object.
3535
* Simple implementation for merging specs.
3636
*/
37-
function deepMerge(target: any, source: any): any {
38-
if (typeof target !== 'object' || target === null) {
39-
return source;
37+
function deepMerge(target: object | null, source: object | null): Record<string, unknown> {
38+
if (typeof source == 'object' && typeof target !== 'object' || target === null) {
39+
return source as Record<string, unknown>;
4040
}
41-
if (typeof source !== 'object' || source === null) {
42-
return target; // source is not object, don't overwrite with primitive unless standard merge? valid for spec?
41+
if (typeof target == 'object' && typeof source !== 'object' || source === null) {
42+
return target as Record<string, unknown>;
4343
}
4444

4545
const output = { ...target };

0 commit comments

Comments
 (0)