/** * @rlanz/bull-queue * * @license MIT * @copyright Romain Lanz */ import { InvalidArgumentsException } from '@poppinss/utils' import type { QueueConfig } from './types/main.js' export function defineConfig(config: T): T { if (!config) { throw new InvalidArgumentsException('Invalid config. It must be a valid object') } if (!config.defaultConnection) { throw new InvalidArgumentsException( 'Invalid config. Missing property "defaultConnection" inside it' ) } return config }