Getting Started

Requirements

Installation

  1. To use typend with your app:
npm install typend tsruntime ttypescript reflect-metadata

or

yarn add typend tsruntime ttypescript reflect-metadata
  1. Add new tsconfig.json:
{
"compilerOptions": {
"declaration": true,
"declarationDir": "./dist",
"emitDecoratorMetadata": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"lib": ["esnext"],
"module": "ESNext",
"moduleResolution": "node",
"noImplicitAny": false,
"noResolve": false,
"noUnusedLocals": true,
"noUnusedParameters": false,
"outDir": "./dist",
"plugins": [
{
"transform": "tsruntime/dist/transform/transformer.js",
"type": "program"
}
],
"preserveConstEnums": true,
"removeComments": true,
"sourceMap": true,
"strictNullChecks": true,
"strictPropertyInitialization": false,
"suppressImplicitAnyIndexErrors": false,
"target": "es2018",
"useDefineForClassFields": false
},
"include": ["src/**/*.ts"],
"exclude": ["node_modules"]
}

or change existing one:

{
"compilerOptions": {
"experimentalDecorators": true,
"plugins": [
{
"transform": "tsruntime/dist/transform/transformer.js",
"type": "program"
}
]
}
}