Skip to content

Latest commit

 

History

History
39 lines (30 loc) · 1.54 KB

installation.md

File metadata and controls

39 lines (30 loc) · 1.54 KB

Installation

You can get the latest release and the type definitions using npm:

npm install inversify@5.0.5 reflect-metadata --save

Or using yarn:

yarn add inversify@5.0.5 reflect-metadata

The InversifyJS type definitions are included in the inversify npm package. InversifyJS requires the experimentalDecorators, emitDecoratorMetadataand lib compilation options in your tsconfig.json file.

{
    "compilerOptions": {
        "target": "es5",
        "lib": ["es6"],
        "types": ["reflect-metadata"],
        "module": "commonjs",
        "moduleResolution": "node",
        "experimentalDecorators": true,
        "emitDecoratorMetadata": true
    }
}

InversifyJS requires a modern JavaScript engine with support for:

If your environment don't support one of these you will need to import a shim or polyfill.

Check out the Environment support and polyfills page in the wiki to learn more.