Skip to content

resolveTypeofAliases

Resolve typeof aliasName patterns where aliasName is an import alias. E.g., typeof momentInstance → typeof moment when import { moment as momentInstance }.

Import:

import { resolveTypeofAliases } from '@mnaoumov/typescript-dev-toolkit/docs-site/api-doc-jsdoc';

Signature:

function resolveTypeofAliases(typeText: string, sourceFile: SourceFile): string

Parameters:

Parameter Type Description
typeText string The type text.
sourceFile SourceFile The source file holding the imports.

Returns: string — The type text with the original names.