Skip to content
Stater kit for modern TypeScript library. Generate JS ready to be published on npm.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

TypeScript Lib Starter TypeScript Lib Starter

TypeScript 3.5 styled with prettier styled with prettier styled with prettier styled with prettier

Stater kit for modern TypeScript libraries. Generates JavaScript ready to be published on npm.

Batteries included. Period.

Clone the repo

$ git clone {your_project_name}

$ cd {your_project_name}

Remove reference to this starter and re-init package.json

$ rm -rf .git && git init && npm init

Install development dependencies

$ npm i


  • npm run build: build TypeScript sources to lib directory
  • npm publish: builds and publishes lib to
  • npm test: run tests in ./test directory using tap
  • npm run test:watch: watches ./src/ and ./test/ folders and restarts compilation and tests
  • npm run test:report: saves test report to out.tap file
  • npm run test:reporter: converts out.tap file to junit

External typings augmentation

This starter is already configured to allow you to extend typings of external packages. The logic behind it is based on this official template. To augment a module, just create a folder with the same name as the module you are augmenting and add an index.d.ts in it. Here you can find a real world example.

Automatic Test and Code Coverage

Includes azure-pipelines.yml configuration file. You can build, test and publish code coverage on Azure DevOps for free with GitHub integration for OSS projects.

Dev Dependencies

  • cross-env: sets TS_NODE_PROJECT for running tests with tap/ts-node crossplatform
  • husky: runs precommit lint hook
  • rimraf: removes lib folder crossplatform
  • chokidar-cli: file watcher
  • tap: test runner
  • tap-mocha-reporter: mocha reporter for tap
  • ts-node: runs tests without compiling
  • prettier
  • tslint
  • tslint-config-prettier: makes tslint work nice with prettier
  • typescript

Spread the word

If you use this starter, add this badge to your project to help standardising TS library develpment.

[![built with typescript-lib-starter](](

built with typescript-lib-starter

Example libs built with TypeScript Lib Starter



You can’t perform that action at this time.