typescript class implements interface example