File: completionsStringsWithTriggerCharacter.ts

package info (click to toggle)
node-typescript 5.1.6%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 492,516 kB
  • sloc: javascript: 2,078,951; makefile: 6; sh: 1
file content (51 lines) | stat: -rw-r--r-- 1,784 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/// <reference path="fourslash.ts" />

//// type A = "a/b" | "b/a";
//// const a: A = "[|a/*1*/|]";
////
//// type B = "a@b" | "b@a";
//// const a: B = "[|a@/*2*/|]";
////
//// type C = "a.b" | "b.a";
//// const c: C = "[|a./*3*/|]";
////
//// type D = "a'b" | "b'a";
//// const d: D = "[|a'/*4*/|]";
////
//// type E = "a`b" | "b`a";
//// const e: E = "[|a`/*5*/|]";
////
//// type F = 'a"b' | 'b"a';
//// const f: F = '[|a"/*6*/|]';
////
//// type G = "a<b" | "b<a";
//// const g: G = '[|a</*7*/|]';

verify.completions({ marker: '1', exact: [
    { name: "a/b", replacementSpan: test.ranges()[0] },
    { name: "b/a", replacementSpan: test.ranges()[0] }
], triggerCharacter: "/" });
verify.completions({ marker: "2", exact: [
    { name: "a@b", replacementSpan: test.ranges()[1] },
    { name: "b@a", replacementSpan: test.ranges()[1] }
], triggerCharacter: "@" });
verify.completions({ marker: "3", exact: [
    { name: "a.b", replacementSpan: test.ranges()[2] },
    { name: "b.a", replacementSpan: test.ranges()[2] }
], triggerCharacter: "." });
verify.completions({ marker: "4", exact: [
    { name: "a'b", replacementSpan: test.ranges()[3] },
    { name: "b'a", replacementSpan: test.ranges()[3] }
], triggerCharacter: "'" });
verify.completions({ marker: "5", exact: [
    { name: "a`b", replacementSpan: test.ranges()[4] },
    { name: "b`a", replacementSpan: test.ranges()[4] }
], triggerCharacter: "`" });
verify.completions({ marker: "6", exact: [
    { name: 'a"b', replacementSpan: test.ranges()[5] },
    { name: 'b"a', replacementSpan: test.ranges()[5] }
], triggerCharacter: '"' });
verify.completions({ marker: "7", exact: [
    { name: 'a<b', replacementSpan: test.ranges()[6] },
    { name: 'b<a', replacementSpan: test.ranges()[6] }
], triggerCharacter: '<' });