@@ -94,7 +94,8 @@ export class Converter extends ChildableComponent<
9494
9595 /**
9696 * 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`
9899 * @event
99100 */
100101 static readonly EVENT_CREATE_SIGNATURE = ConverterEvents . CREATE_SIGNATURE ;
@@ -183,6 +184,18 @@ export class Converter extends ChildableComponent<
183184 return convertType ( context , node ) ;
184185 }
185186
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+
186199 /**
187200 * Compile the files within the given context and convert the compiler symbols to reflections.
188201 *
@@ -264,11 +277,8 @@ export class Converter extends ChildableComponent<
264277
265278 if ( entryPoint . readmeFile ) {
266279 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 )
272282 ) ;
273283
274284 if ( comment . blockTags . length || comment . modifierTags . size ) {
0 commit comments