Hierarchy

  • ParseConfig

Properties

associateParser?: ExtensionsDb

Associate the filetypes with parsers. This allows adding support for new filetypes, or overriding the config for existing ones.

{
'.myExt1': { parserName: 'myCustomParser1' },
'.myExt2': { parserName: 'myCustomParser2' },
'.myExt3': { parserName: 'defaultParser' },
}
customParsers?: CustomParsers

Extend or override the parsers by parserName, for example override the defaultParser or add a new parser

{
myCustomParser1: function (parseOptions) {
return function parse(contents, file) {
const comments = [];
// do something with contents
comments.push({
file: file,
tag: 'TODO',
line: 42,
text: 'The comment text/body',
ref: ''
});
return comments;
}
},
myCustomParser2: function (parseOptions) {
// etc
},
}
customTags?: string[]

Other tags to look for (besides todos and fixmes). Tags are case-insensitive and are strict matching, i.e PROD tag will match PROD but not PRODUCTS

extension: string

The extension which identifies the filetype. Includes the dot if relevant (i.e: .js)

filename?: string

The filename from which the content was derived from. Useful for reporting purposes

withInlineFiles?: boolean

Whether to also parse known inline file associations (for example html in php files)

Generated using TypeDoc