@earnup/ts-utils v1.0.15
ts-utils
The ts-utils
package provides common TypeScript & Javascript type definitions for use in TS & JS applications @ EarnUp. The following are good candidates for this repo:
- Small utility functions, such as formatters
- Small utility modules or objects, such as loggers
- Minimal API wrappers
The following are not good candidates for this repo:
- Complex modules that have multiple subcomponents (create a small service)
- Full-fledged API services that exceed a simple wrapper function or initializer
- Modules that cannot be componentized and re-used. These are likely best expressed as a service
- Re-usable type or constant definitions (use ts-types)
- Putting definitions for your arguments and return types in this repo is perfectly acceptable
Getting Started
There is no "app" to run in this repository. To run tests run
npm i
npm test
To manually build, run npm run build
. Manual publishing is disallowed for this repository.
Contributing
To add a type, choose a sensible location or add a semantically named file to the src directory. Create your utility and make sure it is properly exported. If you are not adding onto an existing export, add your export to index.ts
like:
export * as MyModuleName from './MyModule';
Releasing
To cut a release, use the "Releases" feature of GitHub. Tag your release using semantic versioning like 1.2.3
. Do not prefix your version with a "v" like v1.2.3
, as it will not publish properly.
You can either write your own release notes or allow release notes to be generated for you. The release will be managed by GitHub actions and the workflow can be found in the "Actions" tab for monitoring purposes.