Skip to content

Commit c234601

Browse files
committed
Update fourslash
1 parent 13dc8bf commit c234601

29 files changed

+148
-204
lines changed

tests/baselines/reference/typeErrorAfterStringCompletionsInNestedCall2.baseline

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ Semantic Diagnostics for file '/tests/cases/fourslash/typeErrorAfterStringComple
113113
!!! error TS2322: Type '{ type: "BARx"; }' is not assignable to type '{ type: "BAR"; }'.
114114
!!! error TS2322: Types of property 'type' are incompatible.
115115
!!! error TS2322: Type '"BARx"' is not assignable to type '"BAR"'.
116-
!!! related TS6500 /tests/cases/fourslash/typeErrorAfterStringCompletionsInNestedCall2.ts:14:7: The expected type comes from property 'FOO' which is declared here on type '{ FOO?: ActionFunction<{ type: "FOO"; }, { type: "FOO"; } | { type: "BAR"; }> | undefined; BAR?: ActionFunction<{ type: "BAR"; }, { type: "FOO"; } | { type: "BAR"; }> | undefined; }'
116+
!!! related TS6500 /tests/cases/fourslash/typeErrorAfterStringCompletionsInNestedCall2.ts:14:7: The expected type comes from property 'FOO' which is declared here on type '{ BAR?: ActionFunction<{ type: "BAR"; }, { type: "FOO"; } | { type: "BAR"; }> | undefined; FOO?: ActionFunction<{ type: "FOO"; }, { type: "FOO"; } | { type: "BAR"; }> | undefined; }'
117117
return {
118118
type: "BAR" as const,
119119
};

tests/cases/fourslash/bestCommonTypeObjectLiterals.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ verify.quickInfos({
3333
age: number;
3434
dob: Date;
3535
})[]`,
36-
4: "var c3: {\n name: string;\n age: number;\n}[]"
36+
4: "var c3: I[]"
3737
});

tests/cases/fourslash/codeFixAddMissingAttributes8.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
verify.codeFix({
1717
index: 0,
1818
description: ts.Diagnostics.Add_missing_attributes.message,
19-
newRangeContent: `<A ad={"ad"} ac={"ac"} bd={"bd"} bc={"bc"}></A>`
19+
newRangeContent: `<A ac={"ac"} ad={"ad"} bc={"bc"} bd={"bd"}></A>`
2020
});

tests/cases/fourslash/codeFixAddMissingAttributes9.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
verify.codeFix({
1717
index: 0,
1818
description: ts.Diagnostics.Add_missing_attributes.message,
19-
newRangeContent: `<A a-d={"a-d"} a-c={"a-c"} b-d={"b-d"} b-c={"b-c"}></A>`
19+
newRangeContent: `<A a-c={"a-c"} a-d={"a-d"} b-c={"b-c"} b-d={"b-d"}></A>`
2020
});

tests/cases/fourslash/codeFixAddMissingProperties16.ts

+76-76
Original file line numberDiff line numberDiff line change
@@ -12,155 +12,155 @@ verify.codeFix({
1212
description: ts.Diagnostics.Add_missing_properties.message,
1313
newRangeContent:
1414
`const names: { [K in D]: K } = {
15-
"aA1@": "aA1@",
1615
"aA1!": "aA1!",
17-
"aA2@": "aA2@",
16+
"aA1@": "aA1@",
1817
"aA2!": "aA2!",
19-
"aA3@": "aA3@",
18+
"aA2@": "aA2@",
2019
"aA3!": "aA3!",
21-
"aB1@": "aB1@",
20+
"aA3@": "aA3@",
2221
"aB1!": "aB1!",
23-
"aB2@": "aB2@",
22+
"aB1@": "aB1@",
2423
"aB2!": "aB2!",
25-
"aB3@": "aB3@",
24+
"aB2@": "aB2@",
2625
"aB3!": "aB3!",
27-
"aC1@": "aC1@",
26+
"aB3@": "aB3@",
2827
"aC1!": "aC1!",
29-
"aC2@": "aC2@",
28+
"aC1@": "aC1@",
3029
"aC2!": "aC2!",
31-
"aC3@": "aC3@",
30+
"aC2@": "aC2@",
3231
"aC3!": "aC3!",
33-
"aD1@": "aD1@",
32+
"aC3@": "aC3@",
3433
"aD1!": "aD1!",
35-
"aD2@": "aD2@",
34+
"aD1@": "aD1@",
3635
"aD2!": "aD2!",
37-
"aD3@": "aD3@",
36+
"aD2@": "aD2@",
3837
"aD3!": "aD3!",
39-
"aE1@": "aE1@",
38+
"aD3@": "aD3@",
4039
"aE1!": "aE1!",
41-
"aE2@": "aE2@",
40+
"aE1@": "aE1@",
4241
"aE2!": "aE2!",
43-
"aE3@": "aE3@",
42+
"aE2@": "aE2@",
4443
"aE3!": "aE3!",
45-
"bA1@": "bA1@",
44+
"aE3@": "aE3@",
4645
"bA1!": "bA1!",
47-
"bA2@": "bA2@",
46+
"bA1@": "bA1@",
4847
"bA2!": "bA2!",
49-
"bA3@": "bA3@",
48+
"bA2@": "bA2@",
5049
"bA3!": "bA3!",
51-
"bB1@": "bB1@",
50+
"bA3@": "bA3@",
5251
"bB1!": "bB1!",
53-
"bB2@": "bB2@",
52+
"bB1@": "bB1@",
5453
"bB2!": "bB2!",
55-
"bB3@": "bB3@",
54+
"bB2@": "bB2@",
5655
"bB3!": "bB3!",
57-
"bC1@": "bC1@",
56+
"bB3@": "bB3@",
5857
"bC1!": "bC1!",
59-
"bC2@": "bC2@",
58+
"bC1@": "bC1@",
6059
"bC2!": "bC2!",
61-
"bC3@": "bC3@",
60+
"bC2@": "bC2@",
6261
"bC3!": "bC3!",
63-
"bD1@": "bD1@",
62+
"bC3@": "bC3@",
6463
"bD1!": "bD1!",
65-
"bD2@": "bD2@",
64+
"bD1@": "bD1@",
6665
"bD2!": "bD2!",
67-
"bD3@": "bD3@",
66+
"bD2@": "bD2@",
6867
"bD3!": "bD3!",
69-
"bE1@": "bE1@",
68+
"bD3@": "bD3@",
7069
"bE1!": "bE1!",
71-
"bE2@": "bE2@",
70+
"bE1@": "bE1@",
7271
"bE2!": "bE2!",
73-
"bE3@": "bE3@",
72+
"bE2@": "bE2@",
7473
"bE3!": "bE3!",
75-
"cA1@": "cA1@",
74+
"bE3@": "bE3@",
7675
"cA1!": "cA1!",
77-
"cA2@": "cA2@",
76+
"cA1@": "cA1@",
7877
"cA2!": "cA2!",
79-
"cA3@": "cA3@",
78+
"cA2@": "cA2@",
8079
"cA3!": "cA3!",
81-
"cB1@": "cB1@",
80+
"cA3@": "cA3@",
8281
"cB1!": "cB1!",
83-
"cB2@": "cB2@",
82+
"cB1@": "cB1@",
8483
"cB2!": "cB2!",
85-
"cB3@": "cB3@",
84+
"cB2@": "cB2@",
8685
"cB3!": "cB3!",
87-
"cC1@": "cC1@",
86+
"cB3@": "cB3@",
8887
"cC1!": "cC1!",
89-
"cC2@": "cC2@",
88+
"cC1@": "cC1@",
9089
"cC2!": "cC2!",
91-
"cC3@": "cC3@",
90+
"cC2@": "cC2@",
9291
"cC3!": "cC3!",
93-
"cD1@": "cD1@",
92+
"cC3@": "cC3@",
9493
"cD1!": "cD1!",
95-
"cD2@": "cD2@",
94+
"cD1@": "cD1@",
9695
"cD2!": "cD2!",
97-
"cD3@": "cD3@",
96+
"cD2@": "cD2@",
9897
"cD3!": "cD3!",
99-
"cE1@": "cE1@",
98+
"cD3@": "cD3@",
10099
"cE1!": "cE1!",
101-
"cE2@": "cE2@",
100+
"cE1@": "cE1@",
102101
"cE2!": "cE2!",
103-
"cE3@": "cE3@",
102+
"cE2@": "cE2@",
104103
"cE3!": "cE3!",
105-
"dA1@": "dA1@",
104+
"cE3@": "cE3@",
106105
"dA1!": "dA1!",
107-
"dA2@": "dA2@",
106+
"dA1@": "dA1@",
108107
"dA2!": "dA2!",
109-
"dA3@": "dA3@",
108+
"dA2@": "dA2@",
110109
"dA3!": "dA3!",
111-
"dB1@": "dB1@",
110+
"dA3@": "dA3@",
112111
"dB1!": "dB1!",
113-
"dB2@": "dB2@",
112+
"dB1@": "dB1@",
114113
"dB2!": "dB2!",
115-
"dB3@": "dB3@",
114+
"dB2@": "dB2@",
116115
"dB3!": "dB3!",
117-
"dC1@": "dC1@",
116+
"dB3@": "dB3@",
118117
"dC1!": "dC1!",
119-
"dC2@": "dC2@",
118+
"dC1@": "dC1@",
120119
"dC2!": "dC2!",
121-
"dC3@": "dC3@",
120+
"dC2@": "dC2@",
122121
"dC3!": "dC3!",
123-
"dD1@": "dD1@",
122+
"dC3@": "dC3@",
124123
"dD1!": "dD1!",
125-
"dD2@": "dD2@",
124+
"dD1@": "dD1@",
126125
"dD2!": "dD2!",
127-
"dD3@": "dD3@",
126+
"dD2@": "dD2@",
128127
"dD3!": "dD3!",
129-
"dE1@": "dE1@",
128+
"dD3@": "dD3@",
130129
"dE1!": "dE1!",
131-
"dE2@": "dE2@",
130+
"dE1@": "dE1@",
132131
"dE2!": "dE2!",
133-
"dE3@": "dE3@",
132+
"dE2@": "dE2@",
134133
"dE3!": "dE3!",
135-
"eA1@": "eA1@",
134+
"dE3@": "dE3@",
136135
"eA1!": "eA1!",
137-
"eA2@": "eA2@",
136+
"eA1@": "eA1@",
138137
"eA2!": "eA2!",
139-
"eA3@": "eA3@",
138+
"eA2@": "eA2@",
140139
"eA3!": "eA3!",
141-
"eB1@": "eB1@",
140+
"eA3@": "eA3@",
142141
"eB1!": "eB1!",
143-
"eB2@": "eB2@",
142+
"eB1@": "eB1@",
144143
"eB2!": "eB2!",
145-
"eB3@": "eB3@",
144+
"eB2@": "eB2@",
146145
"eB3!": "eB3!",
147-
"eC1@": "eC1@",
146+
"eB3@": "eB3@",
148147
"eC1!": "eC1!",
149-
"eC2@": "eC2@",
148+
"eC1@": "eC1@",
150149
"eC2!": "eC2!",
151-
"eC3@": "eC3@",
150+
"eC2@": "eC2@",
152151
"eC3!": "eC3!",
153-
"eD1@": "eD1@",
152+
"eC3@": "eC3@",
154153
"eD1!": "eD1!",
155-
"eD2@": "eD2@",
154+
"eD1@": "eD1@",
156155
"eD2!": "eD2!",
157-
"eD3@": "eD3@",
156+
"eD2@": "eD2@",
158157
"eD3!": "eD3!",
159-
"eE1@": "eE1@",
158+
"eD3@": "eD3@",
160159
"eE1!": "eE1!",
161-
"eE2@": "eE2@",
160+
"eE1@": "eE1@",
162161
"eE2!": "eE2!",
163-
"eE3@": "eE3@",
164-
"eE3!": "eE3!"
162+
"eE2@": "eE2@",
163+
"eE3!": "eE3!",
164+
"eE3@": "eE3@"
165165
};`
166166
});

tests/cases/fourslash/codeFixClassExtendAbstractMethod.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class C extends A {
2727
override f(a: number, b: string): this;
2828
override f(a: string, b: number): Function;
2929
override f(a: string): Function;
30-
override f(a: unknown, b?: unknown): boolean | Function | this {
30+
override f(a: unknown, b?: unknown): boolean | this | Function {
3131
throw new Error("Method not implemented.");
3232
}
3333
override foo(): number {

tests/cases/fourslash/codeFixClassImplementInterfaceNoTruncation.ts

-47
This file was deleted.

tests/cases/fourslash/codeFixInferFromFunctionUsage.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
//// }
77

88
// https://github.com/Microsoft/TypeScript/issues/29330
9-
verify.rangeAfterCodeFix("arr: { other: (arg0: (a: number, b: number) => 1 | -1) => void; }");
9+
verify.rangeAfterCodeFix("arr: { other: (arg0: (a: number, b: number) => -1 | 1) => void; }");

tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports15.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ verify.codeFix({
1717
const dest = foo();
1818
export const x: 1 = dest.x;
1919
const temp = dest.y;
20-
export const y: 1 | 0 = temp === undefined ? 0 : dest.y;`
20+
export const y: 0 | 1 = temp === undefined ? 0 : dest.y;`
2121
});

tests/cases/fourslash/completionForStringLiteral10.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
////let a: As;
55
////if ('[|/**/|]' != a
66

7-
verify.completions({ marker: "", exact: ["arf", "abacus", "abaddon"].map(name => ({
7+
verify.completions({ marker: "", exact: ["abacus", "abaddon", "arf"].map(name => ({
88
name,
99
replacementSpan: test.ranges()[0]
1010
})) });

tests/cases/fourslash/completionForStringLiteral11.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
//// case '[|/**/|]
77
////}
88

9-
verify.completions({ marker: "", exact: ["arf", "abacus", "abaddon" ] });
9+
verify.completions({ marker: "", exact: ["abacus", "abaddon", "arf"] });

tests/cases/fourslash/completionForStringLiteral5.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
////function f<K extends keyof Foo>(a: K) { };
99
////f("/*1*/
1010

11-
verify.completions({ marker: "1", exact: ["foo", "bar"] });
11+
verify.completions({ marker: "1", exact: ["bar", "foo"] });

tests/cases/fourslash/completionForStringLiteral7.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
////f("[|/*1*/|]", "[|/*2*/|]", "[|/*3*/|]");
77

88
verify.completions(
9-
{ marker: "1", exact: ["foo", "bar"].map(name => ({
9+
{ marker: "1", exact: ["bar", "foo"].map(name => ({
1010
name, replacementSpan: test.ranges()[0]
1111
})) },
1212
{ marker: "2", exact: ["oof", "rab"].map(name => ({

tests/cases/fourslash/completionForStringLiteral8.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
////let a: As;
55
////if (a === '/**/
66

7-
verify.completions({ marker: "", exact: ["arf", "abacus", "abaddon"] });
7+
verify.completions({ marker: "", exact: ["abacus", "abaddon", "arf"] });

tests/cases/fourslash/completionListAtThisType.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515

1616
verify.completions({
1717
marker: ["1", "2"],
18-
exact: ["foo", "bar", "baz"]
18+
exact: ["bar", "baz", "foo"]
1919
});

tests/cases/fourslash/completionsLiteralFromInferenceWithinInferredType1.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@
2121
//// },
2222
//// });
2323

24-
verify.completions({ marker: ["ts"], exact: ["foo", "bar"] });
24+
verify.completions({ marker: ["ts"], exact: ["bar", "foo"] });
2525
verify.completions({ marker: ["ts2"], includes: ['"foo"', '"bar"'], isNewIdentifierLocation: false });

tests/cases/fourslash/completionsLiteralFromInferenceWithinInferredType3.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@
2020
//// },
2121
//// });
2222

23-
verify.completions({ marker: ["ts"], exact: ["foo", "bar"] });
23+
verify.completions({ marker: ["ts"], exact: ["bar", "foo"] });
2424
verify.completions({ marker: ["ts2"], includes: ['"foo"', '"bar"'], isNewIdentifierLocation: true });

tests/cases/fourslash/completionsStringLiteral_fromTypeConstraint.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
////type T = Pick<Foo, "[|/**/|]">;
55

66
verify.completions({ marker: "", exact: [
7+
{ name: "bar", replacementSpan: test.ranges()[0] },
78
{ name: "foo", replacementSpan: test.ranges()[0] },
8-
{ name: "bar", replacementSpan: test.ranges()[0] }
99
] });

tests/cases/fourslash/completionsWithStringReplacementMode.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ for (let i = 0 ; i < 3; ++i) {
99
verify.completions({
1010
marker: `${i + 1}`,
1111
exact: [
12-
{ name: "foo", replacementSpan: test.ranges()[i] },
1312
{ name: "bar", replacementSpan: test.ranges()[i] },
13+
{ name: "foo", replacementSpan: test.ranges()[i] },
1414
]
1515
});
16-
}
16+
}

0 commit comments

Comments
 (0)