depends, is `string` assigned a value elsewhere?
-
-
-
Nope. The code there is all that's present.
- 1 more reply
New conversation -
-
-
Error out because the empty obect is missing the name property definition.
-
You would think
- 5 more replies
New conversation -
-
-
first instinct is yes, but in a system where - types are nullable - properties which can be undefined can also not exist ...this would be valid I will continue using TS and `"strict": true` so I don't have to live in this world
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Error unless the type system does automatic promotion to optional types.
-
Which probably it shouldn't :D
- 1 more reply
New conversation -
-
-
I voted for error but now I'm really curious to hear reasoning why not erroring could be consistent!
-
optional type ?
- 2 more replies
New conversation -
-
-
As opposed to const person: {|name: string|} = {}; ?
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 