Typescript Dynamically Access Object Types In R