Fix typing in common lib

This commit is contained in:
Marshall Polaris 2022-08-29 21:51:08 -07:00
parent 3e78bb44ca
commit ec9a4ccb1d

View File

@ -1,6 +1,6 @@
import { union } from 'lodash' import { union } from 'lodash'
export const removeUndefinedProps = <T>(obj: T): T => { export const removeUndefinedProps = <T extends object>(obj: T): T => {
const newObj: any = {} const newObj: any = {}
for (const key of Object.keys(obj)) { for (const key of Object.keys(obj)) {
@ -37,4 +37,3 @@ export const subtractObjects = <T extends { [key: string]: number }>(
return newObj as T return newObj as T
} }