A lightweight zero-dependency minifier for TypeScript declaration files (.d.ts). Version 0.5.6 (maintained, active development on GitHub). It reduces file size by removing whitespace, comments, and shortening identifiers in declaration files. Unlike alternatives like dts-minify, it has no runtime dependencies and focuses purely on minification without transforming code.
npm install dts-minify-liteNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Reads a .d.ts file, minifies its content, and writes the output to a new file.
Access result.code instead of using result directly as a string.
Validate d.ts content before minifying.
Update configuration to use 'removeComments' and 'minifyIdentifiers'.
Set 'minifyIdentifiers' to false unless you control all code consuming the d.ts.
Use import { minify } from 'dts-minify-lite'Update to v0.4.0+ and access result.code
Ensure input is valid .d.ts file, possibly pre-parse with TypeScript compiler.
No dependency data recorded yet.