I have defined the following Angular2 component:
import {Component} from \'angular2/core\';
@Component({
selector: \'my-app\',
moduleId: module.id,
te
Two key points:
Register typings by running typings install dt~node --global --save
. So you'll get the following section in typings.json
:
"globalDependencies": {
"node": "registry:dt/node#6.0.0+20160608110640"
}
Add reference to the new module. Two ways:
Directly add a reference to a dependency in your TS
///
Add typings/index.d.ts
in the files
section of the tsconfig.json
{
"files": [
"typings/index.d.ts"
]
}
See more here.