mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
@@ -1,11 +1,51 @@
|
||||
//// [commentOnSignature1.ts]
|
||||
//// [tests/cases/compiler/commentOnSignature1.ts] ////
|
||||
|
||||
//// [a.ts]
|
||||
/*! Keep this pinned comment */
|
||||
function foo(n: number): void;
|
||||
// Don't keep this comment.
|
||||
function foo(s: string): void;
|
||||
function foo(a: any): void {
|
||||
}
|
||||
|
||||
class c {
|
||||
// dont keep this comment
|
||||
constructor(a: string);
|
||||
/*! keep this pinned comment */
|
||||
constructor(a: number);
|
||||
constructor(a: any) {
|
||||
}
|
||||
|
||||
// dont keep this comment
|
||||
foo(a: string);
|
||||
/*! keep this pinned comment */
|
||||
foo(a: number);
|
||||
foo(a: any) {
|
||||
}
|
||||
}
|
||||
|
||||
//// [b.ts]
|
||||
///<reference path='a.ts'/>
|
||||
function foo2(n: number): void;
|
||||
// Don't keep this comment.
|
||||
function foo2(s: string): void;
|
||||
function foo2(a: any): void {
|
||||
}
|
||||
|
||||
//// [commentOnSignature1.js]
|
||||
//// [a.js]
|
||||
/*! Keep this pinned comment */
|
||||
function foo(a) {
|
||||
}
|
||||
var c = (function () {
|
||||
/*! keep this pinned comment */
|
||||
function c(a) {
|
||||
}
|
||||
/*! keep this pinned comment */
|
||||
c.prototype.foo = function (a) {
|
||||
};
|
||||
return c;
|
||||
})();
|
||||
//// [b.js]
|
||||
///<reference path='a.ts'/>
|
||||
function foo2(a) {
|
||||
}
|
||||
|
||||
@@ -1,4 +1,19 @@
|
||||
=== tests/cases/compiler/commentOnSignature1.ts ===
|
||||
=== tests/cases/compiler/b.ts ===
|
||||
///<reference path='a.ts'/>
|
||||
function foo2(n: number): void;
|
||||
>foo2 : { (n: number): void; (s: string): void; }
|
||||
>n : number
|
||||
|
||||
// Don't keep this comment.
|
||||
function foo2(s: string): void;
|
||||
>foo2 : { (n: number): void; (s: string): void; }
|
||||
>s : string
|
||||
|
||||
function foo2(a: any): void {
|
||||
>foo2 : { (n: number): void; (s: string): void; }
|
||||
>a : any
|
||||
}
|
||||
=== tests/cases/compiler/a.ts ===
|
||||
/*! Keep this pinned comment */
|
||||
function foo(n: number): void;
|
||||
>foo : { (n: number): void; (s: string): void; }
|
||||
@@ -13,3 +28,35 @@ function foo(a: any): void {
|
||||
>foo : { (n: number): void; (s: string): void; }
|
||||
>a : any
|
||||
}
|
||||
|
||||
class c {
|
||||
>c : c
|
||||
|
||||
// dont keep this comment
|
||||
constructor(a: string);
|
||||
>a : string
|
||||
|
||||
/*! keep this pinned comment */
|
||||
constructor(a: number);
|
||||
>a : number
|
||||
|
||||
constructor(a: any) {
|
||||
>a : any
|
||||
}
|
||||
|
||||
// dont keep this comment
|
||||
foo(a: string);
|
||||
>foo : { (a: string): any; (a: number): any; }
|
||||
>a : string
|
||||
|
||||
/*! keep this pinned comment */
|
||||
foo(a: number);
|
||||
>foo : { (a: string): any; (a: number): any; }
|
||||
>a : number
|
||||
|
||||
foo(a: any) {
|
||||
>foo : { (a: string): any; (a: number): any; }
|
||||
>a : any
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,31 @@
|
||||
// @filename: a.ts
|
||||
/*! Keep this pinned comment */
|
||||
function foo(n: number): void;
|
||||
// Don't keep this comment.
|
||||
function foo(s: string): void;
|
||||
function foo(a: any): void {
|
||||
}
|
||||
|
||||
class c {
|
||||
// dont keep this comment
|
||||
constructor(a: string);
|
||||
/*! keep this pinned comment */
|
||||
constructor(a: number);
|
||||
constructor(a: any) {
|
||||
}
|
||||
|
||||
// dont keep this comment
|
||||
foo(a: string);
|
||||
/*! keep this pinned comment */
|
||||
foo(a: number);
|
||||
foo(a: any) {
|
||||
}
|
||||
}
|
||||
|
||||
//@filename:b.ts
|
||||
///<reference path='a.ts'/>
|
||||
function foo2(n: number): void;
|
||||
// Don't keep this comment.
|
||||
function foo2(s: string): void;
|
||||
function foo2(a: any): void {
|
||||
}
|
||||
Reference in New Issue
Block a user