feat: finalize update junior

This commit is contained in:
Abdalhameed Ahmad
2025-09-07 18:13:18 +03:00
parent edddc2f457
commit 44b5937f7a
8 changed files with 45 additions and 29 deletions

View File

@ -0,0 +1,3 @@
export const setIf = <T, K extends keyof T>(obj: T, key: K, val: T[K] | undefined) => {
if (typeof val !== 'undefined') obj[key] = val as T[K];
};