(data: any, onError?: (error: string) => void)
| 29 | } |
| 30 | |
| 31 | function parseExecMappingsFile(data: any, onError?: (error: string) => void) : ExecMappingFile { |
| 32 | const parsed: ExecMappingFile = { |
| 33 | execs: [], |
| 34 | }; |
| 35 | const parser = new ObjectParser({ |
| 36 | input: data, |
| 37 | onError: onError && ((e) => { onError(`Error while parsing Exec Mappings: ${e.toString()}`); }) |
| 38 | }); |
| 39 | parser.prop('execs').array(item => parsed.execs.push(parseExecMapping(item))); |
| 40 | return parsed; |
| 41 | } |
| 42 | |
| 43 | function parseExecMapping(parser: IObjectParserProp<any>) : ExecMapping { |
| 44 | const parsed: ExecMapping = { |
no test coverage detected