@mui/internal-docs-infra
Version:
MUI Infra - internal documentation creation tools.
10 lines • 505 B
text/typescript
/**
* Strips TypeScript types and decorators from code (including JSX in TSX),
* preserving line numbers so source maps and diff tooling stay aligned.
*
* @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/JSX parsing is enabled.
* @returns The transformed code with TypeScript syntax removed.
*/
export declare function removeTypes(code: string, filename?: string): Promise<string>;