File: genericClassWithStaticsUsingTypeArguments.symbols

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (37 lines) | stat: -rw-r--r-- 1,665 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
=== tests/cases/compiler/genericClassWithStaticsUsingTypeArguments.ts ===
// Should be error to use 'T' in all declarations within Foo.
class Foo<T> {
>Foo : Symbol(Foo, Decl(genericClassWithStaticsUsingTypeArguments.ts, 0, 0))
>T : Symbol(T, Decl(genericClassWithStaticsUsingTypeArguments.ts, 1, 10))

    static a = (n: T) => { };
>a : Symbol(Foo.a, Decl(genericClassWithStaticsUsingTypeArguments.ts, 1, 14))
>n : Symbol(n, Decl(genericClassWithStaticsUsingTypeArguments.ts, 2, 16))

    static b: T;
>b : Symbol(Foo.b, Decl(genericClassWithStaticsUsingTypeArguments.ts, 2, 29))

    static c: T[] = [];
>c : Symbol(Foo.c, Decl(genericClassWithStaticsUsingTypeArguments.ts, 4, 16))

    static d = false || ((x: T) => x || undefined)(null)
>d : Symbol(Foo.d, Decl(genericClassWithStaticsUsingTypeArguments.ts, 6, 23))
>x : Symbol(x, Decl(genericClassWithStaticsUsingTypeArguments.ts, 8, 26))
>x : Symbol(x, Decl(genericClassWithStaticsUsingTypeArguments.ts, 8, 26))
>undefined : Symbol(undefined)

    static e = function (x: T) { return null; }
>e : Symbol(Foo.e, Decl(genericClassWithStaticsUsingTypeArguments.ts, 8, 56))
>x : Symbol(x, Decl(genericClassWithStaticsUsingTypeArguments.ts, 10, 25))

    static f(xs: T[]): T[] {
>f : Symbol(Foo.f, Decl(genericClassWithStaticsUsingTypeArguments.ts, 10, 47))
>xs : Symbol(xs, Decl(genericClassWithStaticsUsingTypeArguments.ts, 12, 13))

        return xs.reverse();
>xs.reverse : Symbol(Array.reverse, Decl(lib.es5.d.ts, --, --))
>xs : Symbol(xs, Decl(genericClassWithStaticsUsingTypeArguments.ts, 12, 13))
>reverse : Symbol(Array.reverse, Decl(lib.es5.d.ts, --, --))
    }
}