I don't know about flow, but TypeScript is pretty flexible there. With mapped types you should be express anything you need.