This repository is a short demonstration of how you can make your NPM package configurable in terms of types.
Repository consist of 3 packages:
package1
is a really simple NPM package that shows the basics of configurable types;package2
is an NPM package that provides a few realistic example of configurable types usage, such as:- Strict types for register/usage approach
- Choosing decorators types - legacy (< TS v.5) or modern (>= TS v.5)
main
is an NPM package that shows can package above be used and configured.
Themain
package consists of several unit-tests for types. Usage each of the above packages is presented in themain/tests
directory.
To run tests and check all types are applied right, run
npm t