In case I forget, I've created a self-contained TypeScript library demo on my Github repo.

It's a simple TypeScript project, and very minimal.
The library consists of 2 files: rtl.ts and SysUtils.ts

The main project is HowLibraryWorks.ts and you call it like so:

node -r ts-node/register HowLibraryWorks.ts

Once it runs, you will see the following output:

SysUtils init