export function attachPropertiesToComponent>( component: C, properties: P ): C & P { const ret = component as any; for (const key in properties) { // eslint-disable-next-line no-prototype-builtins if (properties.hasOwnProperty(key)) { ret[key] = properties[key]; } } return ret; }