UNPKG

@mui/internal-docs-infra

Version:

MUI Infra - internal documentation creation tools.

13 lines 742 B
import type { Options as PrettierOptions } from 'prettier'; /** * Strips TypeScript types and decorators from code (including React in TSX), * preserving blank lines and optionally formatting with Prettier. * * @param code - The source code string to transform. * @param filename - The name of the file (e.g. "foo.ts" or "Foo.tsx"). * Determines whether TSX parsing is enabled. * @param prettierConfig - `true` for default formatting, `false` to skip, * or a Prettier options object to customize. * @returns The transformed (and optionally formatted) code. */ export declare function removeTypes(code: string, filename?: string, prettierConfig?: PrettierOptions | boolean): Promise<string>;