2014-07-13 01:04:16 +02:00
|
|
|
//// [tests/cases/compiler/declFileConstructSignatures.ts] ////
|
|
|
|
|
|
|
|
//// [declFileConstructSignatures_0.ts]
|
|
|
|
|
|
|
|
export interface IConstructSignature {
|
|
|
|
/** This comment should appear for foo*/
|
|
|
|
new (): string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IConstructSignatureWithParameters {
|
|
|
|
/** This is comment for function signature*/
|
|
|
|
new (/** this is comment about a*/a: string,
|
|
|
|
/** this is comment for b*/
|
|
|
|
b: number);
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IConstructSignatureWithRestParameters {
|
|
|
|
new (a: string, ...rests: string[]): string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IConstructSignatureWithOverloads {
|
|
|
|
new (a: string): string;
|
|
|
|
new (a: number): number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IConstructSignatureWithTypeParameters<T> {
|
|
|
|
/** This comment should appear for foo*/
|
|
|
|
new (a: T): T;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IConstructSignatureWithOwnTypeParametes {
|
|
|
|
new <T extends IConstructSignature>(a: T): T;
|
|
|
|
}
|
|
|
|
|
|
|
|
//// [declFileConstructSignatures_1.ts]
|
|
|
|
interface IGlobalConstructSignature {
|
|
|
|
/** This comment should appear for foo*/
|
|
|
|
new (): string;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface IGlobalConstructSignatureWithParameters {
|
|
|
|
/** This is comment for function signature*/
|
|
|
|
new (/** this is comment about a*/a: string,
|
|
|
|
/** this is comment for b*/
|
|
|
|
b: number);
|
|
|
|
}
|
|
|
|
|
|
|
|
interface IGlobalConstructSignatureWithRestParameters {
|
|
|
|
|
|
|
|
new (a: string, ...rests: string[]): string;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
interface IGlobalConstructSignatureWithOverloads {
|
|
|
|
new (a: string): string;
|
|
|
|
new (a: number): number;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface IGlobalConstructSignatureWithTypeParameters<T> {
|
|
|
|
/** This comment should appear for foo*/
|
|
|
|
new (a: T): T;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface IGlobalConstructSignatureWithOwnTypeParametes {
|
|
|
|
new <T extends IGlobalConstructSignature>(a: T): T;
|
|
|
|
}
|
|
|
|
|
|
|
|
//// [declFileConstructSignatures_0.js]
|
|
|
|
//// [declFileConstructSignatures_1.js]
|
|
|
|
|
|
|
|
|
|
|
|
//// [declFileConstructSignatures_0.d.ts]
|
|
|
|
export interface IConstructSignature {
|
2014-07-12 01:36:06 +02:00
|
|
|
new (): string;
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
export interface IConstructSignatureWithParameters {
|
2014-07-12 01:36:06 +02:00
|
|
|
new (a: string, b: number): any;
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
export interface IConstructSignatureWithRestParameters {
|
2014-07-12 01:36:06 +02:00
|
|
|
new (a: string, ...rests: string[]): string;
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
export interface IConstructSignatureWithOverloads {
|
2014-07-12 01:36:06 +02:00
|
|
|
new (a: string): string;
|
|
|
|
new (a: number): number;
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
export interface IConstructSignatureWithTypeParameters<T> {
|
2014-07-12 01:36:06 +02:00
|
|
|
new (a: T): T;
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
export interface IConstructSignatureWithOwnTypeParametes {
|
2014-07-12 01:36:06 +02:00
|
|
|
new <T extends IConstructSignature>(a: T): T;
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
//// [declFileConstructSignatures_1.d.ts]
|
2014-07-11 23:44:31 +02:00
|
|
|
interface IGlobalConstructSignature {
|
2014-07-12 01:36:06 +02:00
|
|
|
new (): string;
|
2014-07-11 23:44:31 +02:00
|
|
|
}
|
|
|
|
interface IGlobalConstructSignatureWithParameters {
|
2014-07-12 01:36:06 +02:00
|
|
|
new (a: string, b: number): any;
|
2014-07-11 23:44:31 +02:00
|
|
|
}
|
|
|
|
interface IGlobalConstructSignatureWithRestParameters {
|
2014-07-12 01:36:06 +02:00
|
|
|
new (a: string, ...rests: string[]): string;
|
2014-07-11 23:44:31 +02:00
|
|
|
}
|
|
|
|
interface IGlobalConstructSignatureWithOverloads {
|
2014-07-12 01:36:06 +02:00
|
|
|
new (a: string): string;
|
|
|
|
new (a: number): number;
|
2014-07-11 23:44:31 +02:00
|
|
|
}
|
|
|
|
interface IGlobalConstructSignatureWithTypeParameters<T> {
|
2014-07-12 01:36:06 +02:00
|
|
|
new (a: T): T;
|
2014-07-11 23:44:31 +02:00
|
|
|
}
|
|
|
|
interface IGlobalConstructSignatureWithOwnTypeParametes {
|
2014-07-12 01:36:06 +02:00
|
|
|
new <T extends IGlobalConstructSignature>(a: T): T;
|
2014-07-11 23:44:31 +02:00
|
|
|
}
|