mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-28 09:22:42 -05:00
Declaration comments for the property declaration in .d.ts
This commit is contained in:
@@ -2380,6 +2380,7 @@ module ts {
|
||||
}
|
||||
|
||||
function emitPropertyDeclaration(node: PropertyDeclaration) {
|
||||
emitJsDocComments(node);
|
||||
emitDeclarationFlags(node);
|
||||
emitVariableDeclaration(node);
|
||||
write(";");
|
||||
|
||||
@@ -168,6 +168,7 @@ declare var i7_c: typeof c7;
|
||||
/** class with statics and constructor
|
||||
*/
|
||||
declare class c8 {
|
||||
/** s1 comment */
|
||||
static s1: number;
|
||||
constructor();
|
||||
}
|
||||
|
||||
@@ -473,13 +473,16 @@ cProperties_i.nc_p2 = cProperties_i.nc_p1;
|
||||
//// [commentsClassMembers.d.ts]
|
||||
/** This is comment for c1*/
|
||||
declare class c1 {
|
||||
/** p1 is property of c1*/
|
||||
p1: number;
|
||||
p2(b: number): number;
|
||||
p3: number;
|
||||
/** pp1 is property of c1*/
|
||||
private pp1;
|
||||
private pp2(b);
|
||||
private pp3;
|
||||
constructor();
|
||||
/** s1 is static property of c1*/
|
||||
static s1: number;
|
||||
static s2(b: number): number;
|
||||
static s3: number;
|
||||
@@ -501,12 +504,15 @@ declare class c1 {
|
||||
static a_s1: number;
|
||||
static a_s2(b: number): number;
|
||||
static a_s3: number;
|
||||
/** p1 is property of c1 */
|
||||
b_p1: number;
|
||||
b_p2(b: number): number;
|
||||
b_p3: number;
|
||||
/** pp1 is property of c1 */
|
||||
private b_pp1;
|
||||
private b_pp2(b);
|
||||
private b_pp3;
|
||||
/** s1 is static property of c1 */
|
||||
static b_s1: number;
|
||||
static b_s2(b: number): number;
|
||||
static b_s3: number;
|
||||
|
||||
@@ -270,8 +270,10 @@ i2_i = i3_i;
|
||||
//// [commentsInheritance.d.ts]
|
||||
/** i1 is interface with properties*/
|
||||
interface i1 {
|
||||
/** i1_p1*/
|
||||
i1_p1: number;
|
||||
i1_f1(): void;
|
||||
/** i1_l1*/
|
||||
i1_l1: () => void;
|
||||
i1_nc_p1: number;
|
||||
i1_nc_f1(): void;
|
||||
@@ -290,22 +292,28 @@ declare class c1 implements i1 {
|
||||
i1_nc_p1: number;
|
||||
i1_nc_f1(): void;
|
||||
i1_nc_l1: () => void;
|
||||
/** c1_p1*/
|
||||
p1: number;
|
||||
f1(): void;
|
||||
/** c1_l1*/
|
||||
l1: () => void;
|
||||
/** c1_nc_p1*/
|
||||
nc_p1: number;
|
||||
nc_f1(): void;
|
||||
/** c1_nc_l1*/
|
||||
nc_l1: () => void;
|
||||
}
|
||||
declare var i1_i: i1;
|
||||
declare var c1_i: c1;
|
||||
declare class c2 {
|
||||
/** c2 c2_p1*/
|
||||
c2_p1: number;
|
||||
c2_f1(): void;
|
||||
c2_prop: number;
|
||||
c2_nc_p1: number;
|
||||
c2_nc_f1(): void;
|
||||
c2_nc_prop: number;
|
||||
/** c2 p1*/
|
||||
p1: number;
|
||||
f1(): void;
|
||||
prop: number;
|
||||
@@ -316,6 +324,7 @@ declare class c2 {
|
||||
}
|
||||
declare class c3 extends c2 {
|
||||
constructor();
|
||||
/** c3 p1*/
|
||||
p1: number;
|
||||
f1(): void;
|
||||
prop: number;
|
||||
@@ -329,22 +338,28 @@ declare class c4 extends c2 {
|
||||
}
|
||||
declare var c4_i: c4;
|
||||
interface i2 {
|
||||
/** i2_p1*/
|
||||
i2_p1: number;
|
||||
i2_f1(): void;
|
||||
/** i2_l1*/
|
||||
i2_l1: () => void;
|
||||
i2_nc_p1: number;
|
||||
i2_nc_f1(): void;
|
||||
i2_nc_l1: () => void;
|
||||
/** i2 p1*/
|
||||
p1: number;
|
||||
f1(): void;
|
||||
/** i2 l1*/
|
||||
l1: () => void;
|
||||
nc_p1: number;
|
||||
nc_f1(): void;
|
||||
nc_l1: () => void;
|
||||
}
|
||||
interface i3 extends i2 {
|
||||
/** i3 p1 */
|
||||
p1: number;
|
||||
f1(): void;
|
||||
/** i3 l1*/
|
||||
l1: () => void;
|
||||
nc_p1: number;
|
||||
nc_f1(): void;
|
||||
|
||||
@@ -113,7 +113,9 @@ interface nc_i1 {
|
||||
declare var nc_i1_i: nc_i1;
|
||||
/** this is interface 2 with memebers*/
|
||||
interface i2 {
|
||||
/** this is x*/
|
||||
x: number;
|
||||
/** this is foo*/
|
||||
foo: (b: number) => string;
|
||||
[i: string]: any;
|
||||
new (i: i1): any;
|
||||
@@ -141,8 +143,10 @@ declare var i2_i_fnfoo_r: string;
|
||||
declare var i2_i_nc_fnfoo: (b: number) => string;
|
||||
declare var i2_i_nc_fnfoo_r: string;
|
||||
interface i3 {
|
||||
/** Comment i3 x*/
|
||||
x: number;
|
||||
f(a: number): string;
|
||||
/** i3 l*/
|
||||
l: (b: number) => string;
|
||||
nc_x: number;
|
||||
nc_f(a: number): string;
|
||||
|
||||
@@ -152,6 +152,7 @@ declare var fooVar: () => void;
|
||||
/**class comment*/
|
||||
declare class c {
|
||||
constructor();
|
||||
/** property comment */
|
||||
b: number;
|
||||
myFoo(): number;
|
||||
prop1: number;
|
||||
@@ -165,6 +166,7 @@ interface i1 {
|
||||
new (b: string): any;
|
||||
[a: number]: string;
|
||||
myFoo(a: number): string;
|
||||
/** prop*/
|
||||
prop: string;
|
||||
}
|
||||
declare var i1_i: i1;
|
||||
|
||||
Reference in New Issue
Block a user