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:
@ -49,7 +49,7 @@ DtsSerializer.prototype = {
|
||||
},
|
||||
|
||||
member: function(buffer, ast) {
|
||||
if (ast.private) return;
|
||||
if (ast.private || ast.internal) return;
|
||||
|
||||
buffer.push('\n');
|
||||
this.comment(buffer, ast.content);
|
||||
|
@ -25,22 +25,22 @@ describe('createTypeDefinitionFile processor', function() {
|
||||
|
||||
|
||||
|
||||
describe('classes with private constructors', function() {
|
||||
|
||||
describe('classes with @internal constructors', function() {
|
||||
|
||||
it('should convert heritage from `implements` into `extends`', function() {
|
||||
|
||||
|
||||
// Create some mock docs for testing
|
||||
var docs = [
|
||||
{
|
||||
id: 'angular2/angular2',
|
||||
exports: [
|
||||
{ docType: 'class', heritage: 'implements Xyz', constructorDoc: { private: true } }
|
||||
{ docType: 'class', heritage: 'implements Xyz', constructorDoc: { internal: true } }
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
docs = processor.$process(docs);
|
||||
|
||||
|
||||
expect(docs.length).toEqual(1);
|
||||
expect(docs[0].docType).toEqual('type-definition');
|
||||
|
||||
@ -49,5 +49,5 @@ describe('createTypeDefinitionFile processor', function() {
|
||||
expect(moduleDoc.exports[0].heritage).toEqual('extends Xyz');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
Reference in New Issue
Block a user