-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed string completions that require escaping (#55118)
- Loading branch information
Showing
2 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
//// type Value<P extends string> = `var(--\\\\, ${P})` | ||
//// export const value: Value<'one' | 'two'> = "/*1*/" | ||
//// | ||
//// export const test: `\ntest\n` = '/*2*/' | ||
//// | ||
//// export const doubleQuoted1: `"double-quoted"` = '/*3*/' | ||
//// export const doubleQuoted2: `"double-quoted"` = "/*4*/" | ||
//// | ||
//// export const singleQuoted2: `'single-quoted'` = "/*5*/" | ||
//// export const singleQuoted2: `'single-quoted'` = '/*6*/' | ||
//// | ||
//// export const backtickQuoted1: '`backtick-quoted`' = "/*7*/" | ||
//// export const backtickQuoted2: '`backtick-quoted`' = `/*8*/` | ||
|
||
verify.completions({ marker: "1", exact: ["var(--\\\\\\\\, one)", "var(--\\\\\\\\, two)"] }); | ||
verify.completions({ marker: "2", exact: ["\\ntest\\n"] }); | ||
verify.completions({ marker: "3", exact: ['"double-quoted"'] }); | ||
verify.completions({ marker: "4", exact: ['\\\"double-quoted\\\"'] }); | ||
verify.completions({ marker: "5", exact: ["'single-quoted'"] }); | ||
verify.completions({ marker: "6", exact: ["\\'single-quoted\\'"] }); | ||
verify.completions({ marker: "7", exact: ["`backtick-quoted`"] }); | ||
verify.completions({ marker: "8", exact: ["\\`backtick-quoted\\`"] }); |