Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Note which standard all members in std are from
- Loading branch information
1 parent
dd88622
commit e345d28
Showing
4 changed files
with
33 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
ts/src/main/scala/org/scalablytyped/converter/internal/ts/transforms/AddComments.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package org.scalablytyped.converter.internal | ||
package ts | ||
package transforms | ||
|
||
case class AddComments(newComments: Comments) extends TreeTransformationUnit { | ||
override def enterTsMember(t: Unit)(x: TsMember): TsMember = | ||
x match { | ||
case x: TsMemberCall => x.copy(comments = x.comments ++ newComments) | ||
case x: TsMemberCtor => x.copy(comments = x.comments ++ newComments) | ||
case x: TsMemberFunction => x.copy(comments = x.comments ++ newComments) | ||
case x: TsMemberIndex => x.copy(comments = x.comments ++ newComments) | ||
case x: TsMemberTypeMapped => x.copy(comments = x.comments ++ newComments) | ||
case x: TsMemberProperty => x.copy(comments = x.comments ++ newComments) | ||
} | ||
} |