mirror of
https://github.com/angular/angular.git
synced 2026-11-23 07:05:14 -05:00
The commit introduce prettier to format some API entries. For now we'll do only functions are other are a bit more complex because of the support of deprecation. fixes #59211 PR Close #61154
41 lines
1.1 KiB
TypeScript
41 lines
1.1 KiB
TypeScript
/**
|
|
* @license
|
|
* Copyright Google LLC All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
* found in the LICENSE file at https://angular.dev/license
|
|
*/
|
|
|
|
import {InitializerApiFunctionEntry} from '../entities.mjs';
|
|
|
|
import {InitializerApiFunctionRenderable} from '../entities/renderables.mjs';
|
|
|
|
import {addRenderableCodeToc} from './code-transforms.mjs';
|
|
import {
|
|
addHtmlAdditionalLinks,
|
|
addHtmlDescription,
|
|
addHtmlJsDocTagComments,
|
|
addHtmlUsageNotes,
|
|
setEntryFlags,
|
|
} from './jsdoc-transforms.mjs';
|
|
import {addModuleName} from './module-name.mjs';
|
|
import {addRepo} from './repo.mjs';
|
|
|
|
export async function getInitializerApiFunctionRenderable(
|
|
entry: InitializerApiFunctionEntry,
|
|
moduleName: string,
|
|
repo: string,
|
|
): Promise<InitializerApiFunctionRenderable> {
|
|
return setEntryFlags(
|
|
await addRenderableCodeToc(
|
|
addHtmlJsDocTagComments(
|
|
addHtmlUsageNotes(
|
|
addHtmlDescription(
|
|
addHtmlAdditionalLinks(addRepo(addModuleName(entry, moduleName), repo)),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|