本文整理汇总了TypeScript中dgeni.DocCollection类的典型用法代码示例。如果您正苦于以下问题:TypeScript DocCollection类的具体用法?TypeScript DocCollection怎么用?TypeScript DocCollection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了DocCollection类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: getProcessedDocs
function getProcessedDocs() {
const docs: DocCollection = [];
processor.sourceFiles = ['exportAliases.ts'];
processor.$process(docs);
const [originalExport, aliasedExport] = docs.filter(doc => doc.docType === 'class') as ClassExportDoc[];
return {originalExport, aliasedExport};
}
示例2: it
it('should not strip namespaces in return types', () => {
processor.sourceFiles = ['stripNamespaces.ts'];
const docs: DocCollection = [];
processor.$process(docs);
const functionDoc = docs.find(doc => doc.docType === 'function');
expect(functionDoc.type).toEqual('angular.IDirective');
});
示例3: beforeEach
beforeEach(() => {
processor.sourceFiles = [ 'memberAliases.ts'];
docs = [];
processor.$process(docs);
fn = docs.find(doc => doc.name === 'fn');
[foo, foo1, foo2] = docs.filter(doc => doc.name === 'foo');
bar = docs.find(doc => doc.name === 'bar');
});