* Processes the provided error callback. * @param {ErrorCallback} callback signals when the call finishes * @returns {void}
(callback)
| 1111 | * @returns {void} |
| 1112 | */ |
| 1113 | emitRecords(callback) { |
| 1114 | if (this.hooks.emitRecords.isUsed()) { |
| 1115 | if (this.recordsOutputPath) { |
| 1116 | asyncLib.parallel( |
| 1117 | [ |
| 1118 | (cb) => this.hooks.emitRecords.callAsync(cb), |
| 1119 | this._emitRecords.bind(this) |
| 1120 | ], |
| 1121 | (err) => callback(/** @type {Error | null} */ (err)) |
| 1122 | ); |
| 1123 | } else { |
| 1124 | this.hooks.emitRecords.callAsync(callback); |
| 1125 | } |
| 1126 | } else if (this.recordsOutputPath) { |
| 1127 | this._emitRecords(callback); |
| 1128 | } else { |
| 1129 | callback(null); |
| 1130 | } |
| 1131 | } |
| 1132 | |
| 1133 | /** |
| 1134 | * Processes the provided error callback. |
no test coverage detected