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

📎 Allow empty type parameter list for interfaces and type aliases #1237

Closed
Conaclos opened this issue Dec 17, 2023 · 3 comments · Fixed by #1350
Closed

📎 Allow empty type parameter list for interfaces and type aliases #1237

Conaclos opened this issue Dec 17, 2023 · 3 comments · Fixed by #1350
Assignees
Labels
A-Parser Area: parser L-JavaScript Language: JavaScript and super languages S-Help-wanted Status: you're familiar with the code base and want to help the project

Comments

@Conaclos
Copy link
Member

Description

TypeScript allows interface declarations and type aliases to have empty type parameter lists. Biome parser doesn't allow empty type parameter lists.

interface Foo<> {}
type Bar<> = {}

TypeScript Playground
Biome playground

Biome should accept empty type parameter lists from interfaces and type aliases.

This was recently fixed in ESbuil.

@Conaclos Conaclos added S-Help-wanted Status: you're familiar with the code base and want to help the project A-Parser Area: parser L-JavaScript Language: JavaScript and super languages labels Dec 17, 2023
@ematipico
Copy link
Member

I wonder why such a thing is allowed

@Conaclos
Copy link
Member Author

Conaclos commented Dec 17, 2023

I wonder why such a thing is allowed

Yeah, I dream of a simpler version of TypeScript... By the way, Flow forbids empty type parameter lists.

Once fixed, we should add a linter rule noEmptyTypeParameters.

@togami2864
Copy link
Contributor

togami2864 commented Dec 23, 2023

I'll take a look this later:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Parser Area: parser L-JavaScript Language: JavaScript and super languages S-Help-wanted Status: you're familiar with the code base and want to help the project
Projects
None yet
3 participants