// copied https://github.com/ant-design/ant-design-mobile/blob/d3b3bae/src/utils/with-default-props.tsx function mergeProps(a: A, b: B): B & A; function mergeProps(a: A, b: B, c: C): C & B & A; function mergeProps(a: A, b: B, c: C, d: D): D & C & B & A; function mergeProps(...items: any[]) { const ret: any = {}; items.forEach((item) => { if (item) { Object.keys(item).forEach((key) => { if (item[key] !== undefined) { ret[key] = item[key]; } }); } }); return ret; } export default mergeProps;