type Keyable = { [ key ] : any ; } ; export function removeEmptyProps ( obj ) { return JSON . parse ( JSON . stringify ( obj , function ( _ , value ) { return value === null || value === undefined || value === '' ? undefined : value ; } ) ) ; } export function removeUndefinedProps < T > ( obj ) { return JSON . parse ( JSON . stringify ( obj ) ) ; }