mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Unescape identifiers used in code completion
This commit is contained in:
@@ -717,6 +717,8 @@ namespace FourSlash {
|
||||
public verifyCompletionEntryDetails(entryName: string, expectedText: string, expectedDocumentation?: string, kind?: string) {
|
||||
const details = this.getCompletionEntryDetails(entryName);
|
||||
|
||||
assert(details, "no completion entry available");
|
||||
|
||||
assert.equal(ts.displayPartsToString(details.displayParts), expectedText, this.assertionMessageAtLastKnownMarker("completion entry details text"));
|
||||
|
||||
if (expectedDocumentation !== undefined) {
|
||||
|
||||
@@ -3234,7 +3234,7 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
return name;
|
||||
return unescapeIdentifier(name);
|
||||
}
|
||||
|
||||
function getCompletionData(fileName: string, position: number) {
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
// @Filename: a.js
|
||||
// @allowJs: true
|
||||
////__foo;/**/
|
||||
|
||||
goTo.marker();
|
||||
verify.completionListContains("__foo", undefined, undefined, "warning");
|
||||
Reference in New Issue
Block a user