
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@appandflow/tsst
Advanced tools
So I am not a huge fan of mono repo and I was looking for something that would allow me to declare and to write all of my ts types at a single place so then I could use them on different components of a given project ecosystem.
Let's say you have a web platform, a mobile platform and an API. Those components might needs to share some types and copy/pasting your types across those platforms might be time consuming and definitely not ideal for maintainability.
So this little package aims to offer a solution to that problem. It creates another github repo where all your types under the folder "sharedTypes" will be commited to. It's not 100% perfect, but it might save you some times.
npm i @appandflow/tsst --save-dev
1 - package.json script shortcut
You might wanna add this to your project's scripts in your package.json. Also, this tool might play nice with a git pre-commit hook or a post-commit hook.
"scripts": {
"tsst": "node node_modules/@appandflow/tsst/dist/tsst.js"
}
**2 - Initialization. You only need to do that the first time in each projects/components of your ecosystem **
This will guide you through the only few steps required to use this tool.
npm run tsst init
3 - Each time you start working on your project or each time you add a new type that you wish to share across your project ecosystem, run this
Make sure to store all of the types you wish to share under the folder /sharedTypes/*. This folder will be generated when you run "npm run tsst init" or the first time you run "npm run tsst sync"
npm run tsst sync
You might have some merge conflicts sometimes. Nothing new here - you open your text editor and you fix them manualy just like you normally do. Then you commit/push on your repo and you run "npm run tsst update" again to update the now well merged types.
4 - Profit ? That's it. Just run #3 when needed and store your shared types under /sharedTypes and you are all setup to share your types between your multiple project's components 👏
FAQs
Typescript Shared Types
We found that @appandflow/tsst demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.