Typescript Loop Through Object Javascript Definitions