Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bun.Transpiler cannot transpile arrow functions with type parameters #15995

Open
aquapi opened this issue Dec 26, 2024 · 0 comments
Open

Bun.Transpiler cannot transpile arrow functions with type parameters #15995

aquapi opened this issue Dec 26, 2024 · 0 comments
Labels
bug Something isn't working needs triage

Comments

@aquapi
Copy link
Contributor

aquapi commented Dec 26, 2024

What version of Bun is running?

1.1.42+50eec0025

What platform is your computer?

Linux 6.8.0-51-generic x86_64 x86_64

What steps can reproduce the bug?

Write a transpile.ts file:

console.log(new Bun.Transpiler({ loader: "tsx" }).transformSync(await Bun.file('./index.ts').text()))

And a index.ts file:

export const t = <T>(x: T): T => x;

What is the expected behavior?

It should transpiles without any errors.

What do you see instead?

1 | export const t = <T>(x: T): T => x;
                        ^
error: Syntax Error
    at input.tsx:1:21

Bun v1.1.42 (Linux x64)

Additional information

No response

@aquapi aquapi added bug Something isn't working needs triage labels Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

1 participant