Skip to content

Commit

Permalink
feat: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
martonlederer committed Nov 27, 2024
1 parent 6cba372 commit c9886b6
Showing 1 changed file with 0 additions and 46 deletions.
46 changes: 0 additions & 46 deletions process/handlers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c9886b6

Please sign in to comment.