(obj: any)
| 99 | } |
| 100 | |
| 101 | export const deepCopy: <T>(obj: T) => T = (obj: any) => { |
| 102 | if (!obj) { |
| 103 | return obj; |
| 104 | } |
| 105 | |
| 106 | return JSON.parse(JSON.stringify(obj)); |
| 107 | }; |
| 108 | |
| 109 | export const AddExtraProps = (Component: JSX.Element, extraProps: any) => { |
| 110 | return <Component.type key={Component.key} {...Component.props} {...extraProps} />; |