@@ -94,7 +94,8 @@ export class Converter extends ChildableComponent<
94
94
95
95
/**
96
96
* Triggered when the converter has created a signature reflection.
97
- * The listener will be given {@link Context}, {@link SignatureReflection} | {@link ProjectReflection} and a `ts.Node?`
97
+ * The listener will be given {@link Context}, {@link SignatureReflection} | {@link ProjectReflection} and
98
+ * `ts.SignatureDeclaration | ts.IndexSignatureDeclaration | ts.JSDocSignature | undefined`
98
99
* @event
99
100
*/
100
101
static readonly EVENT_CREATE_SIGNATURE = ConverterEvents . CREATE_SIGNATURE ;
@@ -183,6 +184,18 @@ export class Converter extends ChildableComponent<
183
184
return convertType ( context , node ) ;
184
185
}
185
186
187
+ /**
188
+ * Parse the given file into a comment. Intended to be used with markdown files.
189
+ */
190
+ parseRawComment ( file : MinimalSourceFile ) {
191
+ return parseComment (
192
+ lexCommentString ( file . text ) ,
193
+ this . config ,
194
+ file ,
195
+ this . application . logger
196
+ ) ;
197
+ }
198
+
186
199
/**
187
200
* Compile the files within the given context and convert the compiler symbols to reflections.
188
201
*
@@ -264,11 +277,8 @@ export class Converter extends ChildableComponent<
264
277
265
278
if ( entryPoint . readmeFile ) {
266
279
const readme = readFile ( entryPoint . readmeFile ) ;
267
- const comment = parseComment (
268
- lexCommentString ( readme ) ,
269
- context . converter . config ,
270
- new MinimalSourceFile ( readme , entryPoint . readmeFile ) ,
271
- context . logger
280
+ const comment = this . parseRawComment (
281
+ new MinimalSourceFile ( readme , entryPoint . readmeFile )
272
282
) ;
273
283
274
284
if ( comment . blockTags . length || comment . modifierTags . size ) {
0 commit comments