{"id":14156635,"url":"https://github.com/wobsoriano/bun-plugin-dts","last_synced_at":"2025-04-12T16:49:03.917Z","repository":{"id":184689653,"uuid":"672314796","full_name":"wobsoriano/bun-plugin-dts","owner":"wobsoriano","description":"A Bun plugin for generating dts files.","archived":false,"fork":false,"pushed_at":"2024-10-08T18:36:26.000Z","size":167,"stargazers_count":96,"open_issues_count":2,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-04T00:01:29.474Z","etag":null,"topics":["build","bun","dts","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wobsoriano.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-29T16:45:28.000Z","updated_at":"2025-03-21T16:06:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"b2396c8f-8c9e-4379-bc67-53814915bc12","html_url":"https://github.com/wobsoriano/bun-plugin-dts","commit_stats":{"total_commits":46,"total_committers":5,"mean_commits":9.2,"dds":0.08695652173913049,"last_synced_commit":"6378aa3d9c6c5a69223bde098f6ba91087105383"},"previous_names":["wobsoriano/bun-plugin-dts"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wobsoriano%2Fbun-plugin-dts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wobsoriano%2Fbun-plugin-dts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wobsoriano%2Fbun-plugin-dts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wobsoriano%2Fbun-plugin-dts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wobsoriano","download_url":"https://codeload.github.com/wobsoriano/bun-plugin-dts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248601101,"owners_count":21131607,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build","bun","dts","typescript"],"created_at":"2024-08-17T08:07:26.799Z","updated_at":"2025-04-12T16:49:03.895Z","avatar_url":"https://github.com/wobsoriano.png","language":"TypeScript","funding_links":[],"categories":["typescript"],"sub_categories":[],"readme":"# bun-plugin-dts\n\nA Bun plugin for generating `.d.ts` files.\n\n## Install\n\n```bash\nbun add -d bun-plugin-dts\n```\n\n## Usage\n\n```ts\nimport dts from 'bun-plugin-dts'\n\nawait Bun.build({\n  entrypoints: ['./src/index.ts', './src/other/foo.ts'],\n  outdir: './dist',\n  plugins: [\n    dts()\n  ],\n})\n\n// Generates `dist/index.d.ts` and `dist/other/foo.d.ts`\n```\n\n## Options\n\nThis plugin utilizes [dts-bundle-generator](https://github.com/timocov/dts-bundle-generator) internally, allowing you to easily customize its behavior by passing specific options for dts-bundle-generator.\n\n```ts\ntype Options = {\n  libraries?: LibrariesOptions;\n  /**\n   * Fail if generated dts contains class declaration.\n   */\n  failOnClass?: boolean;\n  output?: OutputOptions;\n  compilationOptions?: CompilationOptions;\n}\n\ninterface LibrariesOptions {\n  /**\n   * Array of package names from node_modules to inline typings from.\n   * Used types will be inlined into the output file.\n   */\n  inlinedLibraries?: string[];\n  /**\n   * Array of package names from node_modules to import typings from.\n   * Used types will be imported using `import { First, Second } from 'library-name';`.\n   * By default all libraries will be imported (except inlined libraries and libraries from @types).\n   */\n  importedLibraries?: string[];\n  /**\n   * Array of package names from @types to import typings from via the triple-slash reference directive.\n   * By default all packages are allowed and will be used according to their usages.\n   */\n  allowedTypesLibraries?: string[];\n}\n\ninterface OutputOptions {\n  /**\n   * Sort output nodes in ascendant order.\n   */\n  sortNodes?: boolean;\n  /**\n   * Name of the UMD module.\n   * If specified then `export as namespace ModuleName;` will be emitted.\n   */\n  umdModuleName?: string;\n  /**\n   * Enables inlining of `declare global` statements contained in files which should be inlined (all local files and packages from inlined libraries).\n   */\n  inlineDeclareGlobals?: boolean;\n  /**\n   * Enables inlining of `declare module` statements of the global modules\n   * (e.g. `declare module 'external-module' {}`, but NOT `declare module './internal-module' {}`)\n   * contained in files which should be inlined (all local files and packages from inlined libraries)\n   */\n  inlineDeclareExternals?: boolean;\n  /**\n   * Allows remove \"Generated by dts-bundle-generator\" comment from the output\n   */\n  noBanner?: boolean;\n  /**\n   * Enables stripping the `const` keyword from every direct-exported (or re-exported) from entry file `const enum`.\n   * This allows you \"avoid\" the issue described in https://github.com/microsoft/TypeScript/issues/37774.\n   */\n  respectPreserveConstEnum?: boolean;\n  /**\n   * By default all interfaces, types and const enums are marked as exported even if they aren't exported directly.\n   * This option allows you to disable this behavior so a node will be exported if it is exported from root source file only.\n   */\n  exportReferencedTypes?: boolean;\n}\n\ninterface CompilationOptions {\n  /**\n   * Allows disable resolving of symlinks to the original path.\n   * By default following is enabled.\n   * @see https://github.com/timocov/dts-bundle-generator/issues/39\n   */\n  followSymlinks?: boolean;\n  /**\n   * Path to the tsconfig file that will be used for the compilation.\n   */\n  preferredConfigPath?: string;\n}\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwobsoriano%2Fbun-plugin-dts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwobsoriano%2Fbun-plugin-dts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwobsoriano%2Fbun-plugin-dts/lists"}