(trackingInfo, options)
| 2 | import trackEventMethodDecorator from './trackEventMethodDecorator'; |
| 3 | |
| 4 | export default function hoc(trackingInfo, options) { |
| 5 | return function decorator(...toDecorate) { |
| 6 | if (toDecorate.length === 1) { |
| 7 | // decorating a class |
| 8 | return withTrackingComponentDecorator( |
| 9 | trackingInfo, |
| 10 | options |
| 11 | )(...toDecorate); |
| 12 | } |
| 13 | |
| 14 | // decorating a method |
| 15 | return trackEventMethodDecorator(trackingInfo)(...toDecorate); |
| 16 | }; |
| 17 | } |
nothing calls this directly
no test coverage detected