38 lines
763 B
Plaintext
38 lines
763 B
Plaintext
=== tests/cases/compiler/privacyCheckAnonymousFunctionParameter2.ts ===
|
|
export var x = 1; // Makes this an external module
|
|
>x : number
|
|
|
|
interface Iterator<T> { x: T }
|
|
>Iterator : Iterator<T>
|
|
>T : T
|
|
>x : T
|
|
>T : T
|
|
|
|
module Q {
|
|
>Q : typeof Q
|
|
|
|
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
|
|
|
|
return x;
|
|
>x : (a: Iterator<T>) => number
|
|
}
|
|
}
|
|
|
|
module Q {
|
|
>Q : typeof Q
|
|
|
|
function bar() {
|
|
>bar : () => void
|
|
|
|
foo(null);
|
|
>foo(null) : (a: Iterator<{}>) => number
|
|
>foo : <T>(x: (a: Iterator<T>) => number) => (a: Iterator<T>) => number
|
|
}
|
|
}
|