dets is a utility for bundling TypeScript declaration files (`.d.ts`) into a single output file. Its primary use case is to create isolated declaration files that do not depend on external declaration packages or to selectively export a public API. Currently at version `0.17.0`, the project appears to have a regular, albeit minor, release cadence with frequent bug fixes and dependency updates, indicating active maintenance. Key differentiators include its ability to ignore, remove, or preserve specific properties and inheritance clauses within declarations using special JSDoc-like comments (`@ignore`, `@dets_preserve`, `@dets_removeprop`, `@dets_removeclause`), offering fine-grained control over the generated declaration file content. It supports both CLI and programmatic usage in Node.js environments.
npm install detsVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates programmatic bundling of TypeScript declaration files using `processFiles`. It creates a temporary project structure, defines interfaces and functions, and then uses `dets` to generate a single `.d.ts` file, respecting `@ignore` comments.
Upgrade your Node.js environment to version 18.17 or higher.
Review the documentation for special comments and ensure they are applied correctly. Use the `--no-ignore` CLI flag or `noIgnore` programmatic option if you wish to disable processing of `@ignore` tags.
Ensure `typescript@^4.0.0 || ^5.0.0` is installed in your project. You might need to update your `package.json` and run `npm install`.
Double-check your `entry` and `files` paths/globs. Use a tool like `glob` or `ls` with your pattern to verify it matches the intended files before running `dets`.
Install 'dets' locally using `npm install --save-dev dets` or globally with `npm install -g dets` if using the CLI globally.
Upgrade your Node.js environment to version 18.17 or newer using `nvm` or your preferred Node.js version manager.
Install 'typescript@^4.0.0 || ^5.0.0' in your project. E.g., `npm install typescript@latest --save-dev`.
Verify that the `entry` and `files` options (CLI flags `--entry`, `--files` or programmatic options) correctly point to your TypeScript source files. Ensure glob patterns are expanded as expected.