facebook / facebook/flow

Flow doesn't like Symbols as object keys

Open
#3,258 25 comments 49 reactions 0 assignees View on GitHub
feature request incompleteness Typing: object model
Dominant language
Rust
Stars
22.3k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

[try flow](https://flowtype.org/try/#0MYewdgzgLgBAHjAvDA3gbQMoE8C2AjEAGwDoAzEAJwAoByckGgSgF0AuGAFgCYBfAbiA)

```js
const x = {[Symbol.for('foo')]: 42};
```

yields

```
1: const x = {[Symbol.for('foo')]: 42};
^ object literal. Computed property cannot be assigned with
1: const x = {[Symbol.for('foo')]: 42};
^ Symbol
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.