@almadar/std 1.0.15 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/registry.js CHANGED
@@ -2119,12 +2119,29 @@ var ASYNC_OPERATORS = {
2119
2119
  module: "async",
2120
2120
  category: "std-async",
2121
2121
  minArity: 1,
2122
- maxArity: 1,
2123
- description: "Wait for specified milliseconds",
2122
+ maxArity: 2,
2123
+ description: "Wait for specified milliseconds, optionally execute an effect after",
2124
2124
  hasSideEffects: true,
2125
- returnType: "void",
2126
- params: [{ name: "ms", type: "number", description: "Milliseconds to wait" }],
2127
- example: '["async/delay", 2000] // Wait 2 seconds'
2125
+ returnType: "any",
2126
+ params: [
2127
+ { name: "ms", type: "number", description: "Milliseconds to wait" },
2128
+ { name: "effect", type: "expression", description: "Optional effect to execute after delay" }
2129
+ ],
2130
+ example: '["async/delay", 2000, ["emit", "RETRY"]] // Wait 2s then emit'
2131
+ },
2132
+ "async/interval": {
2133
+ module: "async",
2134
+ category: "std-async",
2135
+ minArity: 2,
2136
+ maxArity: 2,
2137
+ description: "Execute an effect periodically at a fixed interval",
2138
+ hasSideEffects: true,
2139
+ returnType: "string",
2140
+ params: [
2141
+ { name: "ms", type: "number", description: "Interval in milliseconds" },
2142
+ { name: "effect", type: "expression", description: "Effect to execute each interval" }
2143
+ ],
2144
+ example: '["async/interval", 5000, ["emit", "POLL_TICK"]] // Emit every 5s'
2128
2145
  },
2129
2146
  "async/timeout": {
2130
2147
  module: "async",