Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rewrite-javascript/rewrite/src/javascript/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3079,7 +3079,7 @@ export class JavaScriptParserVisitor {
return this.rightPadded({
kind: J.Kind.VariableDeclarations,
id: randomId(),
prefix: isMulti ? this.prefix(declaration) : emptySpace,
prefix: this.prefix(declaration),
markers: emptyMarkers,
leadingAnnotations: [],
modifiers: isMulti ? [] : modifiers,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,12 @@ describe('whitespace should be attached to the outermost element', () => {
"const userScores = new Map<string, number>()",
"function* generateUsers() { yield { id: 1 } };",
"type T = undefined extends undefined ? string : never;",
"const FirstEntity = class FirstEntityClass {};"
"const FirstEntity = class FirstEntityClass {};",
`
for (
let i = 0; i < numberOfConnections; i++
) {}
`
])('%s', async (sourceCode) => {
// given
const parser = new JavaScriptParser();
Expand Down
Loading