update javascript type