typescript create new object based on interface