feat(typings): allow declaration of reference paths
Without this feature, each bundle would have to create its own typings template to include references to dependent typings. Now, the references can be declared in JS, along with other meta information about the bundle typings. Closes #3540
This commit is contained in:
@ -42,20 +42,23 @@ module.exports = new Package('angular-v2-docs', [jsdocPackage, nunjucksPackage,
|
||||
'angular2/router.ts'
|
||||
];
|
||||
readTypeScriptModules.basePath = path.resolve(path.resolve(__dirname, '../../modules'));
|
||||
|
||||
|
||||
createTypeDefinitionFile.typeDefinitions = [
|
||||
{
|
||||
id: 'angular2/angular2',
|
||||
references: ['../es6-promise/es6-promise.d.ts', '../rx/rx.d.ts'],
|
||||
modules: {
|
||||
'angular2/angular2': 'angular2/angular2',
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'angular2/router',
|
||||
//Right now the typings live in the same directory, but eventually will not. See #3458
|
||||
references: ['../angular2/angular2.d.ts'],
|
||||
modules: {
|
||||
'angular2/router': 'angular2/router'
|
||||
}
|
||||
}
|
||||
}
|
||||
];
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user