Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Chore] Simplify the generation of the type definition files

Open
#223 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript

Research direction

First check whether the referenced flow-bundler has been migrated to the hermes repo and released as a standalone package. Then compare its possible use with the current flow-api-translator, concatenation script, and folder-deletion build steps. Done means the generated Flow and TypeScript definitions remain correct without the brittle concatenation process.

Written by the indexing model from the issue text.

Description

React Strict DOM has a single file for Flow type definitions and a single file for TS type definitions.

The build step for this is fairly complex, however:

  • We transform the entire folder of source files to individual .js.flow and .d.ts files using flow-api-translator.
  • We then use a script to concatenate all the type files into a single file
  • We then delete the folder

The script that concatenates the types from all the files is brittle and can break if we accidentally use the same type name in different files.


We should be able to simplify this process by using this Rollup-like bundler that understands Flow syntax.

We will need to wait for this bundler to be migrated to the hermes repo and open-sourced as a standalone package.

Dominant language
JavaScript
Stars
3.6k
Forks
206
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from react/react-strict-dom

All issues in react/react-strict-dom

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.