mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-14 19:16:17 -06:00
fix(57590): [Formatting] Remove spaces between ... and type name in tuple spread (#57604)
This commit is contained in:
parent
1d6d962d31
commit
64edd07330
@ -398,6 +398,9 @@ export function getAllRules(): RuleSpec[] {
|
||||
// Remove extra space between for and await
|
||||
rule("SpaceBetweenForAndAwaitKeyword", SyntaxKind.ForKeyword, SyntaxKind.AwaitKeyword, [isNonJsxSameLineTokenContext], RuleAction.InsertSpace),
|
||||
|
||||
// Remove extra spaces between ... and type name in tuple spread
|
||||
rule("SpaceBetweenDotDotDotAndTypeName", SyntaxKind.DotDotDotToken, typeNames, [isNonJsxSameLineTokenContext], RuleAction.DeleteSpace),
|
||||
|
||||
// Add a space between statements. All keywords except (do,else,case) has open/close parens after them.
|
||||
// So, we have a rule to add a space for [),Any], [do,Any], [else,Any], and [case,Any]
|
||||
rule(
|
||||
|
||||
@ -0,0 +1,12 @@
|
||||
/// <reference path="fourslash.ts"/>
|
||||
|
||||
//// let a: [... any[]];
|
||||
//// let b: [... number[]];
|
||||
//// let c: [... string[]];
|
||||
|
||||
format.document();
|
||||
verify.currentFileContentIs(
|
||||
`let a: [...any[]];
|
||||
let b: [...number[]];
|
||||
let c: [...string[]];`
|
||||
);
|
||||
Loading…
x
Reference in New Issue
Block a user