Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ParseConfig

Hierarchy

  • ParseConfig

Index

Properties

Optional associateParser

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' },
}

Optional customParsers

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
     },
}

Optional customTags

customTags: Tag[]

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

extension: string

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

Optional filename

filename: string

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

Optional withInlineFiles

withInlineFiles: boolean

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

Generated using TypeDoc