Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

so a typescript pattern I keep tripping into, which is probably bad practice on my part, is parallel data structures. say any large state object. I have an object the same shape but holding errors of subkeys. the state setter clears the errors object keys per access modification. TS does not like that error object. it can never have an error there isn't a setter for, but it complains it might not.


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

Search: