Skip to content

simplifyType

Strip the import("…") qualifiers ts-morph prints before a type that is not in scope, recording each one’s declaration file first, since it is the one place a printed type names where it was declared.

Import:

import { simplifyType } from '@mnaoumov/typescript-dev-toolkit/docs-site/api-doc-text-utils';

Signature:

function simplifyType(typeText: string): string

Parameters:

Parameter Type Description
typeText string The printed type.

Returns: string — The type without its import qualifiers.