TypeScript/tests/baselines/reference/localTypes5.types
Wesley Wigham 3fc727b256
Use import types to refer to declarations in declaration emit (#24071)
* Stand up a simple implementation using import types for exports of modules which are otherwise inaccessible

* Ensure references exist to link to modules containing utilized ambient modules

* Accept baselines with new import type usage

* Fix lint
2018-05-17 13:08:22 -07:00

48 lines
1.5 KiB
Plaintext

=== tests/cases/conformance/types/localTypes/localTypes5.ts ===
function foo<A>() {
>foo : <A>() => X.m<number, boolean>.(Anonymous function)<Date>.Y<string>
>A : A
class X {
>X : X
m<B, C>() {
>m : <B, C>() => (Anonymous function)<Date>.Y<string>
>B : B
>C : C
return (function <D>() {
>(function <D>() { class Y<E> { } return new Y<string>(); })<Date>() : (Anonymous function)<Date>.Y<string>
>(function <D>() { class Y<E> { } return new Y<string>(); }) : <D>() => Y<string>
>function <D>() { class Y<E> { } return new Y<string>(); } : <D>() => Y<string>
>D : D
class Y<E> {
>Y : Y<E>
>E : E
}
return new Y<string>();
>new Y<string>() : Y<string>
>Y : typeof Y
})<Date>();
>Date : Date
}
}
var x = new X();
>x : X
>new X() : X
>X : typeof X
return x.m<number, boolean>();
>x.m<number, boolean>() : X.m<number, boolean>.(Anonymous function)<Date>.Y<string>
>x.m : <B, C>() => X.m<B, C>.(Anonymous function)<Date>.Y<string>
>x : X
>m : <B, C>() => X.m<B, C>.(Anonymous function)<Date>.Y<string>
}
var x = foo<void>();
>x : foo<void>.X.m<number, boolean>.(Anonymous function)<Date>.Y<string>
>foo<void>() : foo<void>.X.m<number, boolean>.(Anonymous function)<Date>.Y<string>
>foo : <A>() => X.m<number, boolean>.(Anonymous function)<Date>.Y<string>