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

make (no) space after type assertion user configurable #10402

Merged
merged 1 commit into from
Sep 14, 2016

Conversation

kevinlang
Copy link

Fixes #10362

@msftclas
Copy link

Hi @gnalck, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla.microsoft.com.

TTYL, MSBOT;

@msftclas
Copy link

@gnalck, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR.

Thanks, MSBOT;

@@ -1356,6 +1356,7 @@ namespace ts {
InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: boolean;
InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: boolean;
InsertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean;
InsertSpaceAfterTypeAssertion: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be optional, otherwise all users of the API have to specify it.

@mhegazy
Copy link
Contributor

mhegazy commented Sep 13, 2016

@gnalck thanks for the PR, and extremely sorry for the delay.

can you refresh the PR against master. modulo one comment, I think this PR is ready to go.

@mhegazy mhegazy self-assigned this Sep 14, 2016
@mhegazy
Copy link
Contributor

mhegazy commented Sep 14, 2016

manually merged. thanks!

@mhegazy mhegazy merged commit 2b72751 into microsoft:master Sep 14, 2016
@kevinlang
Copy link
Author

sweet, thanks!

@ydogandjiev
Copy link

@mhegazy, @gnalck, hey guys, I'm super excited to use this feature in order to make the auto-format functionality compliant with my team's tslint rules. Unfortunately, I can't seem to set the insertSpaceAfterTypeAssertion option in my VSCode settings. It doesn't appear as an option and even if I manually enter it, the setting seems to have no effect:
"typescript.format.insertSpaceAfterTypeAssertion": true,

What am I missing here? Has this feature been officially released yet?

@csentis
Copy link

csentis commented Mar 13, 2017

@ydogandjiev I had asked the same in microsoft/vscode#10296 - glad to see that it got assigned to @mjbvz. Looking forward to this implemented, too!

@lucap86
Copy link

lucap86 commented Mar 23, 2017

I have a trouble with this feature.

with

let a = <number[]>["1", "2", "3", "4"]

no space is added after <number[]>

otherwise if i have

let a = <number>"1"

it correctly add a space after <number>

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants