Skip to content

substituteTypeParams

Substitute generic type parameters in a type string using a mapping

Import:

import { substituteTypeParams } from '@mnaoumov/typescript-dev-toolkit/docs-site/api-doc-type-merging';

Signature:

function substituteTypeParams(typeText: string, mapping: Map<string, string>): string

Parameters:

Parameter Type Description
typeText string The type text.
mapping Map<string, string> Type parameter names mapped to their arguments.

Returns: string — The substituted type text.