Closed
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;
}