Skip to content

Commit 0f71949

Browse files
committed
PR Feedback
1 parent 67dec37 commit 0f71949

File tree

3 files changed

+15
-20
lines changed

3 files changed

+15
-20
lines changed

src/compiler/emitter.ts

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4199,23 +4199,20 @@ namespace ts {
41994199
pos++;
42004200
}
42014201

4202-
if (start < pos) {
4203-
const textRange: TextRange = { pos: -1, end: -1 };
4204-
if (start === 0) textRange.pos = modifiers.pos;
4205-
if (pos === modifiers.length - 1) textRange.end = modifiers.end;
4206-
emitNodeListItems(
4207-
emit,
4208-
node,
4209-
modifiers,
4210-
lastMode === "modifiers" ? ListFormat.Modifiers : ListFormat.Decorators,
4211-
/*parenthesizerRule*/ undefined,
4212-
start,
4213-
pos - start,
4214-
/*hasTrailingComma*/ false,
4215-
textRange);
4216-
start = pos;
4217-
}
4218-
4202+
const textRange: TextRange = { pos: -1, end: -1 };
4203+
if (start === 0) textRange.pos = modifiers.pos;
4204+
if (pos === modifiers.length - 1) textRange.end = modifiers.end;
4205+
emitNodeListItems(
4206+
emit,
4207+
node,
4208+
modifiers,
4209+
lastMode === "modifiers" ? ListFormat.Modifiers : ListFormat.Decorators,
4210+
/*parenthesizerRule*/ undefined,
4211+
start,
4212+
pos - start,
4213+
/*hasTrailingComma*/ false,
4214+
textRange);
4215+
start = pos;
42194216
lastMode = mode;
42204217
pos++;
42214218
}

src/services/codefixes/convertToAsyncFunction.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ namespace ts.codefix {
8383
}
8484

8585
const pos = skipTrivia(sourceFile.text, moveRangePastModifiers(functionToConvert).pos);
86-
// const pos = functionToConvert.modifiers?.end ?? functionToConvert.getStart(sourceFile);
87-
// const options = functionToConvert.modifiers ? { prefix: " " } : { suffix: " " };
8886
changes.insertModifierAt(sourceFile, pos, SyntaxKind.AsyncKeyword, { suffix: " " });
8987

9088
for (const returnStatement of returnStatements) {

src/testRunner/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
{ "path": "../typingsInstallerCore", "prepend": true },
2525
{ "path": "../deprecatedCompat", "prepend": true },
2626
{ "path": "../harness", "prepend": true },
27-
{ "path": "../loggedIO", "prepend": true },
27+
{ "path": "../loggedIO", "prepend": true }
2828
],
2929

3030
"files": [

0 commit comments

Comments
 (0)