added Typescript definitions