chore(docs): rename @private to @internal

The latter is understood by TypeScript's --stripInternal option, so this lets us
rely more on the tooling provided by typescript team.
This commit is contained in:
Alex Eagle
2015-10-02 13:32:48 -07:00
parent 4a36fd8203
commit f7aa890ade
38 changed files with 98 additions and 94 deletions

View File

@ -4,8 +4,8 @@ module.exports = function convertPrivateClassesToInterfaces() {
return function(exportDocs, addInjectableReference) {
_.forEach(exportDocs, function(exportDoc) {
// Search for classes with a constructor marked as `@private`
if (exportDoc.docType === 'class' && exportDoc.constructorDoc && exportDoc.constructorDoc.private) {
// Search for classes with a constructor marked as `@internal`
if (exportDoc.docType === 'class' && exportDoc.constructorDoc && exportDoc.constructorDoc.internal) {
// Convert this class to an interface with no constructor
exportDoc.docType = 'interface';

View File

@ -11,13 +11,13 @@ describe('readTypeScriptModules', function() {
convertPrivateClassesToInterfaces = injector.get('convertPrivateClassesToInterfaces');
});
it('should convert private class docs to interface docs', function() {
it('should convert @internal class docs to interface docs', function() {
var docs = [
{
docType: 'class',
name: 'privateClass',
id: 'privateClass',
constructorDoc: { private: true }
constructorDoc: { internal: true }
}
];
convertPrivateClassesToInterfaces(docs, false);
@ -25,7 +25,7 @@ describe('readTypeScriptModules', function() {
});
it('should not touch non-private class docs', function() {
it('should not touch non-internal class docs', function() {
var docs = [
{
docType: 'class',
@ -45,7 +45,7 @@ describe('readTypeScriptModules', function() {
docType: 'class',
name: 'privateClass',
id: 'privateClass',
constructorDoc: { private: true },
constructorDoc: { internal: true },
heritage: 'implements parentInterface'
}
];
@ -60,7 +60,7 @@ describe('readTypeScriptModules', function() {
docType: 'class',
name: 'privateClass',
id: 'privateClass',
constructorDoc: { private: true },
constructorDoc: { internal: true },
heritage: 'implements parentInterface'
}
];