Symbol array props! let a = Symbol('a'), b = Symbol('b') let x = { [[a, b]]() { return 'test' } } console.log(x[[a, b]]()) //prints 'test'
-
-
Replying to @brandonhorst
@brandonhorst I am pretty sure this should throw an error when it tries to concatenate a and b...1 reply 0 retweets 0 likes -
Replying to @brandonhorst
@brandonhorst Yeah operators are hard to transpile :(. I guess poisoned valueOf() might work well enough.@sebmck1 reply 0 retweets 0 likes -
Replying to @domenic
@domenic@brandonhorst Yeah, you can't coerce symbols to string. Issue with the polyfill, might be as simple as adding a throw to toString.1 reply 0 retweets 0 likes -
Replying to @sebmck1 reply 0 retweets 0 likes
-
Replying to @brandonhorst
@brandonhorst@domenic Great, thanks! https://github.com/zloirock/core-js … is the relevant project that Babel uses/recommends.1 reply 0 retweets 0 likes
@brandonhorst @domenic Actually, it'd be to allow: `var symbol = Symbol(); var obj = {}; obj[symbol] = "foo";`. No way to prevent it.
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 