Skip to content

Commit 830b387

Browse files
author
Benjamin Lichtman
committed
No longer specially recognize underscore and update baselines
1 parent ad43020 commit 830b387

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/services/codefixes/convertToAsyncFunction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ namespace ts.codefix {
558558
name = getMapEntryIfExists(funcNode);
559559
}
560560

561-
if (!name || name.identifier === undefined || name.identifier.text === "_" || name.identifier.text === "undefined") {
561+
if (!name || name.identifier === undefined || name.identifier.text === "undefined") {
562562
return { identifier: createIdentifier(""), types, numberOfAssignmentsOriginal };
563563
}
564564

tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_IgnoreArgs1.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ function /*[#|*/f/*|]*/(): Promise<void> {
66
// ==ASYNC FUNCTION::Convert to async function==
77

88
async function f(): Promise<void> {
9-
await fetch('https://typescriptlang.org');
9+
const _ = await fetch('https://typescriptlang.org');
1010
console.log("done");
1111
}

tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_Scope1.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function /*[#|*/f/*|]*/() {
1919

2020
async function f() {
2121
var var1: Response, var2;
22-
await fetch('https://typescriptlang.org');
22+
const _ = await fetch('https://typescriptlang.org');
2323
const res = await Promise.resolve();
2424
var2 = "test";
2525
const res_1 = await fetch("https://microsoft.com");

tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_runEffectfulContinuation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function res(result) {
1111

1212
async function f() {
1313
const result = await fetch('https://typescriptlang.org');
14-
await res(result);
14+
const _ = await res(result);
1515
return console.log("done");
1616
}
1717
function res(result) {

tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_runEffectfulContinuation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function res(result) {
1111

1212
async function f() {
1313
const result = await fetch('https://typescriptlang.org');
14-
await res(result);
14+
const _ = await res(result);
1515
return console.log("done");
1616
}
1717
function res(result) {

0 commit comments

Comments
 (0)