Add tests

This commit is contained in:
Anders Hejlsberg 2017-01-30 16:53:43 -08:00
parent 7e7057a89d
commit 647e1836c3

View file

@ -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]} = {}
}