1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
/// <reference path="fourslash.ts" />
// @Filename: test.ts
//// interface A { a: A }
//// declare let a: A;
//// type Deep<T> = { [K in keyof T]: Deep<T[K]> }
//// declare function foo<T>(deep: Deep<T>): T;
//// const out/*1*/ = foo/*2*/(a);
//// out.a/*3*/
//// out.a.a/*4*/
//// out.a.a.a.a.a.a.a/*5*/
////
//// interface B { [s: string]: B }
//// declare let b: B;
//// const oub/*6*/ = foo/*7*/(b);
//// oub.b/*8*/
//// oub.b.b/*9*/
//// oub.b.a.n.a.n.a/*10*/
verify.quickInfoAt('1', `const out: {
a: {
a: ...;
};
}`);
verify.quickInfoAt('2', `function foo<{
a: {
a: ...;
};
}>(deep: Deep<{
a: {
a: ...;
};
}>): {
a: {
a: ...;
};
}`);
verify.quickInfoAt('3', `(property) a: {
a: {
a: ...;
};
}`);
verify.quickInfoAt('4', `(property) a: {
a: {
a: ...;
};
}`);
verify.quickInfoAt('5', `(property) a: {
a: {
a: ...;
};
}`);
verify.quickInfoAt('6', `const oub: {
[x: string]: ...;
}`);
verify.quickInfoAt('7', `function foo<{
[x: string]: ...;
}>(deep: Deep<{
[x: string]: ...;
}>): {
[x: string]: ...;
}`);
verify.quickInfoAt('8', `{
[x: string]: ...;
}`);
verify.quickInfoAt('9', `{
[x: string]: ...;
}`);
verify.quickInfoAt('10', `{
[x: string]: ...;
}`);
|