Skip to content

Improve error message for using ^ on boolean values #712

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
sophiajt opened this issue Sep 19, 2014 · 3 comments
Closed

Improve error message for using ^ on boolean values #712

sophiajt opened this issue Sep 19, 2014 · 3 comments
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue Help Wanted You can do this

Comments

@sophiajt
Copy link
Contributor

From #587 -

We should give a better, more helpful error message when the ^ operator is used on boolean values.

From the comment:

Given this decision, may I suggest improving the error message to state something akin to the following?

"error TS0000: The ^ operator is not allowed for boolean types. Consider using !== instead."

@danquirk danquirk added the Bug A bug in TypeScript label Sep 22, 2014
@sophiajt sophiajt added this to the Community milestone Sep 30, 2014
@DanielRosenwasser DanielRosenwasser added the Help Wanted You can do this label Oct 1, 2014
@chrisbubernak
Copy link
Contributor

If no one is working on this already I'd like to give this a shot. I've spoken with @DanielRosenwasser and have a pretty good idea of how I want to tackle it.

@mhegazy
Copy link
Contributor

mhegazy commented Oct 2, 2014

thanks @chrisbubernak. go for it :)

mhegazy added a commit that referenced this issue Oct 5, 2014
@chrisbubernak
Copy link
Contributor

This was fixed in pr #823.

@DanielRosenwasser DanielRosenwasser added the Fixed A PR has been merged for this issue label Oct 5, 2014
@mhegazy mhegazy closed this as completed Oct 6, 2014
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue Help Wanted You can do this
Projects
None yet
Development

No branches or pull requests

5 participants