{"library":"rollup-plugin-flat-dts","title":"rollup-plugin-flat-dts","description":"A Rollup plugin that flattens TypeScript .d.ts declaration files into a single bundle, generating a merged type definition file. Current stable version 2.9.0 supports Rollup 2.79.1–5.0 and TypeScript 4.8.4–5.8. It differs from other .d.ts bundlers by flattening instead of merging, which imposes strict constraints: all exports are public (use @internal to mark internals), default exports only at top level, and no renamed re-exports. Ideal for libraries that want a single type file and can adhere to its limitations. Released roughly twice a year, tracking TypeScript minor versions.","language":"javascript","status":"active","last_verified":"Mon Apr 27","install":{"commands":["npm install rollup-plugin-flat-dts"],"cli":null},"imports":["import flatDts from 'rollup-plugin-flat-dts'","import type { FlatDtsOptions } from 'rollup-plugin-flat-dts'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import commonjs from '@rollup/plugin-commonjs';\nimport nodeResolve from '@rollup/plugin-node-resolve';\nimport flatDts from 'rollup-plugin-flat-dts';\nimport ts from 'rollup-plugin-typescript2';\n\nexport default {\n  input: './src/index.ts',\n  plugins: [commonjs(), ts(), nodeResolve()],\n  output: {\n    format: 'esm',\n    file: 'dist/index.js',\n    plugins: [flatDts({ tsconfig: 'tsconfig.json' })],\n  },\n};","lang":"typescript","description":"Rollup config producing a single .js and flattened .d.ts. Demonstrates typical setup with TypeScript plugin and the flatDts output plugin.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}