Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support modular definitions #627

Closed
alexandradeas opened this issue Jan 24, 2017 · 1 comment
Closed

Support modular definitions #627

alexandradeas opened this issue Jan 24, 2017 · 1 comment
Labels
cli Related to CLI tool request

Comments

@alexandradeas
Copy link

alexandradeas commented Jan 24, 2017

I'm relatively new to flow-typed so I apologize if this functionality already exists and I just haven't been able to find it, although my initial playing around with it doesn't seem to indicate that it's currently possible.

It would be nice to support nested definitions of modules for repositories, I'm currently look at adding the libdefs for Ramda v0.23, the most recent version being v0.21. Obviously the changes between 2 minor versions aren't huge and a lot of stuff is reusable from v0.21. However, as it currently stands, it appears that I'd need to add a definitions/npm/ramda_v0.23.0 directory to sit alongside the existing definitons/npm/ramda_v0.21.x libdef.

It'd be nice to define a structure such as

|-- definitions/
    |-- npm/
        |-- ramda_vx.x.x/
                |-- ramda_v0.x.x/
                    |-- generic.js
                    |-- ramda_v0.21.x/
                        |-- [v0.21 libdefs]
                        |-- ramda_v0.21.1/
                            |-- [v0.21.1 libdefs]
                    |-- ramda_v0.23.x/
                        |-- [v0.23 libdefs]

Through this, sharing definitions between versions is not only easier but is encourages by the structure of definitions.

@gantoine gantoine added cli Related to CLI tool request and removed wish labels Mar 21, 2018
@Brianzchen
Copy link
Member

This is something we probably won't ever implement unfortunately. Reusable types per library could be supported with environment definitions.

Though there's currently no way for a libdef to use an envdef but that's at least on my radar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Related to CLI tool request
Projects
None yet
Development

No branches or pull requests

3 participants