IssueRaiser

Generate type declarations during `bun build`

### What is the problem this feature would solve? I'd like to build my library written in typescript with `bun build` (both for dev and prod), but there's no point in doing so if I or my library's users won't have type declarations. I am developing this library in the ecosystem of other projects, so often it looks like `npm run dev:my-library && npm run dev:my-frontend`. This is a common pattern for developing in monorepos. My current solution is `tsc`, which is slow in watch mode and has its drawbacks. ### What is the feature you are proposing to solve the problem? `--type-declarations` flag for `build` command to generate types along with js files. ### What alternatives have you considered? I see no workaround.

Posted by kynnyhsap on Sep 12, 2023, 7:19 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.2,000 issues0 comments

github (Other)

Generate type declarations during `bun build`

kynnyhsapSep 12, 2023, 7:19 PM

### What is the problem this feature would solve? I'd like to build my library written in typescript with `bun build` (both for dev and prod), but there's no point in doing so if I or my library's users won't have type declarations. I am developing this library in the ecosystem of other projects, so often it looks like `npm run dev:my-library && npm run dev:my-frontend`. This is a common pattern for developing in monorepos. My current solution is `tsc`, which is slow in watch mode and has its drawbacks. ### What is the feature you are proposing to solve the problem? `--type-declarations` flag for `build` command to generate types along with js files. ### What alternatives have you considered? I see no workaround.

Comments (0)

No comments yet. Start the discussion.

Comment on this issue