Skip to content

VSCode "Format Code" causes tslint failure with (old-school) type assertions #10362

Closed
@LOZORD

Description

@LOZORD

Preceded by https://github.com/Microsoft/vscode-tslint/issues/69 and microsoft/vscode#10296

TypeScript Version: 1.8.0

Code

If I have code like this:

const bar = <Bar> Thing.getFoo();

and then "Format Code" in VSCode (alt-shift-F on Mac), I get this:

const bar = <Bar>Thing.getFoo();

Expected behavior:

The spacing should not have been changed. (Note: without a specific setting, this causes a failure with tslint.)

Actual behavior:

The space after the old-school/bracket-style type assertion is removed, causing a tslint error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedA PR has been merged for this issueHelp WantedYou can do thisSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions