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

Combination of brackets and functions inside ternary operator produce error #11582

Closed
alexanderby opened this issue Oct 13, 2016 · 2 comments
Closed
Labels
Bug A bug in TypeScript
Milestone

Comments

@alexanderby
Copy link

The following code produces error Identifier expected.

var x = true ? ({ y: function () { } }) : { y: function () { } };

Seems like TSLS thinks I'm declaring a type after :.

@alexanderby alexanderby changed the title Combination of braces and functions inside ternary operator produces error Combination of braces and functions inside ternary operator produce error Oct 13, 2016
@alexanderby alexanderby changed the title Combination of braces and functions inside ternary operator produce error Combination of brackets and functions inside ternary operator produce error Oct 13, 2016
@mhegazy mhegazy added the Bug A bug in TypeScript label Oct 13, 2016
@mhegazy mhegazy added this to the Future milestone Oct 13, 2016
@mhegazy mhegazy assigned mhegazy and unassigned vladima Mar 24, 2017
@Andarist
Copy link
Contributor

Andarist commented Jan 8, 2023

@RyanCavanaugh this one works OK today, you can close the issue :)

@jakebailey
Copy link
Member

Yes, this was fixed in #19979.

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

No branches or pull requests

5 participants