Message from JavaScript discussions

October 2020

— Yeah well, that's more elegant alternative

— 

It makes me lol when you try to stick TypeScript in every hole.. just make a nice data structure which will make code cute

— obj.hasOwnProperty 'key' (for inner), obj.key for data structs

— Problem is that you can't statically determine the shape of the object

— Any example🤨

— Https://www.typescriptlang.org/play?#code/MYewdgzgLgBAZiEMC8MDeBYAUDGAjAQwCcAudbXXQgLzIHIBbAU2boBoLKAHRLsgFk4BfbEIDc2bAhAA6QkRlA

Message permanent page

— I can see the types of the inner props BEFORE running the code (static analysis)

— So wat, it doesn't relate.. i dont need dropdowns.. why do i need dropdowns🤤

— The point is that you don't have to remember or think about what the shape of objects are, because the type system has figured it out for you and displayed it for you, it's not about the dropdown, it's about replacing your assumptions with guarantees

Message permanent page

— The only way to guarantee the shape of an object in normal JS code is to run it and log it, which might take much longer depending on the circumstances and lifecycle of your object

Message permanent page

— And the shape might even change throughout the lifecycle of the object

— Still, you didn't bring the example