ViewModel as TypeScript class