Back to directory
sergioflores-j avatar
sergioflores-j / ts-to-go

ts-to-go

TS utilities ready to go!

15

Stars

0

Forks

1

Watchers

MIT

License

ts-to-go

ts-to-go is a TypeScript utility library designed with a Golang flair. It provides a way to enhance error handling in your TypeScript applications. The main feature is a wrapper function that encapsulates both asynchronous and synchronous functions to return arrays containing both errors and results.

Getting started

You can install any ts-to-go package using npm or yarn with as the following commands:

npm i @ts-to-go/wrap-exception
# or
yarn add @ts-to-go/wrap-exception

How to Use

Please refer to each package documentation:

@ts-to-go/wrap-exception

Contributing

Development

This project is setup using NPM workspaces and Turborepo. Read more about it here:

From the root of the project:

  1. Set the right node and package manger versions:
nvm use
corepack prepare
  1. Install dependencies:
npm i
  1. Make your changes in the package

  2. Run build/test/lint for your changes:

npm run build-affected
npm run lint-affected
npm run test-affected

Releases

v2.0.0-rc.4

Pre-release

May 11, 2026

Download .zip

What's Changed

fix: esm export (#103)

Full Changelog: v2.0.0-rc.3...v2.0.0-rc.4

v2.0.0-rc.3

Pre-release

Sep 9, 2024

Download .zip

What's Changed 🧰 Maintenance

fix: package.json definitions for NPM publish @sergioflores-j (#79) chore(deps-dev): bump turbo from 2.0.9 to 2.1.1 @dependabot (#73)

Full Changelog: v1.1.1...v2.0.0-rc...

v2.0.0-rc.2

Pre-release

Sep 9, 2024

Download .zip

What's Changed 🧰 Maintenance

Fix: bundle size (#77)

📄 Documentation

Docs: improvements for new features (#77)

Full Changelog: v1.1.1...v2.0.0-rc.2

v2.0.0-rc.1

Pre-release

Sep 6, 2024

Download .zip

What's Changed 🚀 Features

feat: 2.0 object return type and advanced usage @sergioflores-j (#30)

Object return type: const wrappedFunction = wrapException(someAsyncFunctionThatThrowsOrRejects);...

What's Changed 🧰 Maintenance

feat: add dependabot config @sergioflores-j (#19) chore(deps-dev): bump turbo from 1.10.7 to 1.13.2 @dependabot (#40) chore(deps-dev): bump typescript from 5.2.2 to 5.4....