Message from JavaScript discussions

October 2020

— Any example🤨

— 

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

— 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

— This is the example

— How do you KNOW what the type of foo.bar.poop is in normal JS?

— In a complex app which might mutate the object many times

— The keyword is "you dont... think"🤤 i'll beat you with your own language