Skip to content

Generate type declarations during bun build #5141

Open

Description

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bundlerSomething to do with the bundlerenhancementNew feature or requesttypescriptSomething for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions