Typescript Call Function From Variable Decelerations