got it working with typescript definitions