chore: less warnings for docs generation (#9864)

* Hides the warnings about unresolved TypeScript symbols for the mixin base classes. Those warnings are not fixable and are polluting the Dgeni output.
* Adds missing `@deprecated` tags to entries that already have the  `@deletion-target` set.
* Updates to the latest version of dgeni-packages because https://github.com/angular/dgeni-packages/commit/3a4e5685589b99b85dfb88e8fd8dbf46aab24088 landed.
This commit is contained in:
Paul Gschwendtner
2018-02-09 23:19:05 +01:00
committed by mmalerba
parent ca37a7ff28
commit cf54802e44
5 changed files with 37 additions and 3 deletions
+4
View File
@@ -1,4 +1,5 @@
import {Package} from 'dgeni';
import {patchLogService} from './patch-log-service';
import {DocsPrivateFilter} from './processors/docs-private-filter';
import {Categorizer} from './processors/categorizer';
import {FilterDuplicateExports} from './processors/filter-duplicate-exports';
@@ -79,6 +80,9 @@ apiDocsPackage.config((readFilesProcessor: any, writeFilesProcessor: any) => {
writeFilesProcessor.outputFolder = outputDir;
});
// Patches Dgeni's log service to not print warnings about unresolved mixin base symbols.
apiDocsPackage.config((log: any) => patchLogService(log));
// Configure the output path for written files (i.e., file names).
apiDocsPackage.config((computePathsProcessor: any) => {
computePathsProcessor.pathTemplates = [{
+24
View File
@@ -0,0 +1,24 @@
/**
* Function that patches Dgeni's instantiated log service. The patch will hide warnings about
* unresolved TypeScript symbols for the mixin base classes.
*
* ```
* warn: Unresolved TypeScript symbol(s): _MatToolbarMixinBase - doc "lib/toolbar/MatToolbar"
* (class) - from file "lib/toolbar/toolbar.ts" - starting at line 37, ending at line 98
* ```
*
* Those warnings are valid, but are not fixable because the base class is created dynamically
* through mixin functions and will be stored as a constant.
*/
export function patchLogService(log: any) {
const _warnFn = log.warn;
log.warn = function(message: string) {
if (message.includes('Unresolved TypeScript symbol') && message.includes('MixinBase')) {
return;
}
_warnFn.apply(this, [message]);
};
}