Hacker News new | past | comments | ask | show | jobs | submit login

Could you use a helper like

    function getProperty<T, K extends keyof T>(o: T, propertyName: K): T[K] {
        return o[propertyName];
    }

?



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: