const Decorated = Symbol()
type Combined = A & B
export const withStaticProperties = >(
component: A,
staticProps: B
): Combined => {
// add static properties
Object.assign(component, staticProps)
component[Decorated] = true
return component as any
}