dependency hell fixes

This commit is contained in:
Boki 2025-06-23 19:07:17 -04:00
parent 50e5b5cbed
commit 24768446f5
20 changed files with 219 additions and 197 deletions

View file

@ -0,0 +1,16 @@
/**
* Utility for creating typed job handlers
*/
import type { JobHandler, TypedJobHandler } from '@stock-bot/types';
/**
* Create a typed job handler with validation
*/
export function createJobHandler<TPayload = unknown, TResult = unknown>(
handler: TypedJobHandler<TPayload, TResult>
): JobHandler<unknown, TResult> {
return async (payload: unknown): Promise<TResult> => {
return handler(payload as TPayload);
};
}