Question: shared types between packages
See original GitHub issueI help maintain the Flow libdefs for react-navigation
. For our upcoming 3.0 release, we’re planning on splitting the project into multiple npm packages. We’d ideally be able to define types that are shared across packages only once, but my understanding is that it’s not yet possible to import types between libdefs.
My question is: what is the best practice for this today? Is copy-pasting types between libdefs the only way to do it? If so, does anybody know of a build system that automates/simplifies this process?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:12 (12 by maintainers)
Top Results From Across the Web
How to share Typescript Types between Projects?
If you just want to share types, you use index.ts and then include the path to the folder where shared type is inside...
Read more >how do you share type definitions across multiple projects?
I've got a question for all TS folks around. How do you handle sharing common types/interfaces/enums across multiple TypeScript projects? Do you ...
Read more >Sharing TypeScript Types between Backend and Frontend ...
Important — The recommended way to share types. We highly recommend sharing types between your frontend and backend using a component.
Read more >Best way to share types/code between apps - Reddit
Hi guys,. What is considered as best method to share code and types between apps? I have been looking around, and went with...
Read more >Make sharing TypeScript code and types quick and easy
Explore the ways you can save time and more easily share the TypeScript code and types you and your team need in this...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Initial RFC here Implementation we plan to ship here
We’re just working out the release plan atm as to not break users on current version
@Ashoat I’ve just merged the v4 CLI which is to be published as an alpha initially but the test framework is fully functional and available on the
main
branch. Feel free to start raising PRs to that branch if you want to try out the new feature.https://github.com/flow-typed/flow-typed/blob/main/CONTRIBUTING.md#importing-types-from-other-libdefs