...I already expect it to have that behavior. This is just a bug in Babel
-
-
to explain that, you mean function declaration w/ destructuring param needs {x}:{x:string} in TS.
-
yes. As a TS user, this has bitten me many many times.
-
we get plenty of reports on this in Flow too. We came up with an inline syntax but ppl would still make the mistake
@BrendanEich -
what's the flow inline syntax? The problem is it's impossible to lint :(
-
class X {} function foo({ x: X }} legitimately ambiguous :/ could try to guess.
-
havent built only POC'd: function f({x: (y: X)}) {} Consistent w casting syntax and gen'izes annot grmr forall bindings
-
argues against my { x as y } proposal, which might be nice
-
let { x: y as X } or let { x as X } would be the same strategy in TS. it's not bad
- 8 more replies
New conversation -
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.