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

Support optional-chaining #1727

Closed
Serabe opened this issue Nov 20, 2019 · 1 comment · Fixed by #1779
Closed

Support optional-chaining #1727

Serabe opened this issue Nov 20, 2019 · 1 comment · Fixed by #1779

Comments

@Serabe
Copy link

Serabe commented Nov 20, 2019

Optional chaining is currently at stage 3 and already shipped with TypeScript 3.7. Currently, with the following input:

const obj = {};
obj?.prop?.subprop;

We get the following output:

const obj = {};
obj ? .prop ? .subprop;

Notice the extra spaces around ?. The expected output is the same as the input.

Configuration:

{
"indent_size": "4",
"indent_char": " ",
"max_preserve_newlines": "5",
"preserve_newlines": true,
"keep_array_indentation": false,
"break_chained_methods": false,
"indent_scripts": "normal",
"brace_style": "collapse",
"space_before_conditional": true,
"unescape_strings": false,
"jslint_happy": false,
"end_with_newline": false,
"wrap_line_length": "0",
"indent_inner_html": false,
"comma_first": false,
"e4x": false,
"indent_empty_lines": false
}

@Serabe
Copy link
Author

Serabe commented Nov 20, 2019

Submitting a new issue as @bitwiseman said in #1530 that each item should get its own issue to be tracked.

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

Successfully merging a pull request may close this issue.

2 participants