39 lines
790 B
Text
39 lines
790 B
Text
=== tests/cases/compiler/privacyCheckAnonymousFunctionParameter2.ts ===
|
|
export var x = 1; // Makes this an external module
|
|
>x : number
|
|
>1 : 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
|
|
>null : null
|
|
}
|
|
}
|