File tree Expand file tree Collapse file tree 6 files changed +72
-1
lines changed Expand file tree Collapse file tree 6 files changed +72
-1
lines changed Original file line number Diff line number Diff line change @@ -1616,6 +1616,9 @@ module ts {
1616
1616
write ( " {" ) ;
1617
1617
scopeEmitStart ( node , "constructor" ) ;
1618
1618
increaseIndent ( ) ;
1619
+ if ( ctor ) {
1620
+ emitDetachedComments ( ( < Block > ctor . body ) . statements ) ;
1621
+ }
1619
1622
emitCaptureThisForNodeIfNecessary ( node ) ;
1620
1623
if ( ctor ) {
1621
1624
emitDefaultValueAssignments ( ctor ) ;
Original file line number Diff line number Diff line change
1
+ //// [detachedCommentAtStartOfConstructor1.ts]
2
+ class TestFile {
3
+ public message : string ;
4
+ public name ;
5
+ constructor ( message : string ) {
6
+ /// <summary>Test summary</summary>
7
+ /// <param name="message" type="String" />
8
+ var getMessage = ( ) => message + this . name ;
9
+ this . message = getMessage ( ) ;
10
+ }
11
+ }
12
+
13
+ //// [detachedCommentAtStartOfConstructor1.js]
14
+ var TestFile = ( function ( ) {
15
+ function TestFile ( message ) {
16
+ var _this = this ;
17
+ /// <summary>Test summary</summary>
18
+ /// <param name="message" type="String" />
19
+ var getMessage = function ( ) { return message + _this . name ; } ;
20
+ this . message = getMessage ( ) ;
21
+ }
22
+ return TestFile ;
23
+ } ) ( ) ;
Original file line number Diff line number Diff line change
1
+ //// [detachedCommentAtStartOfConstructor2.ts]
2
+ class TestFile {
3
+ public message : string ;
4
+ public name : string ;
5
+ constructor ( message : string ) {
6
+ /// <summary>Test summary</summary>
7
+ /// <param name="message" type="String" />
8
+
9
+ var getMessage = ( ) => message + this . name ;
10
+ this . message = getMessage ( ) ;
11
+ }
12
+ }
13
+
14
+ //// [detachedCommentAtStartOfConstructor2.js]
15
+ var TestFile = ( function ( ) {
16
+ function TestFile ( message ) {
17
+ /// <summary>Test summary</summary>
18
+ /// <param name="message" type="String" />
19
+ var _this = this ;
20
+ var getMessage = function ( ) { return message + _this . name ; } ;
21
+ this . message = getMessage ( ) ;
22
+ }
23
+ return TestFile ;
24
+ } ) ( ) ;
Original file line number Diff line number Diff line change @@ -43,9 +43,9 @@ var __extends = this.__extends || function (d, b) {
43
43
} ;
44
44
var Event = ( function ( ) {
45
45
function Event ( ) {
46
- this . _listeners = [ ] ;
47
46
// TODO: remove
48
47
this . _listeners = [ ] ;
48
+ this . _listeners = [ ] ;
49
49
}
50
50
Event . prototype . add = function ( listener ) {
51
51
/// <summary>Registers a new listener for the event.</summary>
Original file line number Diff line number Diff line change
1
+ class TestFile {
2
+ public message : string ;
3
+ public name ;
4
+ constructor ( message : string ) {
5
+ /// <summary>Test summary</summary>
6
+ /// <param name="message" type="String" />
7
+ var getMessage = ( ) => message + this . name ;
8
+ this . message = getMessage ( ) ;
9
+ }
10
+ }
Original file line number Diff line number Diff line change
1
+ class TestFile {
2
+ public message : string ;
3
+ public name : string ;
4
+ constructor ( message : string ) {
5
+ /// <summary>Test summary</summary>
6
+ /// <param name="message" type="String" />
7
+
8
+ var getMessage = ( ) => message + this . name ;
9
+ this . message = getMessage ( ) ;
10
+ }
11
+ }
You can’t perform that action at this time.
0 commit comments