Skip to content

Implementing a prim type in a class expression should report error #60484

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

Closed
bvanjoi opened this issue Nov 12, 2024 · 1 comment Β· Fixed by #60490
Closed

Implementing a prim type in a class expression should report error #60484

bvanjoi opened this issue Nov 12, 2024 · 1 comment Β· Fixed by #60490
Labels
Bug A bug in TypeScript Help Wanted You can do this
Milestone

Comments

@bvanjoi
Copy link

bvanjoi commented Nov 12, 2024

πŸ”Ž Search Terms

class expression implement primitive type

πŸ•— Version & Regression Information

  • This changed between versions 5.2.2__ and 5.3.3___

⏯ Playground Link

https://www.typescriptlang.org/play/?ts=5.3.3#code/MYewdgzgLgBAgjAvDYAbAhhCMBCMCWAtgA6oCmhZYU2YAroQEZkBOMA3gL4BQ3am2AMIES5StVoNmbLkA

πŸ’» Code

class C implements number {} // report that class cannot implement primitive type

const A = class B implements number {} // this code should report the same error, but it actually does not.

πŸ™ Actual behavior

Refer to the comment above

πŸ™‚ Expected behavior

Refer to the comment above

Additional information about the issue

No response

@jcalz
Copy link
Contributor

jcalz commented Nov 12, 2024

Looks like #55712

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Help Wanted You can do this
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants