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

Consider making "a" as "b" a compile error #22150

Closed
ghost opened this issue Feb 23, 2018 · 2 comments
Closed

Consider making "a" as "b" a compile error #22150

ghost opened this issue Feb 23, 2018 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@ghost
Copy link

ghost commented Feb 23, 2018

TypeScript Version: 2.8.0-dev.20180223

Search Terms: string literal type assertion

Code

"a" as "b"

Expected behavior:

Error: type "a" can not be converted to type "b".

Actual behavior:

No error.

Related Issues: #10195, which would make it so that no one would need to write "a" as "a".

@gcnew
Copy link
Contributor

gcnew commented Feb 23, 2018

I proposed this a year ago. See #14156 and #14161.

@ghost
Copy link
Author

ghost commented Feb 23, 2018

D'oh, thanks.

@ghost ghost closed this as completed Feb 23, 2018
@mhegazy mhegazy added the Duplicate An existing issue was already created label Feb 27, 2018
@microsoft microsoft locked and limited conversation to collaborators Jul 3, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

2 participants