-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Error "TS2335" false positive #60669
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
Comments
If this is intentional you can write Duplicate of #49224. |
I don't think it's fully a duplicate because it's not only a problem with instance members ( Moreover,
console.log((class { }).__proto__ === Function.prototype) // true
console.log((class extends Object { }).__proto__ === Object) // true
console.log((class { }).create) // undefined
console.log((class extends Object { }).create) // function create() { [native code] } |
It's still intentional to not allow any |
As I said, it's completely different: console.log((class { }).__proto__ === Function.prototype) // true
console.log((class { }).__proto__ === Function) // false Notice the |
This issue has been marked as "Duplicate" and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
🔎 Search Terms
🕗 Version & Regression Information
⏯ Playground Link
https://www.typescriptlang.org/play/?target=99&ts=5.8.0-dev.20241203#code/FAYwNghgzlAEByB7ATgWwmAwpGsDewsRsALogMonICWAdgOYAUAlPocR8gKYkCuytWAEZYAalhReABy7IAdGUo0GLANzsiAX1gB6HRwNFAiYSwA5JJnJTsEBEGJaYAJ6wARl1jcAZrK60QXAAmsHSwELCBstQAbkE2OFBywJrAoAmw5DIg1BjY0HAEAJBQJBAk1CCwANrkTqiuiGByABbQAJK0JXYBALqMiK4AVgBcsLy0ANa0iADutKxFhdx8ArADg7AAvNukzdSJUsiIZCROMrAAPhcS0rI1dQ1NrVAdXf5cfevM6oXaeoYAwFA4gmcy3Kw2OxrRwudyeLg+bjvYKhcKRGixYLgfJJFKgBxQRpcORgRBMAgcdajPDaOhvAKILwZLI5LAJAA0wK5AP+XgwUC4GhCnVGtC4M2ZXGyuQSLGF9K4jMl0rZ+U5XP+VF4go4h2OiFGmSlrLyMDkepOZw8dNK7yVRpVpqg6o4muQ2qFFsQAH1pmhRkg0DKcV7Tucbd1FUzA+hVTAXbz+TriCVkKLxQgULGnXLxAAiPPcouA-55oRVdZSkiwADyQyrPTzyW+QA
💻 Code
🙁 Actual behavior
The error "TS2335" is shown for the two marked lines of code
🙂 Expected behavior
The code works as a charm when executed, so I think the error shouldn't come up in those cases, since is probably a false positive
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: