36 lines
866 B
TypeScript
36 lines
866 B
TypeScript
/// <reference path="fourslash.ts" />
|
|
|
|
// @newline: LF
|
|
// @Filename: a.ts
|
|
// Case: Snippet text needs escaping
|
|
////interface DollarSign {
|
|
//// "$usd"(a: number): number;
|
|
////}
|
|
////class USD implements DollarSign {
|
|
//// /*a*/
|
|
////}
|
|
|
|
|
|
verify.completions({
|
|
marker: "a",
|
|
isNewIdentifierLocation: true,
|
|
preferences: {
|
|
includeCompletionsWithInsertText: true,
|
|
includeCompletionsWithSnippetText: true,
|
|
includeCompletionsWithClassMemberSnippets: true,
|
|
},
|
|
includes: [
|
|
{
|
|
name: "$usd",
|
|
sortText: completion.SortText.LocationPriority,
|
|
replacementSpan: {
|
|
fileName: "",
|
|
pos: 0,
|
|
end: 0,
|
|
},
|
|
isSnippet: true,
|
|
insertText:
|
|
"\"\\$usd\"(${2:a}: ${3:number}): ${4:number} {\n $1$0\n}\n",
|
|
}
|
|
],
|
|
}); |