Simple typescript class behaviour accomplished.