javascript create new instance of interface