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:
@ -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';
|
||||
|
@ -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'
|
||||
}
|
||||
];
|
||||
|
Reference in New Issue
Block a user