We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dbea08f commit cf479fcCopy full SHA for cf479fc
tests/cases/compiler/contextualTypeShouldBeLiteral.ts
@@ -93,4 +93,30 @@ let xyz: LikeA | LikeB = {
93
}
94
};
95
96
-xyz;
+xyz;
97
+
98
+// Repro from #29168
99
100
+interface TestObject {
101
+ type?: 'object';
102
+ items: {
103
+ [k: string]: TestGeneric;
104
+ };
105
+}
106
107
+interface TestString {
108
+ type: 'string';
109
110
111
+type TestGeneric = (TestString | TestObject) & { [k: string]: any; };
112
113
+const test: TestGeneric = {
114
115
+ hello: { type: 'string' },
116
+ world: {
117
118
+ nested: { type: 'string' }
119
+ }
120
121
122
+};
0 commit comments