Skip to content

registerParser

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/apps/parser-orchestrator/src/queue/processors/parse.processor.ts

Register a parser implementation

Signature

ts
function registerParser(name: string, parser: {
    parseFile: (filePath: string, content?: string) => Promise<ParseResult>;
    parseFiles: (files: Array<{ filePath: string; content?: string }>) => Promise<ParseResult[]>;
  }): void

Parameters

NameType
namestring
parser`{
parseFile: (filePath: string, content?: string) => Promise<ParseResult>;
parseFiles: (files: Array<{ filePath: string; content?: string }>) => Promise<ParseResult[]>;

}` |

Returns: void

Was this page helpful?

Download as PDF