facebook / facebook/flow

Dash in interface key causes error

Open
#4,736 9 comments 1 reaction 0 assignees View on GitHub
Typing: interfaces
Dominant language
Rust
Stars
22.3k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

```js
export interface Header {
Authorization: string,
'User-Agent': string,
}
```

```sh
$ flow
Error: source/types.js:31
31: 'User-Agent': string,
^^^^^^^^^^^^ illegal name

Found 1 error
```

Is this a bug, or is there something I can do to fix it?

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.