TypeScript/tests/baselines/reference/privacyCheckAnonymousFunctionParameter2.types

40 lines
790 B
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/privacyCheckAnonymousFunctionParameter2.ts ===
export var x = 1; // Makes this an external module
>x : number
2015-04-13 21:36:11 +02:00
>1 : number
2014-08-15 23:33:16 +02:00
interface Iterator<T> { x: T }
>Iterator : Iterator<T>
>T : T
>x : T
>T : T
2014-08-15 23:33:16 +02:00
module Q {
>Q : typeof Q
2014-08-15 23:33:16 +02:00
export function foo<T>(x: (a: Iterator<T>) => number) {
>foo : <T>(x: (a: Iterator<T>) => number) => (a: Iterator<T>) => number
>T : T
>x : (a: Iterator<T>) => number
>a : Iterator<T>
>Iterator : Iterator<T>
>T : T
2014-08-15 23:33:16 +02:00
return x;
>x : (a: Iterator<T>) => number
2014-08-15 23:33:16 +02:00
}
}
module Q {
>Q : typeof Q
2014-08-15 23:33:16 +02:00
function bar() {
>bar : () => void
2014-08-15 23:33:16 +02:00
foo(null);
>foo(null) : (a: Iterator<{}>) => number
>foo : <T>(x: (a: Iterator<T>) => number) => (a: Iterator<T>) => number
2015-04-13 21:36:11 +02:00
>null : null
2014-08-15 23:33:16 +02:00
}
}