add javascript type declaration