Add tests
This commit is contained in:
parent
7e7057a89d
commit
647e1836c3
1 changed files with 17 additions and 7 deletions
|
@ -13,23 +13,33 @@ function f2<T>(x: Partial<T>, y: Readonly<T>) {
|
|||
obj = y;
|
||||
}
|
||||
|
||||
function f3<T>(x: Partial<T>) {
|
||||
x = {};
|
||||
}
|
||||
|
||||
// Repro from #12900
|
||||
|
||||
interface Base {
|
||||
foo: { [key: string]: any };
|
||||
bar: any;
|
||||
baz: any;
|
||||
foo: { [key: string]: any };
|
||||
bar: any;
|
||||
baz: any;
|
||||
}
|
||||
|
||||
interface E1<T> extends Base {
|
||||
foo: T;
|
||||
foo: T;
|
||||
}
|
||||
|
||||
interface Something { name: string, value: string };
|
||||
interface E2 extends Base {
|
||||
foo: Partial<Something>; // or other mapped type
|
||||
foo: Partial<Something>; // or other mapped type
|
||||
}
|
||||
|
||||
interface E3<T> extends Base {
|
||||
foo: Partial<T>; // or other mapped type
|
||||
}
|
||||
foo: Partial<T>; // or other mapped type
|
||||
}
|
||||
|
||||
// Repro from #13747
|
||||
|
||||
class Form<T> {
|
||||
private values: {[P in keyof T]?: T[P]} = {}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue