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 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
|
=== tests/cases/compiler/declFileConstructors_0.ts ===
export class SimpleConstructor {
>SimpleConstructor : Symbol(SimpleConstructor, Decl(declFileConstructors_0.ts, 0, 0))
/** This comment should appear for foo*/
constructor() {
}
}
export class ConstructorWithParameters {
>ConstructorWithParameters : Symbol(ConstructorWithParameters, Decl(declFileConstructors_0.ts, 5, 1))
/** This is comment for function signature*/
constructor(/** this is comment about a*/a: string,
>a : Symbol(a, Decl(declFileConstructors_0.ts, 8, 16))
/** this is comment for b*/
b: number) {
>b : Symbol(b, Decl(declFileConstructors_0.ts, 8, 55))
var d = a;
>d : Symbol(d, Decl(declFileConstructors_0.ts, 11, 11))
>a : Symbol(a, Decl(declFileConstructors_0.ts, 8, 16))
}
}
export class ConstructorWithRestParamters {
>ConstructorWithRestParamters : Symbol(ConstructorWithRestParamters, Decl(declFileConstructors_0.ts, 13, 1))
constructor(a: string, ...rests: string[]) {
>a : Symbol(a, Decl(declFileConstructors_0.ts, 16, 16))
>rests : Symbol(rests, Decl(declFileConstructors_0.ts, 16, 26))
return a + rests.join("");
>a : Symbol(a, Decl(declFileConstructors_0.ts, 16, 16))
>rests.join : Symbol(Array.join, Decl(lib.d.ts, --, --))
>rests : Symbol(rests, Decl(declFileConstructors_0.ts, 16, 26))
>join : Symbol(Array.join, Decl(lib.d.ts, --, --))
}
}
export class ConstructorWithOverloads {
>ConstructorWithOverloads : Symbol(ConstructorWithOverloads, Decl(declFileConstructors_0.ts, 19, 1))
constructor(a: string);
>a : Symbol(a, Decl(declFileConstructors_0.ts, 22, 16))
constructor(a: number);
>a : Symbol(a, Decl(declFileConstructors_0.ts, 23, 16))
constructor(a: any) {
>a : Symbol(a, Decl(declFileConstructors_0.ts, 24, 16))
}
}
export class ConstructorWithPublicParameterProperty {
>ConstructorWithPublicParameterProperty : Symbol(ConstructorWithPublicParameterProperty, Decl(declFileConstructors_0.ts, 26, 1))
constructor(public x: string) {
>x : Symbol(ConstructorWithPublicParameterProperty.x, Decl(declFileConstructors_0.ts, 29, 16))
}
}
export class ConstructorWithPrivateParameterProperty {
>ConstructorWithPrivateParameterProperty : Symbol(ConstructorWithPrivateParameterProperty, Decl(declFileConstructors_0.ts, 31, 1))
constructor(private x: string) {
>x : Symbol(ConstructorWithPrivateParameterProperty.x, Decl(declFileConstructors_0.ts, 34, 16))
}
}
export class ConstructorWithOptionalParameterProperty {
>ConstructorWithOptionalParameterProperty : Symbol(ConstructorWithOptionalParameterProperty, Decl(declFileConstructors_0.ts, 36, 1))
constructor(public x?: string) {
>x : Symbol(ConstructorWithOptionalParameterProperty.x, Decl(declFileConstructors_0.ts, 39, 16))
}
}
export class ConstructorWithParameterInitializer {
>ConstructorWithParameterInitializer : Symbol(ConstructorWithParameterInitializer, Decl(declFileConstructors_0.ts, 41, 1))
constructor(public x = "hello") {
>x : Symbol(ConstructorWithParameterInitializer.x, Decl(declFileConstructors_0.ts, 44, 16))
}
}
=== tests/cases/compiler/declFileConstructors_1.ts ===
class GlobalSimpleConstructor {
>GlobalSimpleConstructor : Symbol(GlobalSimpleConstructor, Decl(declFileConstructors_1.ts, 0, 0))
/** This comment should appear for foo*/
constructor() {
}
}
class GlobalConstructorWithParameters {
>GlobalConstructorWithParameters : Symbol(GlobalConstructorWithParameters, Decl(declFileConstructors_1.ts, 4, 1))
/** This is comment for function signature*/
constructor(/** this is comment about a*/a: string,
>a : Symbol(a, Decl(declFileConstructors_1.ts, 7, 16))
/** this is comment for b*/
b: number) {
>b : Symbol(b, Decl(declFileConstructors_1.ts, 7, 55))
var d = a;
>d : Symbol(d, Decl(declFileConstructors_1.ts, 10, 11))
>a : Symbol(a, Decl(declFileConstructors_1.ts, 7, 16))
}
}
class GlobalConstructorWithRestParamters {
>GlobalConstructorWithRestParamters : Symbol(GlobalConstructorWithRestParamters, Decl(declFileConstructors_1.ts, 12, 1))
constructor(a: string, ...rests: string[]) {
>a : Symbol(a, Decl(declFileConstructors_1.ts, 15, 16))
>rests : Symbol(rests, Decl(declFileConstructors_1.ts, 15, 26))
return a + rests.join("");
>a : Symbol(a, Decl(declFileConstructors_1.ts, 15, 16))
>rests.join : Symbol(Array.join, Decl(lib.d.ts, --, --))
>rests : Symbol(rests, Decl(declFileConstructors_1.ts, 15, 26))
>join : Symbol(Array.join, Decl(lib.d.ts, --, --))
}
}
class GlobalConstructorWithOverloads {
>GlobalConstructorWithOverloads : Symbol(GlobalConstructorWithOverloads, Decl(declFileConstructors_1.ts, 18, 1))
constructor(a: string);
>a : Symbol(a, Decl(declFileConstructors_1.ts, 21, 16))
constructor(a: number);
>a : Symbol(a, Decl(declFileConstructors_1.ts, 22, 16))
constructor(a: any) {
>a : Symbol(a, Decl(declFileConstructors_1.ts, 23, 16))
}
}
class GlobalConstructorWithPublicParameterProperty {
>GlobalConstructorWithPublicParameterProperty : Symbol(GlobalConstructorWithPublicParameterProperty, Decl(declFileConstructors_1.ts, 25, 1))
constructor(public x: string) {
>x : Symbol(GlobalConstructorWithPublicParameterProperty.x, Decl(declFileConstructors_1.ts, 28, 16))
}
}
class GlobalConstructorWithPrivateParameterProperty {
>GlobalConstructorWithPrivateParameterProperty : Symbol(GlobalConstructorWithPrivateParameterProperty, Decl(declFileConstructors_1.ts, 30, 1))
constructor(private x: string) {
>x : Symbol(GlobalConstructorWithPrivateParameterProperty.x, Decl(declFileConstructors_1.ts, 33, 16))
}
}
class GlobalConstructorWithOptionalParameterProperty {
>GlobalConstructorWithOptionalParameterProperty : Symbol(GlobalConstructorWithOptionalParameterProperty, Decl(declFileConstructors_1.ts, 35, 1))
constructor(public x?: string) {
>x : Symbol(GlobalConstructorWithOptionalParameterProperty.x, Decl(declFileConstructors_1.ts, 38, 16))
}
}
class GlobalConstructorWithParameterInitializer {
>GlobalConstructorWithParameterInitializer : Symbol(GlobalConstructorWithParameterInitializer, Decl(declFileConstructors_1.ts, 40, 1))
constructor(public x = "hello") {
>x : Symbol(GlobalConstructorWithParameterInitializer.x, Decl(declFileConstructors_1.ts, 43, 16))
}
}
|