import {isUndefined} from 'lodash-es'

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function hasUndefined<T extends { [propName: string]: any }>(target: T, propNameList: ReadonlyArray<keyof T>) {
    return propNameList.some(
        propName => isUndefined(target[propName])
    )
}

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function isAllUndefined<T extends { [propName: string]: any }>(target: T, propNameList: ReadonlyArray<keyof T>) {
    return propNameList.every(
        propName => isUndefined(target[propName])
    )
}
