add constructor args in JS lib