Files
angular/adev/shared-docs/pipeline/api-gen/rendering/transforms/initializer-api-functions-transform.mts
T
Matthieu Riegler ca700e1def docs(docs-infra): Improve formatting of functions (#61154)
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
2025-05-16 13:58:35 +00:00

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)),
),
),
),
),
);
}