Getting started

Last updated 2 months ago

The core module of SugoiJS supplies the main classes and functions which are used by sugois' modules.

npm version Build Status codecov


@sugoi/core define some of the basic features of SugoiJS, like:

  • Extendable exception classes.

  • Singleton objects & injections (powered by InversifyJS).

  • Policies - argument validator + decorator implementation.


npm install --save @sugoi/core


Under your tsconfig - compilerOptions set:

  • "target": "es2015"

  • "emitDecoratorMetadata": true

  • "experimentalDecorators": true

  • "lib": ["es2015","dom"]


You can use the config template which was set for the @sugoi/demo application:

"compilerOptions": {
"baseUrl": "./src",
"allowJs": true,
"target": "es2015",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
"typeRoots": [
"types": [