shypes
v0.0.43
Published
A library meant to be used as a single source of truth for typescript types between client and server applications.
Downloads
49
Readme
Welcome to the world of shared types
To contribute:
- Create a new type anywhere within the
/src
directory. This can be in an existing directory/file or a new one.
- If creating a new file, export everything from an
index.ts
file
- Make sure that is is exported from
/src/index.ts
- Increment the pacakge version
- Push to remote and open a PR here
For example: If a new directory
experimentGroup
is created. Useindex.ts
at/experimentGroup/index.ts
to define and export your type/interface/etc. Then in/src/index.ts
, addexport * from './experimentGroup'
.
On push to main, if the above was done correctly, a github action will trigger and publish the latest version of the package to be used.
Versioning
Until future notice, always increment the "minor minor" or "bug fix" version of the package.
Beta Versions
To publish a beta version of the package, increment the version in package.json, and then run npm publish --tag beta
. This will allow you to install the beta version of the package by running npm install shypes@beta
. Note: Users will need to run npm install shypes@latest
to get the latest stable version of the package.