-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: FormatterThe issue relates to the built-in formatterThe issue relates to the built-in formatterHelp WantedYou can do thisYou can do this
Milestone
Description
This is a follow up to #19493
TypeScript Version: 2.9.2
Search Terms: insertSpaceBeforeTypeAnnotation formatter
Code
function RGBtoHSB(param1 : Int, param2?: Int, param3?: Int)
{
}
interface SquareConfig
{
color : string;
width?: number;
}
Expected behavior:
With insertSpaceBeforeTypeAnnotation=true, I'd expect this to be formatted as:
function RGBtoHSB(param1 : Int, param2 ?: Int, param3 ?: Int)
{
}
interface SquareConfig
{
color : string;
width ?: number;
}
Note the whitespace (
) before the questionmark (?
)
Actual behavior:
But it gets formatted as:
function RGBtoHSB(param1 : Int, param2?: Int, param3?: Int)
{
}
interface SquareConfig
{
color : string;
width?: number;
}
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: FormatterThe issue relates to the built-in formatterThe issue relates to the built-in formatterHelp WantedYou can do thisYou can do this