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

Fun fact: Not even the whole of number type is safe to clone with the JSON method, because Infinity or NaN turn into null.

So one can’t infer JSON-clonability from TypeScript/JavaScript types. Learned this the hard way.



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

Search: