File: thisTypeErrors.types

package info (click to toggle)
node-typescript 5.0.4%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 459,140 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (137 lines) | stat: -rw-r--r-- 2,155 bytes parent folder | download | duplicates (5)
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
=== tests/cases/conformance/types/thisType/thisTypeErrors.ts ===
var x1: this;
>x1 : any

var x2: { a: this };
>x2 : { a: any; }
>a : any

var x3: this[];
>x3 : any[]

function f1(x: this): this {
>f1 : (x: any) => any
>x : any

    var y: this;
>y : any

    return this;
>this : any
}

interface I1 {
    a: { x: this };
>a : { x: any; }
>x : any

    b: { (): this };
>b : () => any

    c: { new (): this };
>c : new () => any

    d: { [x: string]: this };
>d : { [x: string]: any; }
>x : string

    e: { f(x: this): this };
>e : { f(x: any): any; }
>f : (x: any) => any
>x : any
}

class C1 {
>C1 : C1

    a: { x: this };
>a : { x: any; }
>x : any

    b: { (): this };
>b : () => any

    c: { new (): this };
>c : new () => any

    d: { [x: string]: this };
>d : { [x: string]: any; }
>x : string

    e: { f(x: this): this };
>e : { f(x: any): any; }
>f : (x: any) => any
>x : any
}

class C2 {
>C2 : C2

    static x: this;
>x : any

    static y = <this>undefined;
>y : any
><this>undefined : any
>undefined : undefined

    static foo(x: this): this {
>foo : (x: any) => any
>x : any

        return undefined;
>undefined : undefined
    }
}

namespace N1 {
>N1 : typeof N1

    export var x: this;
>x : any

    export var y = this;
>y : any
>this : any
}

class C3 {
>C3 : C3

    x1 = {
>x1 : { g(x: any): any; }
>{        g(x: this): this {            return undefined;        }    } : { g(x: any): any; }

        g(x: this): this {
>g : (x: any) => any
>x : any

            return undefined;
>undefined : undefined
        }
    }
    f() {
>f : () => void

        function g(x: this): this {
>g : (x: any) => any
>x : any

            return undefined;
>undefined : undefined
        }
        let x2 = {
>x2 : { h(x: any): any; }
>{            h(x: this): this {                return undefined;            }        } : { h(x: any): any; }

            h(x: this): this {
>h : (x: any) => any
>x : any

                return undefined;
>undefined : undefined
            }
        }
    }
}