facebook / facebook/flow

Flow library definition documentation should cover json files

Open
#5,150 2 comments 2 reactions 0 assignees View on GitHub
documentation
Dominant language
Rust
Stars
22.3k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

Flow's documentation on [creating library definitions](https://flow.org/en/docs/libdefs/creation/) does not mention the ability to provide the definition of a json file, which is apparently possible according to [this comment](https://github.com/facebook/flow/issues/620#issuecomment-164497699).

I was hoping to find an example showing how one might provide an interface type definition for a json file containing an array of objects, such as below:

positions.json:
```
[
{
"id": "1",
"title": "Councilmember"
},
{
"id": "2",
"title": "Mayor"
}
]
```

Ideally, this page would discuss JSON files: https://flow.org/en/docs/libdefs/creation/

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.