/
githubmirror
/
angular
Обзор
Документация
Войти
/
githubmirror
/
angular
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
adev/shared-docs/pipeline/api-gen/rendering/transforms/params-transforms.mts
34 строки
1 KB
Matthieu Riegler
docs(docs-infra): Show function args
18 май 2026, 23:22
18 май 2026, 23:22
872853f
Код
Авторство
О чём код?
/*! * @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 {HasModuleName, HasParams, HasRenderableParams} from '../entities/traits.mjs'; import {addHtmlDescription, getHtmlForJsDocText} from './jsdoc-transforms.mjs'; import {addModuleName} from './module-name.mjs'; export function addRenderableFunctionParams<T extends HasParams & HasModuleName>( entry: T, ): T & HasRenderableParams { const params = entry.params.map((param) => addHtmlDescription(addModuleName(param, entry.moduleName)), ); return { ...entry, params, }; } /** Converts `returnDescription` to `htmlReturnDescription` for rendering. */ export function addHtmlReturnDescription< T extends {returnDescription?: string; moduleName: string}, >(entry: T): T & {htmlReturnDescription?: string} { const htmlReturnDescription = entry.returnDescription ? getHtmlForJsDocText(entry.returnDescription) : undefined; return {...entry, htmlReturnDescription}; }