// modules/async.ts
var ASYNC_OPERATORS = {
  "async/delay": {
    module: "async",
    category: "std-async",
    minArity: 1,
    maxArity: 2,
    description: "Wait for specified milliseconds, optionally execute an effect after",
    hasSideEffects: true,
    returnType: "any",
    params: [
      { name: "ms", type: "number", description: "Milliseconds to wait" },
      { name: "effect", type: "expression", description: "Optional effect to execute after delay" }
    ],
    example: '["async/delay", 2000, ["emit", "RETRY"]] // Wait 2s then emit'
  },
  "async/interval": {
    module: "async",
    category: "std-async",
    minArity: 2,
    maxArity: 2,
    description: "Execute an effect periodically at a fixed interval",
    hasSideEffects: true,
    returnType: "string",
    params: [
      { name: "ms", type: "number", description: "Interval in milliseconds" },
      { name: "effect", type: "expression", description: "Effect to execute each interval" }
    ],
    example: '["async/interval", 5000, ["emit", "POLL_TICK"]] // Emit every 5s'
  },
  "async/timeout": {
    module: "async",
    category: "std-async",
    minArity: 2,
    maxArity: 2,
    description: "Add timeout to an effect",
    hasSideEffects: true,
    returnType: "any",
    params: [
      { name: "effect", type: "expression", description: "Effect to execute" },
      { name: "ms", type: "number", description: "Timeout in milliseconds" }
    ],
    example: '["async/timeout", ["call", "api", "fetchData"], 5000]'
  },
  "async/debounce": {
    module: "async",
    category: "std-async",
    minArity: 2,
    maxArity: 2,
    description: "Debounce an event (wait for pause in events)",
    hasSideEffects: true,
    returnType: "void",
    params: [
      { name: "event", type: "string", description: "Event name to emit" },
      { name: "ms", type: "number", description: "Debounce delay in milliseconds" }
    ],
    example: '["async/debounce", "SEARCH", 300]'
  },
  "async/throttle": {
    module: "async",
    category: "std-async",
    minArity: 2,
    maxArity: 2,
    description: "Throttle an event (emit at most once per interval)",
    hasSideEffects: true,
    returnType: "void",
    params: [
      { name: "event", type: "string", description: "Event name to emit" },
      { name: "ms", type: "number", description: "Throttle interval in milliseconds" }
    ],
    example: '["async/throttle", "SCROLL", 100]'
  },
  "async/retry": {
    module: "async",
    category: "std-async",
    minArity: 2,
    maxArity: 2,
    description: "Retry an effect with configurable backoff",
    hasSideEffects: true,
    returnType: "any",
    params: [
      { name: "effect", type: "expression", description: "Effect to retry" },
      { name: "opts", type: "object", description: "{ attempts, backoff, baseDelay }" }
    ],
    example: `["async/retry",
  ["call", "api", "fetchData", { "id": "@entity.id" }],
  { "attempts": 3, "backoff": "exponential", "baseDelay": 1000 }]`
  },
  "async/race": {
    module: "async",
    category: "std-async",
    minArity: 2,
    maxArity: null,
    description: "Execute effects in parallel, return first to complete",
    hasSideEffects: true,
    returnType: "any",
    params: [{ name: "...effects", type: "expression[]", description: "Effects to race" }],
    example: '["async/race", ["call", "api1"], ["call", "api2"]]'
  },
  "async/all": {
    module: "async",
    category: "std-async",
    minArity: 2,
    maxArity: null,
    description: "Execute effects in parallel, wait for all to complete",
    hasSideEffects: true,
    returnType: "array",
    params: [{ name: "...effects", type: "expression[]", description: "Effects to execute" }],
    example: '["async/all", ["call", "api1"], ["call", "api2"]]'
  },
  "async/sequence": {
    module: "async",
    category: "std-async",
    minArity: 2,
    maxArity: null,
    description: "Execute effects in sequence (one after another)",
    hasSideEffects: true,
    returnType: "array",
    params: [{ name: "...effects", type: "expression[]", description: "Effects to execute in order" }],
    example: '["async/sequence", ["call", "validate"], ["call", "save"]]'
  }
};
function getAsyncOperators() {
  return Object.keys(ASYNC_OPERATORS);
}

export { ASYNC_OPERATORS, getAsyncOperators };
//# sourceMappingURL=async.js.map
//# sourceMappingURL=async.js.map