TypeScript/tests/baselines/reference/genericClassWithStaticsUsingTypeArguments.types
Anders Hejlsberg a4f9bf0fce
Create type aliases for unresolved type symbols (#45976)
* Create type aliases for unresolved type symbols

* Accept new baselines

* Update fourslash tests

* Unresolved import aliases create tagged unresolved symbols

* Add comments

* Accept new baselines

* Add fourslash tests
2021-09-23 13:21:27 -07:00

49 lines
1,023 B
Plaintext

=== tests/cases/compiler/genericClassWithStaticsUsingTypeArguments.ts ===
// Should be error to use 'T' in all declarations within Foo.
class Foo<T> {
>Foo : Foo<T>
static a = (n: T) => { };
>a : (n: T) => void
>(n: T) => { } : (n: T) => void
>n : T
static b: T;
>b : T
static c: T[] = [];
>c : T[]
>[] : undefined[]
static d = false || ((x: T) => x || undefined)(null)
>d : any
>false || ((x: T) => x || undefined)(null) : any
>false : false
>((x: T) => x || undefined)(null) : any
>((x: T) => x || undefined) : (x: T) => any
>(x: T) => x || undefined : (x: T) => any
>x : T
>x || undefined : any
>x : T
>undefined : undefined
>null : null
static e = function (x: T) { return null; }
>e : (x: T) => any
>function (x: T) { return null; } : (x: T) => any
>x : T
>null : null
static f(xs: T[]): T[] {
>f : (xs: T[]) => T[]
>xs : T[]
return xs.reverse();
>xs.reverse() : T[]
>xs.reverse : () => T[]
>xs : T[]
>reverse : () => T[]
}
}