We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82a2ee6 commit f834cafCopy full SHA for f834caf
tests/cases/conformance/types/mapped/mappedTypesAndObjects.ts
@@ -0,0 +1,35 @@
1
+// @strictNullChecks: true
2
+// @declaration: true
3
+
4
+function f1<T>(x: Partial<T>, y: Readonly<T>) {
5
+ let obj: {};
6
+ obj = x;
7
+ obj = y;
8
+}
9
10
+function f2<T>(x: Partial<T>, y: Readonly<T>) {
11
+ let obj: { [x: string]: any };
12
13
14
15
16
+// Repro from #12900
17
18
+interface Base {
19
+ foo: { [key: string]: any };
20
+ bar: any;
21
+ baz: any;
22
23
24
+interface E1<T> extends Base {
25
+ foo: T;
26
27
28
+interface Something { name: string, value: string };
29
+interface E2 extends Base {
30
+ foo: Partial<Something>; // or other mapped type
31
32
33
+interface E3<T> extends Base {
34
+ foo: Partial<T>; // or other mapped type
35
0 commit comments