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

Neither of these will type check.

You can't perform computation on a promise. The only thing you can do is pipeline on it.

`user.updatedAt == date` is trying to compare a promise against a date. It won't type check.

`new Date(user.updatedAt)` is passing a promise to the Date constructor. It won't type check.



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: