{"id":23396305,"url":"https://github.com/stuyk/bun-plugin-type-declarations","last_synced_at":"2025-04-11T14:42:17.653Z","repository":{"id":194574030,"uuid":"691367742","full_name":"Stuyk/bun-plugin-type-declarations","owner":"Stuyk","description":"Generate TypeScript declarations with TSC as a bun bundler plugin","archived":false,"fork":false,"pushed_at":"2023-09-14T03:27:27.000Z","size":11,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-25T10:51:11.140Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Stuyk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-09-14T03:23:19.000Z","updated_at":"2024-07-03T00:56:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"1c3cc104-db04-4845-94d4-53363abe4a7f","html_url":"https://github.com/Stuyk/bun-plugin-type-declarations","commit_stats":null,"previous_names":["stuyk/bun-plugin-type-declarations"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stuyk%2Fbun-plugin-type-declarations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stuyk%2Fbun-plugin-type-declarations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stuyk%2Fbun-plugin-type-declarations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stuyk%2Fbun-plugin-type-declarations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Stuyk","download_url":"https://codeload.github.com/Stuyk/bun-plugin-type-declarations/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248420250,"owners_count":21100345,"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":[],"created_at":"2024-12-22T07:34:55.831Z","updated_at":"2025-04-11T14:42:17.635Z","avatar_url":"https://github.com/Stuyk.png","language":"TypeScript","readme":"# bun-plugin-type-declarations\n\nAutomatically build typings for your source code while bundling with Bun.\n\n**Note: Currently Bun related API functionality cannot generate Typings with TSC**\n\n## TSConfig Setup\n\nIf your source files are located in `src/index.ts` your `tsconfig.json` should reflect the following:\n\n```json\n    \"outDir\": \"build\",\n    \"composite\": false,\n    \"rootDir\": \"./src\",\n```\n\n**At the minimum `composite` must be set to false.**\n\n## Bundling\n\nInstall this package with `bun`.\n\n```bash\nbun install -d bun-plugin-type-declarations\n```\n\nCreate a `build.ts` file that bundles your source code.\n\n`BunTypeDeclarations` takes a `tsconfig.json` absolute path to generate your typings.\n\n```ts\nimport BunTypeDeclarations from 'bun-plugin-type-declarations';\n\nawait Bun.build({\n    entrypoints: ['./src/index.ts'],\n    outdir: './build',\n    plugins: [BunTypeDeclarations('tsconfig.json')],\n    target: 'node',\n    minify: true,\n}).catch((err) =\u003e {\n    console.log(err);\n});\n```\n\n## Bundling Issues\n\nIf you run into the following error:\n\n```\nsrc/index.ts(10,60): error TS4060: Return type of exported function has or is using private name 'BunPlugin'.\n```\n\nThere is currently nothing that can be done about this other than not using `Bun` related functionality directly. This means we can't really have Typings exported for Bun related functionality.\n\nThis message will be removed if it ever gets fixed.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstuyk%2Fbun-plugin-type-declarations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstuyk%2Fbun-plugin-type-declarations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstuyk%2Fbun-plugin-type-declarations/lists"}