本文整理汇总了TypeScript中dgeni.DocCollection.find方法的典型用法代码示例。如果您正苦于以下问题:TypeScript DocCollection.find方法的具体用法?TypeScript DocCollection.find怎么用?TypeScript DocCollection.find使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dgeni.DocCollection
的用法示例。
在下文中一共展示了DocCollection.find方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: 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');
});
示例2: it
it('should extract all content from the comments', () => {
processor.sourceFiles = [ 'commentContent.ts' ];
const docs: DocCollection = [];
processor.$process(docs);
const someClassDoc = docs.find(doc => doc.name === 'SomeClass');
expect(someClassDoc.content).toEqual('@empty');
const fooDoc = docs.find(doc => doc.name === 'foo');
expect(fooDoc.content).toEqual('The description\n@tag1\ntag info');
const barDoc = docs.find(doc => doc.name === 'bar');
expect(barDoc.content).toEqual('@name bar\n@description\ndescription of bar {@inline-tag} more content');
});