173 lines
6 KiB
Plaintext
173 lines
6 KiB
Plaintext
=== 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, 1035, 31))
|
|
>rests : Symbol(rests, Decl(declFileConstructors_0.ts, 16, 26))
|
|
>join : Symbol(Array.join, Decl(lib.d.ts, 1035, 31))
|
|
}
|
|
}
|
|
|
|
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(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(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(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(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, 1035, 31))
|
|
>rests : Symbol(rests, Decl(declFileConstructors_1.ts, 15, 26))
|
|
>join : Symbol(Array.join, Decl(lib.d.ts, 1035, 31))
|
|
}
|
|
}
|
|
|
|
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(x, Decl(declFileConstructors_1.ts, 28, 16))
|
|
}
|
|
}
|
|
|
|
class GlobalConstructorWithPrivateParameterProperty {
|
|
>GlobalConstructorWithPrivateParameterProperty : Symbol(GlobalConstructorWithPrivateParameterProperty, Decl(declFileConstructors_1.ts, 30, 1))
|
|
|
|
constructor(private x: string) {
|
|
>x : Symbol(x, Decl(declFileConstructors_1.ts, 33, 16))
|
|
}
|
|
}
|
|
|
|
class GlobalConstructorWithOptionalParameterProperty {
|
|
>GlobalConstructorWithOptionalParameterProperty : Symbol(GlobalConstructorWithOptionalParameterProperty, Decl(declFileConstructors_1.ts, 35, 1))
|
|
|
|
constructor(public x?: string) {
|
|
>x : Symbol(x, Decl(declFileConstructors_1.ts, 38, 16))
|
|
}
|
|
}
|
|
|
|
class GlobalConstructorWithParameterInitializer {
|
|
>GlobalConstructorWithParameterInitializer : Symbol(GlobalConstructorWithParameterInitializer, Decl(declFileConstructors_1.ts, 40, 1))
|
|
|
|
constructor(public x = "hello") {
|
|
>x : Symbol(x, Decl(declFileConstructors_1.ts, 43, 16))
|
|
}
|
|
}
|