facebook / facebook/relay

Missing TS type definition for relay config

Open
#4,348 8 comments 5 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
19k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

Jest offer users typed definitions for their config files:
```js
/** @type {import('jest').Config} */
const config = {
verbose: true,
};

module.exports = config;
```

As explained in their [docs](https://jestjs.io/docs/configuration), you can write your docs in JS and use JSDocs to get type inference. Another approach is to write the config file in TS and directly import the `Config` type.

Would the Relay team consider offering something similar? It would improve the DX when configuring the compiler. The current approach requires me to open the `relay-compiler` README to manually ensure I'm using the right options.

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.