Intention is to collect useful abstract type operators in one place, so you can stop copying and pasting these solutions into project after project. Library is designed to be fully static, i.e. it has no runtime component, only a type definition file.
Branch | Status |
---|---|
master | |
develop |
Install as any other npm package, preferably as development dependency.
# NPM
npm i tstt --save-dev
# Yarn
yarn add tstt --dev
-
Import types you want to use:
import { ... } from "tstt"
. -
Enable enhancements of native TypeScript types by including any of lib.*.d.ts files. your tsconfig.json:
# tsconfig.json
"compilerOptions": { ... }
"include": {
"node_modules/tstt/lib/lib.es5.d.ts"
}
or by using Triple-Slash Directives:
/// <reference path="../../lib/lib.es2015.reflect.d.ts"/>
Read contribution guide to learn about development process.