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

Error 2367 could be wrong #49066

Closed
Raffaello opened this issue May 11, 2022 · 2 comments
Closed

Error 2367 could be wrong #49066

Raffaello opened this issue May 11, 2022 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@Raffaello
Copy link

Raffaello commented May 11, 2022

Bug Report

🔎 Search Terms

🕗 Version & Regression Information

  • This is a crash
  • This changed between versions ______ and _______
  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
  • I was unable to test this on prior versions because _______

⏯ Playground Link

Playground link with relevant code
https://www.typescriptlang.org/play?&msclkid=9d535d68d12a11ecae6af6576a43aaf2#code/MYewdgzgLgBAljAvDA5AFgAwEYVOZrAKFEhABsBTAOjJAHMAKOASiA

💻 Code

// We can quickly address your report if:
//  - The code sample is short. Nearly all TypeScript bugs can be demonstrated in 20-30 lines of code!
//  - It doesn't use external libraries. These are often issues with the type definitions rather than TypeScript bugs.
//  - The incorrectness of the behavior is readily apparent from reading the sample.
// Reports are slower to investigate if:
//  - We have to pare too much extraneous code.
//  - We have to clone a large repo and validate that the problem isn't elsewhere.
//  - The sample is confusing or doesn't clearly demonstrate what's wrong.
// TS2367 (wrong) error
console.log('401' == 401)

🙁 Actual behavior

compiler says it is always false like if it was with triple equals, instead is true with double equal.

🙂 Expected behavior

well it should not report the error in this case

@MartinJohns
Copy link
Contributor

Duplicate of #26592.

@RyanCavanaugh RyanCavanaugh added the Duplicate An existing issue was already created label May 11, 2022
@typescript-bot
Copy link
Collaborator

This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

4 participants