I haven't worked much in typescript over the last 10 months, but last time I tried type narrowing on untrusted data typecast to unknown I ran into a handful of problems documented here:
Yes. The main one is `foo in obj` now correctly narrows to `unknown & { foo: unknown }`. This allows you to correctly narrow an unknown to a fully typed object, as my code sample shows :)
https://github.com/microsoft/TypeScript/issues/25720
Working with untrusted types in a GraphQL project lead me to creating that JsonObject module.
I wrote up what I was thinking at the time here: http://www.blankenship.io/essays/2022-12-01/
Maybe this has improved.