File: callSignaturesWithAccessibilityModifiersOnParameters.types

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 (144 lines) | stat: -rw-r--r-- 3,805 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
138
139
140
141
142
143
144
=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts ===
// Call signature parameters do not allow accessibility modifiers

function foo(public x, private y) { }
>foo : (x: any, y: any) => void
>x : any
>y : any

var f = function foo(public x, private y) { }
>f : (x: any, y: any) => void
>function foo(public x, private y) { } : (x: any, y: any) => void
>foo : (x: any, y: any) => void
>x : any
>y : any

var f2 = function (public x, private y) { }
>f2 : (x: any, y: any) => void
>function (public x, private y) { } : (x: any, y: any) => void
>x : any
>y : any

var f3 = (x, private y) => { }
>f3 : (x: any, y: any) => void
>(x, private y) => { } : (x: any, y: any) => void
>x : any
>y : any

var f4 = <T>(public x: T, y: T) => { }
>f4 : <T>(x: T, y: T) => void
><T>(public x: T, y: T) => { } : <T>(x: T, y: T) => void
>x : T
>y : T

function foo2(private x: string, public y: number) { }
>foo2 : (x: string, y: number) => void
>x : string
>y : number

var f5 = function foo(private x: string, public y: number) { }
>f5 : (x: string, y: number) => void
>function foo(private x: string, public y: number) { } : (x: string, y: number) => void
>foo : (x: string, y: number) => void
>x : string
>y : number

var f6 = function (private x: string, public y: number) { }
>f6 : (x: string, y: number) => void
>function (private x: string, public y: number) { } : (x: string, y: number) => void
>x : string
>y : number

var f7 = (private x: string, public y: number) => { }
>f7 : (x: string, y: number) => void
>(private x: string, public y: number) => { } : (x: string, y: number) => void
>x : string
>y : number

var f8 = <T>(private x: T, public y: T) => { }
>f8 : <T>(x: T, y: T) => void
><T>(private x: T, public y: T) => { } : <T>(x: T, y: T) => void
>x : T
>y : T

class C {
>C : C

    foo(public x, private y) { }
>foo : (x: any, y: any) => void
>x : any
>y : any

    foo2(public x: number, private y: string) { }
>foo2 : (x: number, y: string) => void
>x : number
>y : string

    foo3<T>(public x: T, private y: T) { }
>foo3 : <T>(x: T, y: T) => void
>x : T
>y : T
}

interface I {
    (private x, public y);
>x : any
>y : any

    (private x: string, public y: number);
>x : string
>y : number

    foo(private x, public y);
>foo : { (x: any, y: any): any; (x: number, y: string): any; }
>x : any
>y : any

    foo(public x: number, y: string);
>foo : { (x: any, y: any): any; (x: number, y: string): any; }
>x : number
>y : string

    foo3<T>(x: T, private y: T);
>foo3 : <T>(x: T, y: T) => any
>x : T
>y : T
}

var a: {
>a : { foo(x: any, y: any): any; foo2(x: number, y: string): any; }

    foo(public x, private y);
>foo : (x: any, y: any) => any
>x : any
>y : any

    foo2(private x: number, public y: string);
>foo2 : (x: number, y: string) => any
>x : number
>y : string

};

var b = {
>b : { foo(x: any, y: any): void; a: (x: number, y: string) => void; b: <T>(x: T, y: T) => void; }
>{    foo(public x, y) { },    a: function foo(x: number, private y: string) { },    b: <T>(public x: T, private y: T) => { }} : { foo(x: any, y: any): void; a: (x: number, y: string) => void; b: <T>(x: T, y: T) => void; }

    foo(public x, y) { },
>foo : (x: any, y: any) => void
>x : any
>y : any

    a: function foo(x: number, private y: string) { },
>a : (x: number, y: string) => void
>function foo(x: number, private y: string) { } : (x: number, y: string) => void
>foo : (x: number, y: string) => void
>x : number
>y : string

    b: <T>(public x: T, private y: T) => { }
>b : <T>(x: T, y: T) => void
><T>(public x: T, private y: T) => { } : <T>(x: T, y: T) => void
>x : T
>y : T
}