本文整理匯總了TypeScript中@angular/compiler.AotSummaryResolver.getSymbolsOf方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript AotSummaryResolver.getSymbolsOf方法的具體用法?TypeScript AotSummaryResolver.getSymbolsOf怎麽用?TypeScript AotSummaryResolver.getSymbolsOf使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類@angular/compiler.AotSummaryResolver
的用法示例。
在下文中一共展示了AotSummaryResolver.getSymbolsOf方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: it
it('should fill importAs for deep symbols', () => {
const libSymbol = symbolCache.get('/lib.d.ts', 'Lib');
const srcSymbol = symbolCache.get('/src.ts', 'Src');
init({
'/src.ngsummary.json':
serialize([{symbol: srcSymbol, metadata: 1}, {symbol: libSymbol, metadata: 2}])
});
summaryResolver.getSymbolsOf('/src.d.ts');
expect(summaryResolver.getImportAs(symbolCache.get('/src.d.ts', 'Src'))).toBeFalsy();
expect(summaryResolver.getImportAs(libSymbol))
.toBe(symbolCache.get('/src.ngfactory.d.ts', 'Lib_1'));
});
示例2: it
it('should return all sumbols in a summary', () => {
const asymbol = symbolCache.get('/a.d.ts', 'a');
init({'/a.ngsummary.json': serialize([{symbol: asymbol, metadata: 1}], [])});
expect(summaryResolver.getSymbolsOf('/a.d.ts')).toEqual([asymbol]);
});