Convince me I am wrong: This should not be a type error, right? - I asserted it’s an object - I am using `?.` for property access www.typescriptlang.org/play/#code/G...
Post
alternatively could have `isObject` function that will assert the type of an input to a record with unknown values: www.typescriptlang.org/play/#code/G... looks kinda cleaner, but introduces a whole new function (wonder if minifiers will simply inline it if unexported)
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 reposts0 likes