Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
kalmi10
on Nov 14, 2018
|
parent
|
context
|
favorite
| on:
Copying objects in JavaScript
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:
So one can’t infer JSON-clonability from TypeScript/JavaScript types. Learned this the hard way.