File: thisInInnerFunctions.symbols

package info (click to toggle)
node-typescript 4.9.5%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 533,908 kB
  • sloc: javascript: 2,018,330; makefile: 7; sh: 1
file content (31 lines) | stat: -rw-r--r-- 814 bytes parent folder | download | duplicates (7)
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
=== tests/cases/compiler/thisInInnerFunctions.ts ===
class Foo {
>Foo : Symbol(Foo, Decl(thisInInnerFunctions.ts, 0, 0))

    x = "hello";
>x : Symbol(Foo.x, Decl(thisInInnerFunctions.ts, 0, 11))

    bar() {
>bar : Symbol(Foo.bar, Decl(thisInInnerFunctions.ts, 1, 16))

        function inner() {
>inner : Symbol(inner, Decl(thisInInnerFunctions.ts, 2, 11))

            this.y = "hi"; // 'this' should be not type to 'Foo' either
            var f = () => this.y;  // 'this' should be not type to 'Foo' either
>f : Symbol(f, Decl(thisInInnerFunctions.ts, 5, 15))
        }
    }
}

function test() {
>test : Symbol(test, Decl(thisInInnerFunctions.ts, 8, 1))

    var x = () => {
>x : Symbol(x, Decl(thisInInnerFunctions.ts, 11, 7))

        (() => this)();
        this;
    };
}