@@ -27,7 +27,7 @@ import { TestLogger } from "./TestLogger";
2727import { clearCommentCache } from "../lib/converter/comments" ;
2828import { join } from "path" ;
2929import { existsSync } from "fs" ;
30- import { getLinks , query } from "./utils" ;
30+ import { getComment , getLinks , query } from "./utils" ;
3131
3232const base = getConverter2Base ( ) ;
3333const app = getConverter2App ( ) ;
@@ -1111,4 +1111,26 @@ describe("Issue Tests", () => {
11111111 } ,
11121112 ] ) ;
11131113 } ) ;
1114+
1115+ it ( "Handles comments on interfaces with call signatures #2290" , ( ) => {
1116+ const project = convert ( ) ;
1117+
1118+ equal ( getComment ( project , "CallSignature" ) , "Int comment" ) ;
1119+ equal ( getComment ( project , "CallSignature2" ) , "Int comment" ) ;
1120+ equal ( getComment ( project , "CallSignature2.prop" ) , "Prop comment" ) ;
1121+
1122+ equal (
1123+ Comment . combineDisplayParts (
1124+ query ( project , "CallSignature" ) . signatures ! [ 0 ] . comment ?. summary
1125+ ) ,
1126+ "Sig comment"
1127+ ) ;
1128+
1129+ equal (
1130+ Comment . combineDisplayParts (
1131+ query ( project , "CallSignature2" ) . signatures ! [ 0 ] . comment ?. summary
1132+ ) ,
1133+ "Sig comment"
1134+ ) ;
1135+ } ) ;
11141136} ) ;
0 commit comments