News for hackers. Stuff that matters.
Re:Why doesn't TypeScript properly type Object.keys? by hellcow on Saturday June 24, 2023 @09:33AM (#36458554)
> Usually the lie is in your own code or bad dependencies

The lie is almost always in an external API response from fetch (hence the complaint about “any” above).

> Could you provide examples?

Off the top of my head… Go’s stdlib json.Unmarshal and Rust’s Serde derive Deserialize.

Re:Why doesn't TypeScript properly type Object.keys? by __ryan__ on Saturday June 24, 2023 @09:44AM (#36458639)
The lie is when your code uses* the “any” value where a concrete type is expected.

I was misunderstanding your point with the deserialize.

Edit: “using” -> “uses”