typescript create object that implements interface