Suppose you wrote some typescript code that you’d like to share with a different codebase.

You’re going to want to do the following :

Create a directory for the code to reside in

Install typescript, prettier, and setup some tests (with code coverage ? )

Create a demo to fiddle with

Use RollupJS to bundle your module into different module formats (cjs, es)

Add pre-push & pre-commit hooks

And a bunch of other stuff…

This takes time and energy you probably don’t want to spend.

If you’d like to avoid doing all that checkout create-ts.

Quickly create a Typescript library with create-ts

Use without installing globally

npx create-ts

Install globally

npm i -g create-ts

Create a typescript library

npx create-ts -l

Create a typescript react component

npx create-ts -rc

Create a typescript react app