Post

Object check in TS is a PITA. I started parsing them at the edge of the program (app code). This is probably different for lib code. IDK if you're searching for a solution; if so, this is the approach I was using before: www.typescriptlang.org/play/#code/G...

typescriptlang.orgTS Playground - An online editor for exploring TypeScript and JavaScriptThe Playground lets you write TypeScript or JavaScript online in a safe and sharable way.

0 reposts3 likes

This, except I tend to use use hasOwnProperty rather than in. Feels like I usually care about immediate properties in type guards, not inherited ones.