* feat: add nestjs replacement, remove nestjs * fix: format issues * fix: dependency issues * fix: dependency issues * fix: format issue * fix: wrong channel used for logging channel
15 lines
347 B
TypeScript
15 lines
347 B
TypeScript
import type { z } from "zod";
|
|
|
|
import type { MaybePromise } from "@homarr/common/types";
|
|
|
|
export const createQueue = <TInput extends z.ZodType>(input: TInput) => {
|
|
return {
|
|
withCallback: (callback: (data: z.infer<TInput>) => MaybePromise<void>) => {
|
|
return {
|
|
_input: input,
|
|
_callback: callback,
|
|
};
|
|
},
|
|
};
|
|
};
|