cityssm / general-licence-manager

Either all code paths should have explicit returns, or none of them JS-0045
Anti-pattern
Minor
3 months ago3 months old
Expected to return a value at the end of function 'getBatchExport'
10  fileContentType: string
11}
12
13export function getBatchExport(14  batchDate: number
15): GetBatchExportReturn | undefined {
16  const outstandingBatchTransactions = getBatchTransactions(batchDate, true)
Expected to return a value at the end of function 'getBatchExport'
 2import { getConfigProperty } from '../helpers/functions.config.js';
 3import cpa005_getBatchExport from './batches/cpa005.js';
 4import rbcPreauthorized_getBatchExport from './batches/rbcPreauthorized.js';
 5export function getBatchExport(batchDate) { 6    const outstandingBatchTransactions = getBatchTransactions(batchDate, true);
 7    console.log(outstandingBatchTransactions);
 8    if (outstandingBatchTransactions.length === 0) {