Skip to content

Commit 940d2b3

Browse files
committed
fix typo in filename
1 parent b261e29 commit 940d2b3

6 files changed

+99
-139
lines changed

tests/baselines/reference/contextualTypeInObectProperty.symbols

Lines changed: 0 additions & 132 deletions
This file was deleted.

tests/baselines/reference/contextualTypeInObectProperty.errors.txt renamed to tests/baselines/reference/contextualTypeInObjectProperty.errors.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
tests/cases/compiler/contextualTypeInObectProperty.ts(19,17): error TS7006: Parameter 'keyC' implicitly has an 'any' type.
2-
tests/cases/compiler/contextualTypeInObectProperty.ts(24,3): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
3-
tests/cases/compiler/contextualTypeInObectProperty.ts(24,11): error TS7006: Parameter 'keyC' implicitly has an 'any' type.
1+
tests/cases/compiler/contextualTypeInObjectProperty.ts(19,17): error TS7006: Parameter 'keyC' implicitly has an 'any' type.
2+
tests/cases/compiler/contextualTypeInObjectProperty.ts(24,3): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
3+
tests/cases/compiler/contextualTypeInObjectProperty.ts(24,11): error TS7006: Parameter 'keyC' implicitly has an 'any' type.
44

55

6-
==== tests/cases/compiler/contextualTypeInObectProperty.ts (3 errors) ====
6+
==== tests/cases/compiler/contextualTypeInObjectProperty.ts (3 errors) ====
77
type Shape = {
88
"a"?: (a: "a") => "a";
99
"b"?: (b: "b") => "b";

tests/baselines/reference/contextualTypeInObectProperty.js renamed to tests/baselines/reference/contextualTypeInObjectProperty.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//// [contextualTypeInObectProperty.ts]
1+
//// [contextualTypeInObjectProperty.ts]
22
type Shape = {
33
"a"?: (a: "a") => "a";
44
"b"?: (b: "b") => "b";
@@ -45,7 +45,7 @@ f({ data: 0 }, {
4545
},
4646
});
4747

48-
//// [contextualTypeInObectProperty.js]
48+
//// [contextualTypeInObjectProperty.js]
4949
"use strict";
5050
var _a, _b, _c, _d, _e, _f;
5151
exports.__esModule = true;
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
=== tests/cases/compiler/contextualTypeInObjectProperty.ts ===
2+
type Shape = {
3+
>Shape : Symbol(Shape, Decl(contextualTypeInObjectProperty.ts, 0, 0))
4+
5+
"a"?: (a: "a") => "a";
6+
>"a" : Symbol("a", Decl(contextualTypeInObjectProperty.ts, 0, 14))
7+
>a : Symbol(a, Decl(contextualTypeInObjectProperty.ts, 1, 11))
8+
9+
"b"?: (b: "b") => "b";
10+
>"b" : Symbol("b", Decl(contextualTypeInObjectProperty.ts, 1, 26))
11+
>b : Symbol(b, Decl(contextualTypeInObjectProperty.ts, 2, 11))
12+
13+
"c"?: (c: "c") => "c";
14+
>"c" : Symbol("c", Decl(contextualTypeInObjectProperty.ts, 2, 26))
15+
>c : Symbol(c, Decl(contextualTypeInObjectProperty.ts, 3, 11))
16+
17+
};
18+
19+
const getC = () => "c" as const;
20+
>getC : Symbol(getC, Decl(contextualTypeInObjectProperty.ts, 6, 5))
21+
22+
export const obj: Shape = {
23+
>obj : Symbol(obj, Decl(contextualTypeInObjectProperty.ts, 8, 12))
24+
>Shape : Symbol(Shape, Decl(contextualTypeInObjectProperty.ts, 0, 0))
25+
26+
["a"]: keyA => keyA,
27+
>["a"] : Symbol(["a"], Decl(contextualTypeInObjectProperty.ts, 8, 27))
28+
>"a" : Symbol(["a"], Decl(contextualTypeInObjectProperty.ts, 8, 27))
29+
>keyA : Symbol(keyA, Decl(contextualTypeInObjectProperty.ts, 9, 8))
30+
>keyA : Symbol(keyA, Decl(contextualTypeInObjectProperty.ts, 9, 8))
31+
32+
["b" as "b"]: keyB => keyB,
33+
>["b" as "b"] : Symbol(["b" as "b"], Decl(contextualTypeInObjectProperty.ts, 9, 22))
34+
>keyB : Symbol(keyB, Decl(contextualTypeInObjectProperty.ts, 10, 15))
35+
>keyB : Symbol(keyB, Decl(contextualTypeInObjectProperty.ts, 10, 15))
36+
37+
[getC()]: keyC => keyC,
38+
>[getC()] : Symbol([getC()], Decl(contextualTypeInObjectProperty.ts, 10, 29))
39+
>getC : Symbol(getC, Decl(contextualTypeInObjectProperty.ts, 6, 5))
40+
>keyC : Symbol(keyC, Decl(contextualTypeInObjectProperty.ts, 11, 11))
41+
>keyC : Symbol(keyC, Decl(contextualTypeInObjectProperty.ts, 11, 11))
42+
43+
};
44+
45+
46+
const getUnion = () => "b" as "b" | "c";
47+
>getUnion : Symbol(getUnion, Decl(contextualTypeInObjectProperty.ts, 15, 5))
48+
49+
export const unionType: Shape = {
50+
>unionType : Symbol(unionType, Decl(contextualTypeInObjectProperty.ts, 17, 12))
51+
>Shape : Symbol(Shape, Decl(contextualTypeInObjectProperty.ts, 0, 0))
52+
53+
[getUnion()]: keyC => keyC,
54+
>[getUnion()] : Symbol([getUnion()], Decl(contextualTypeInObjectProperty.ts, 17, 33))
55+
>getUnion : Symbol(getUnion, Decl(contextualTypeInObjectProperty.ts, 15, 5))
56+
>keyC : Symbol(keyC, Decl(contextualTypeInObjectProperty.ts, 18, 15))
57+
>keyC : Symbol(keyC, Decl(contextualTypeInObjectProperty.ts, 18, 15))
58+
59+
};
60+
61+
62+
export const func: Shape = {
63+
>func : Symbol(func, Decl(contextualTypeInObjectProperty.ts, 22, 12))
64+
>Shape : Symbol(Shape, Decl(contextualTypeInObjectProperty.ts, 0, 0))
65+
66+
[getC]: keyC => keyC,
67+
>[getC] : Symbol([getC], Decl(contextualTypeInObjectProperty.ts, 22, 28))
68+
>getC : Symbol(getC, Decl(contextualTypeInObjectProperty.ts, 6, 5))
69+
>keyC : Symbol(keyC, Decl(contextualTypeInObjectProperty.ts, 23, 9))
70+
>keyC : Symbol(keyC, Decl(contextualTypeInObjectProperty.ts, 23, 9))
71+
72+
};
73+
74+
const generic: {
75+
>generic : Symbol(generic, Decl(contextualTypeInObjectProperty.ts, 26, 5))
76+
77+
c: <T>(arg: T) => T;
78+
>c : Symbol(c, Decl(contextualTypeInObjectProperty.ts, 26, 16))
79+
>T : Symbol(T, Decl(contextualTypeInObjectProperty.ts, 27, 6))
80+
>arg : Symbol(arg, Decl(contextualTypeInObjectProperty.ts, 27, 9))
81+
>T : Symbol(T, Decl(contextualTypeInObjectProperty.ts, 27, 6))
82+
>T : Symbol(T, Decl(contextualTypeInObjectProperty.ts, 27, 6))
83+
84+
} = {
85+
[getC()]: keyC => keyC,
86+
>[getC()] : Symbol([getC()], Decl(contextualTypeInObjectProperty.ts, 28, 5))
87+
>getC : Symbol(getC, Decl(contextualTypeInObjectProperty.ts, 6, 5))
88+
>keyC : Symbol(keyC, Decl(contextualTypeInObjectProperty.ts, 29, 11))
89+
>keyC : Symbol(keyC, Decl(contextualTypeInObjectProperty.ts, 29, 11))
90+
91+
};
92+

tests/baselines/reference/contextualTypeInObectProperty.types renamed to tests/baselines/reference/contextualTypeInObjectProperty.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
=== tests/cases/compiler/contextualTypeInObectProperty.ts ===
1+
=== tests/cases/compiler/contextualTypeInObjectProperty.ts ===
22
type Shape = {
33
>Shape : Shape
44

0 commit comments

Comments
 (0)