2015-11-23 22:21:51 +01:00
|
|
|
// Repro for #5712
|
|
|
|
|
|
|
|
interface Ref<T> {
|
|
|
|
prop: T;
|
|
|
|
}
|
|
|
|
interface Container<T> {
|
|
|
|
m1: Container<Ref<T>>;
|
|
|
|
m2: T;
|
|
|
|
}
|
|
|
|
declare function foo(x: () => Container<Ref<number>>): void;
|
|
|
|
let a: () => Container<Ref<string>>;
|
|
|
|
foo(a);
|
2018-07-07 22:27:23 +02:00
|
|
|
|
|
|
|
// Repro for #25498
|
|
|
|
|
|
|
|
function test(): {[A in "foo"]: A} {
|
|
|
|
return {foo: "bar"};
|
|
|
|
}
|
2019-08-19 21:08:34 +02:00
|
|
|
|
|
|
|
// Repro for #32358
|
|
|
|
|
|
|
|
const foo = { bar: 'a' };
|
|
|
|
const x = ({ [foo.bar]: c }) => undefined;
|