added typescript support