blob: b7fb3b001c016e40ec3b2cdb2bd12bbf0a4e6bbf (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
import { isObject } from '@emprespresso/pengueno';
export type JobArgT = Record<string, string>;
export interface Job {
readonly type: string;
readonly arguments: JobArgT;
}
export const isJob = (j: unknown): j is Job =>
!!(isObject(j) && 'arguments' in j && isObject(j.arguments) && 'type' in j && typeof j.type === 'string' && j);
export * from './jobs.js';
|