please publish library with flow types
- Dominant language
- JavaScript
- Stars
- 797
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Description
This is a:
- [ ] Bug Report
- [X] Feature Request
- [ ] Question
- [ ] Other
Which concerns:
- [X] flow-runtime
- [ ] babel-plugin-flow-runtime
- [ ] flow-runtime-validators
- [ ] flow-runtime-mobx
- [ ] flow-config-parser
- [ ] The documentation website
---
### What is the current behaviour?
`flow-typed install` places the following in `flow-typed/npm/flow-runtime_vx.x.x.js`:
~~~
declare module 'flow-runtime' {
declare module.exports: any;
}
~~~
This means that all usage of Type and its methods result in `any`.
---
### What is the expected behaviour?
Just export `.js.flow` in the distribution in addition to the `.js`. I have dabbled a bit with rollup but couldn’t figure out how to make that happen.
---
### Which package versions are you using?
flow-runtime 0.11.1
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by inspecting the Rollup and package distribution configuration for flow-runtime. Check how the published package is assembled and how flow-typed install currently sees its declarations. Done means the distribution includes a .js.flow file alongside the .js file so Flow consumers receive typed exports.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100