From c9886b6f8c7533c395ee46cb9f87fb066cc2f343 Mon Sep 17 00:00:00 2001 From: Marton Lederer Date: Wed, 27 Nov 2024 16:36:05 +0100 Subject: [PATCH] feat: cleanup --- process/handlers.lua | 46 -------------------------------------------- 1 file changed, 46 deletions(-) diff --git a/process/handlers.lua b/process/handlers.lua index 60543bc3..4a90ed19 100644 --- a/process/handlers.lua +++ b/process/handlers.lua @@ -224,52 +224,6 @@ function handlers.after(handleName) end ---- Advanced handler config ---- interface HandlerConfig { ---- /** Handler name */ ---- name: string; ---- /** The position where the handler will be added */ ---- position?: "append" | "prepend" | { ---- /** Position type */ ---- type: "append" | "prepend" | "before" | "after"; ---- /** Position target, used for "before" and "after" */ ---- target?: string; ---- }; ---- /** Pattern that determinates whether the handler runs or not */ ---- pattern?: table | function | string; ---- /** Handler function or a resolver to add */ ---- handle: function | { [matchSpec: table | function]: function }; ---- /** ---- * If the pattern matches and this field is defined, it will overwrite whatever ---- * the pattern match returns (break/continue). ---- * - "break": Once the handler runs, no other handlers will be evaluated/executed ---- * - "continue": Once the handler runs, handler evaluation doesn't stop and moves ---- * on the next matching handler, if there is any ---- */ ---- runType?: "break" | "continue"; ---- /** Maximum times this handler can run */ ---- maxRuns?: integer; ---- /** ---- * Optional error handler for the handler. Having this makes the process run the handler ---- * simularly to when a code block/function is wrapped in a try/catch block. The handler ---- * runs no matter if it errors or not. If it errors, the error handler is executed ---- * immediately after the error is thrown. If the pattern match for this handler ---- * returned "continue" (or 1) or "runType" is "continue", then the evalutation/execution ---- * of handlers will continue to the next matching handler, if there is any. ---- */ ---- errorHandler?: function; ---- /** ---- * Optional deadline, after which the handler expires and runs no longer. ---- * Can be defined with milliseconds or blocks. ---- */ ---- timeout?: { ---- /** Timeout units */ ---- type: "milliseconds" | "blocks"; ---- /** Timeout value, in the units of the defined type */ ---- value: integer; ---- }; ---- }; - --- Allows creating and adding a handler with advanced options using a simple configuration table -- @function advanced -- @tparam {table} config The new handler's configuration